summaryrefslogtreecommitdiff
path: root/pokemontools/crystal.py
diff options
context:
space:
mode:
Diffstat (limited to 'pokemontools/crystal.py')
-rw-r--r--pokemontools/crystal.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pokemontools/crystal.py b/pokemontools/crystal.py
index dd2461a..e5ffd80 100644
--- a/pokemontools/crystal.py
+++ b/pokemontools/crystal.py
@@ -764,6 +764,10 @@ class SingleByteParam():
else:
return str(self.byte)
+ @staticmethod
+ def from_asm(value):
+ return value
+
class DollarSignByte(SingleByteParam):
def to_asm(self):
return hex(self.byte).replace("0x", "$")
@@ -822,6 +826,10 @@ class MultiByteParam():
decimal = int("0x"+"".join([("%.2x")%x for x in reversed(self.bytes)]), 16)
return str(decimal)
+ @staticmethod
+ def from_asm(value):
+ return value
+
class PointerLabelParam(MultiByteParam):
# default size is 2 bytes
@@ -1000,6 +1008,7 @@ class RAMAddressParam(MultiByteParam):
class MoneyByteParam(MultiByteParam):
size = 3
+ byte_type = "db"
max_value = 0x0F423F
should_be_decimal = True
def parse(self):
@@ -1236,6 +1245,7 @@ class Command:
# use this when the "byte id" doesn't matter
# .. for example, a non-script command doesn't use the "byte id"
override_byte_check = False
+ is_rgbasm_macro = False
base_label = "UnseenLabel_"
def __init__(self, address=None, *pargs, **kwargs):
@@ -1723,6 +1733,7 @@ class TextCommand(Command):
#def get_dependencies(self, recompute=False, global_dependencies=set()):
# return []
+
# this is a regular command in a TextScript for writing text
# but unlike other macros that preprocessor.py handles,
# the preprocessor-parser is custom and MainText is not
@@ -2376,6 +2387,7 @@ class BigEndianParam:
"""big-endian word"""
size = 2
should_be_decimal = False
+ byte_type = "bigdw"
def __init__(self, *args, **kwargs):
self.prefix = '$'
@@ -2394,6 +2406,10 @@ class BigEndianParam:
decimal = int("0x"+"".join([("%.2x")%x for x in self.bytes]), 16)
return str(decimal)
+ @staticmethod
+ def from_asm(value):
+ return value
+
class DecimalBigEndianParam(BigEndianParam):
should_be_decimal = True