mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
to_asm adds a label and end text
Need to write more tools for injecting asm into main.asm from the python interpreter.
This commit is contained in:
parent
e97ba71d11
commit
f3f2adb219
@ -4970,7 +4970,7 @@ class TrainerFragmentParam(PointerLabelParam):
|
|||||||
PointerLabelParam.parse(self)
|
PointerLabelParam.parse(self)
|
||||||
class PeopleEvent(Command):
|
class PeopleEvent(Command):
|
||||||
size = people_event_byte_size
|
size = people_event_byte_size
|
||||||
macro_name = "people_event_def"
|
macro_name = "person_event"
|
||||||
base_label = "PeopleEvent_"
|
base_label = "PeopleEvent_"
|
||||||
override_byte_check = True
|
override_byte_check = True
|
||||||
param_types = {
|
param_types = {
|
||||||
@ -6751,6 +6751,7 @@ for map_group_id in map_names.keys():
|
|||||||
#generate map constants (like 1=PALLET_TOWN)
|
#generate map constants (like 1=PALLET_TOWN)
|
||||||
generate_map_constant_labels()
|
generate_map_constant_labels()
|
||||||
|
|
||||||
|
|
||||||
#### asm utilities ####
|
#### asm utilities ####
|
||||||
#these are pulled in from pokered/extras/analyze_incbins.py
|
#these are pulled in from pokered/extras/analyze_incbins.py
|
||||||
|
|
||||||
@ -6763,6 +6764,14 @@ incbin_lines = []
|
|||||||
#storage for processed incbin lines
|
#storage for processed incbin lines
|
||||||
processed_incbins = {}
|
processed_incbins = {}
|
||||||
|
|
||||||
|
def to_asm(some_object):
|
||||||
|
"""shows asm with labels and ending comments"""
|
||||||
|
#label: ; 0x10101
|
||||||
|
asm = some_object.label + ": ; " + hex(some_object.address) + "\n"
|
||||||
|
asm += spacing + some_object.to_asm().replace("\n", "\n"+spacing).replace("\n"+spacing+"\n"+spacing, "\n\n"+spacing)
|
||||||
|
asm += "\n; " + hex(some_object.last_address)
|
||||||
|
return asm
|
||||||
|
|
||||||
def isolate_incbins():
|
def isolate_incbins():
|
||||||
"find each incbin line"
|
"find each incbin line"
|
||||||
global incbin_lines, asm
|
global incbin_lines, asm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user