diff options
author | dannye <33dannye@gmail.com> | 2020-12-20 13:02:16 -0600 |
---|---|---|
committer | dannye <33dannye@gmail.com> | 2020-12-20 13:02:16 -0600 |
commit | 614af9729f8b3fe30d52bace28eae083e1bc6127 (patch) | |
tree | 65d13c1041593dad9ba34c9acb5cbca476894227 /tools/tcgdisasm.py | |
parent | b02e5e9cf9e424eacfa8dfffc769b35a3dadfee2 (diff) | |
parent | f13ddf25bf61c79200c56666184fe84b579ad1cc (diff) |
Merge branch 'master' of https://github.com/xCrystal/poketcg
Diffstat (limited to 'tools/tcgdisasm.py')
-rw-r--r-- | tools/tcgdisasm.py | 21 |
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: |