Find Text Entry (WORLD.BIN)
Jump to navigation
Jump to search
# ROUTINE: FIND TEXT ENTRY (WORLD.BIN) # This is the WORLD.BIN version of the Prep for Loading Text routine in BATTLE.BIN. # Parameters: # r4 = (combinedTextIndex) for lookup # 16-bit value: # (Upper 5 bits): Text Section # (Lower 11 bits): Inner text index within Section # Returns # r2 = Text character pointer for appropriate entry 800e6edc: 27bdffe8 addiu r29,r29,-0x0018 800e6ee0: 00802821 addu r5,r4,r0 # p1 800e6ee4: 30a2f800 andi r2,r5,0xf800 # p1 & 0xf800 800e6ee8: 00021242 srl r2,r2,0x09 # textSectionOffset = (p1 & 0xf800) >> 9 // (textSection * 4) 800e6eec: afbf0010 sw r31,0x0010(r29) 800e6ef0: 3c01801d lui r1,0x801d 800e6ef4: 00220821 addu r1,r1,r2 800e6ef8: 8c24d8a4 lw r4,-0x275c(r1) # *(0x801cd8a4 + textSectionOffset) 800e6efc: 0c0400d2 jal 0x80100348 # return Get Inner Text (WORLD.BIN) (*(0x801cd8a4 + textSectionOffset), combinedTextIndex & 0x7ff); // Second parameter is Inner text index 800e6f00: 30a507ff andi r5,r5,0x07ff 800e6f04: 8fbf0010 lw r31,0x0010(r29) 800e6f08: 27bd0018 addiu r29,r29,0x0018 800e6f0c: 03e00008 jr r31 800e6f10: 00000000 nop
Return Locations
WORLD.BIN 000e3780: 000e372c_-_000e38a4 000e384c: 000e372c_-_000e38a4 000e454c: 000e4268_-_000e4664 000e49a4: Find_Text_Coordinates_(WORLD.BIN) 000e4668_-_000e4b00 000e62d0: 000e66d8: 000e69cc: 000e91d8: 000eeb3c: 000eeb04_-_000eec20 000f3da4: 000f3d44_-_000f3fa0 000fe8c8: Display_Menu_Text_(WORLD.BIN) 000fe818_-_000fef30 000fed58: Display_Menu_Text_(WORLD.BIN) 000fe818_-_000fef30 00106afc: 00106a48_-_00106f40 0010bff0: 0010bdf8_-_0010c484 0010c2d8: 0010bdf8_-_0010c484 0010f2c8: 0010f250_-_0011025c 0010f2d8: 0010f250_-_0011025c 0010f6e0: 0010f250_-_0011025c 0010f728: 0010f250_-_0011025c 0010fe40: 0010f250_-_0011025c 00142468: 0014290c: OPEN.BIN 0006ba38: Display_Birthday_Menu_Text Other 0006e5ac: 0006e4a8_-_0006e778 00070bf8: 00070be4_-_00070efc 000743c0: 00074134_-_00074784 0007b544: 0007b4e0_-_0007b7d0 0008f89c: 0008f888_-_0008f8dc 0008aec0: 0008aea0_-_0008afec 0008fe78: 0008fdb4_-_0008ffd4 000902d8: 0008ffd8_-_00090368