def main(): load_labels() usage = "usage: %prog address" parser = OptionParser(usage) (options, args) = parser.parse_args() if len(args) == 1: print "usage: python pretty_trainer_headers.py address label\n" args.append("TrainerHeader_" + (args[0].replace("0x", ""))) elif len(args) != 2: parser.error("we need both an address and a label") address = int(args[0], 16) label = args[1] global rom rom = open("../baserom.gbc", "r").read() #print pretty_print_trainer_header(address, label) print all_trainer_headers_at(address)
analyze_incbins.asm = None analyze_incbins.incbin_lines = [] analyze_incbins.processed_incbins = {} #reload load_asm() isolate_incbins() process_incbins() if __name__ == "__main__": #load map headers and object data extract_maps.load_rom() extract_maps.load_map_pointers() extract_maps.read_all_map_headers() load_labels() #print base_data_pretty_printer(0) load_asm() isolate_incbins() process_incbins() #insert_base_stats(1) insert_all_base_stats() #load texts (these two have different formats) #all_texts = pretty_map_headers.analyze_texts.analyze_texts() #pretty_map_headers.all_texts = all_texts #tx_fars = pretty_map_headers.find_all_tx_fars() #load incbins #reset_incbins()
processed_incbins = {} analyze_incbins.asm = None analyze_incbins.incbin_lines = [] analyze_incbins.processed_incbins = {} #reload load_asm() isolate_incbins() process_incbins() if __name__ == "__main__": #load map headers and object data extract_maps.load_rom() extract_maps.load_map_pointers() extract_maps.read_all_map_headers() load_labels() #print base_data_pretty_printer(0) load_asm() isolate_incbins() process_incbins() #insert_base_stats(1) insert_all_base_stats() #load texts (these two have different formats) #all_texts = pretty_map_headers.analyze_texts.analyze_texts() #pretty_map_headers.all_texts = all_texts #tx_fars = pretty_map_headers.find_all_tx_fars() #load incbins #reset_incbins()