Display Birthday Menu Text Entry
Jump to navigation
Jump to search
# ROUTINE: DISPLAY BIRTHDAY MENU TEXT ENTRY # Displays a menu text entry for the birthday menu. # Parameters: # r4 = (p1) # r5 = (combinedTextIndex) for text lookup # 16-bit value: # (Upper 5 bits): Text Section # (Lower 11 bits): Inner text index within Section # r6 = (xCoordinate) Text X Coordinate (right) (offset from center?) # r7 = (yCoordinate) Text Y Coordinate (bottom?) (offset from center?) # *(sp + 0x10) = (p5) Pointer; Used as Parameter 2 in Routine 0x800ff284 # Sometimes varies by menu, sometimes is the same 8006c96c: 27bdffd8 addiu r29,r29,-0x0028 8006c970: 000410c0 sll r2,r4,0x03 # p1 * 8 8006c974: 00441023 subu r2,r2,r4 # p1 * 7 8006c978: 000210c0 sll r2,r2,0x03 # p1 * 56 8006c97c: afbf0020 sw r31,0x0020(r29) 8006c980: afa60030 sw r6,0x0030(r29) # *(sp + 0x30) = xCoordinate // ????? No change if removed 8006c984: afa70034 sw r7,0x0034(r29) # *(sp + 0x34) = yCoordinate // ????? No change if removed 8006c988: a7a60010 sh r6,0x0010(r29) # local.0x00 = xCoordinate 8006c98c: a7a70012 sh r7,0x0012(r29) # local.0x02 = yCoordinate 8006c990: 3c018008 lui r1,0x8008 8006c994: 242160c8 addiu r1,r1,0x60c8 # 0x800860c8 8006c998: 00220821 addu r1,r1,r2 # 0x800860c8 + (p1 * 56) 8006c99c: 84220000 lh r2,0x0000(r1) # *(0x800860c8 + (p1 * 56)) 8006c9a0: 00a02021 addu r4,r5,r0 # combinedTextIndex 8006c9a4: afa20018 sw r2,0x0018(r29) # local.0x08 = *(0x800860c8 + (p1 * 56)) 8006c9a8: 8fa50038 lw r5,0x0038(r29) # p5 8006c9ac: 0c03f9dd jal 0x800fe774 # Display Menu Text Entry (WORLD.BIN) (combinedTextIndex, p5, local); 8006c9b0: 27a60010 addiu r6,r29,0x0010 # local 8006c9b4: 8fbf0020 lw r31,0x0020(r29) 8006c9b8: 27bd0028 addiu r29,r29,0x0028 8006c9bc: 03e00008 jr r31 8006c9c0: 00000000 nop