summaryrefslogtreecommitdiff
path: root/tools/tcgdisasm.py
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-12-20 13:19:33 -0600
committerdannye <33dannye@gmail.com>2020-12-20 13:19:33 -0600
commitb276b23d4e9ea34d64766ddb92c768b4bc4f1b8f (patch)
tree9ba304cf8d635d6f6c81c85ce864b0311108b414 /tools/tcgdisasm.py
parenta134c1f9a9c197ee9662c8177fa487ec938f5294 (diff)
parent68f371effcfc31927dc093a68505af85f523d243 (diff)
Merge branch 'master' of https://github.com/pret/poketcg
Diffstat (limited to 'tools/tcgdisasm.py')
-rw-r--r--tools/tcgdisasm.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/tcgdisasm.py b/tools/tcgdisasm.py
index 579d577..a887b1e 100644
--- a/tools/tcgdisasm.py
+++ b/tools/tcgdisasm.py
@@ -763,16 +763,17 @@ class Disassembler(object):
# handle the special flag macros
found_flag_macro = False
- for flag_macro in flag_macros:
- if flag_macro[0] == target_offset:
- found_flag_macro = True
- current_flag_macro = flag_macro
- event_flag = "EVENT_FLAG_" + format(opcode_arg_3, "02X")
- opcode_output_str = flag_macro[1].format(event_flag)
-
- # we need to skip a byte since this macro takes one extra
- opcode_nargs+=1
- break
+ if opcode_byte == 0xcd:
+ for flag_macro in flag_macros:
+ if flag_macro[0] == target_offset:
+ found_flag_macro = True
+ current_flag_macro = flag_macro
+ event_flag = "EVENT_FLAG_" + format(opcode_arg_3, "02X")
+ opcode_output_str = flag_macro[1].format(event_flag)
+
+ # we need to skip a byte since this macro takes one extra
+ opcode_nargs+=1
+ break
if not found_flag_macro and opcode_byte in call_commands + absolute_jumps: