mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
Merge pull request #130 from Sanky/master
Menu stuff, battle text split & extras.
This commit is contained in:
commit
cf4ec47b15
@ -861,4 +861,10 @@ def all_outstanding_labels_are_reverse(byte_labels, offset):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print output_bank_opcodes(int(sys.argv[1], 16))[0]
|
||||
addr = sys.argv[1]
|
||||
if ":" in addr:
|
||||
addr = addr.split(":")
|
||||
addr = int(addr[0], 16)*0x4000+(int(addr[1], 16)%0x4000)
|
||||
else:
|
||||
addr = int(addr, 16)
|
||||
print output_bank_opcodes(addr)[0]
|
||||
|
25
extras/parse_consecutive_strings.py
Normal file
25
extras/parse_consecutive_strings.py
Normal file
@ -0,0 +1,25 @@
|
||||
import sys
|
||||
|
||||
import crystal
|
||||
|
||||
rom = crystal.load_rom()
|
||||
|
||||
addr = int(sys.argv[1], 16)
|
||||
count = int(sys.argv[2]) if len(sys.argv) > 2 else 256
|
||||
label_prefix = sys.argv[3] if len(sys.argv) > 3 else "UnknownString"
|
||||
|
||||
ex = None
|
||||
|
||||
for i in range(count):
|
||||
try:
|
||||
string = crystal.PokedexText(addr)
|
||||
asm = string.to_asm()
|
||||
except Exception as ex:
|
||||
break
|
||||
print label_prefix+str(i)+": ; "+hex(addr)
|
||||
print "\t"+asm
|
||||
print
|
||||
addr = string.last_address
|
||||
|
||||
print "; "+hex(addr)
|
||||
if ex: raise ex
|
1104
text/battle.asm
Normal file
1104
text/battle.asm
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user