insert object asm

hg-commit-id: 9974e529c8d6
This commit is contained in:
Bryan Bishop 2012-01-05 20:57:41 -06:00
parent 813959be7f
commit cfe485a1e6
3 changed files with 5293 additions and 224 deletions

View file

@ -532,7 +532,7 @@ def get_object_data(address):
def compute_object_data_size(object):
size = 4
size += 6 * (object["number_of_things"])
size += 6 * (int(object["number_of_things"]))
trainer_count = 0
item_count = 0

View file

@ -444,7 +444,10 @@ def object_data_pretty_printer(map_id):
warp_to_point = warp["warp_to_point"]
warp_to_map_id = warp["warp_to_map_id"]
warp_to_map_constant = map_constants[warp_to_map_id]
try:
warp_to_map_constant = map_constants[warp_to_map_id]
except Exception, exc:
warp_to_map_constant = "$" + hex(warp_to_map_id)[2:]
output += spacing + "db $" + hex(int(y))[2:] + ", $" + hex(int(x))[2:] + ", $" + hex(int(warp_to_point))[2:] + ", " + warp_to_map_constant + "\n"
@ -495,10 +498,13 @@ def object_data_pretty_printer(map_id):
warp_to_y = hex(int(warp_to["y"]))[2:]
warp_to_x = hex(int(warp_to["x"]))[2:]
previous_location = map_constants[object["warps"][warp_to_id]["warp_to_map_id"]]
comment = previous_location
try:
previous_location = map_constants[object["warps"][warp_to_id]["warp_to_map_id"]]
comment = " ; " + previous_location
except Exception, exc:
comment = ""
output += spacing + "EVENT_DISP $" + map_width[2:] + ", $" + warp_to_y + ", $" + warp_to_x + " ; " + comment + "\n"
output += spacing + "EVENT_DISP $" + map_width[2:] + ", $" + warp_to_y + ", $" + warp_to_x + comment + "\n"
#output += spacing + "dw $" + hex(int(warp_to["event_displacement"][1]))[2:] + hex(int(warp_to["event_displacement"][0]))[2:] + "\n"
#output += spacing + "db $" + hex(int(warp_to["y"]))[2:] + ", $" + hex(int(warp_to["x"]))[2:] + "\n"
#output += "\n"

File diff suppressed because it is too large Load diff