0012da0c - 0012dafc
Jump to navigation
Jump to search
0012da0c: 27bdffe0 addiu r29,r29,0xffe0 0012da10: afb10014 sw r17,0x0014(r29) 0012da14: 00808821 addu r17,r4,r0 0012da18: afb20018 sw r18,0x0018(r29) 0012da1c: 00a09021 addu r18,r5,r0 0012da20: 340401fd ori r4,r0,0x01fd 0012da24: afbf001c sw r31,0x001c(r29) 0012da28: 0c04ed64 jal 0x0013b590 0012da2c: afb00010 sw r16,0x0010(r29) 0012da30: 1440002a bne r2,r0,0x0012dadc 0012da34: 02202021 addu r4,r17,r0 0012da38: 0c04ed64 jal 0x0013b590 0012da3c: 3404006f ori r4,r0,0x006f 0012da40: 10400026 beq r2,r0,0x0012dadc 0012da44: 02202021 addu r4,r17,r0 0012da48: 0c023374 jal 0x0008cdd0 0012da4c: 02202021 addu r4,r17,r0 0012da50: 00402021 addu r4,r2,r0 0012da54: 04800020 bltz r4,0x0012dad8 0012da58: 2e4201f4 sltiu r2,r18,0x01f4 0012da5c: 1040001e beq r2,r0,0x0012dad8 0012da60: 00000000 nop 0012da64: 0c0602bf jal 0x00180afc Get Unit's Data pointer Battle pointer, 0x801608cc 0012da68: 00000000 nop 0012da6c: 34040004 ori r4,r0,0x0004 0012da70: 00408021 addu r16,r2,r0 r16 = battle pointer 0012da74: 90450047 lbu r5,0x0047(r2) load unit's X coordinate 0012da78: 96070048 lhu r7,0x0048(r16) load unit's Y coordinate + facing/level/stepping stone 0012da7c: 92060048 lbu r6,0x0048(r16) again 0012da80: 0c061007 jal 0x0018401c Return Various Tile Data 0012da84: 00073bc2 srl r7,r7,0x0f r7 = level only (same effect could be achieved by loading 0x49 and shifting by 7.) 0012da88: 92030182 lbu r3,0x0182(r16) mount info 0012da8c: 00000000 nop 0012da90: 306300c0 andi r3,r3,0x00c0 separate riding/being ridden 0012da94: 10600005 beq r3,r0,0x0012daac branch if not riding or being ridden 0012da98: 304200ff andi r2,r2,0x00ff 0012da9c: 3c028009 lui r2,0x8009 0012daa0: 2442be54 addiu r2,r2,0xbe54 store 0x8009be54 to inner sub routine (I imagine. this calls a map thing.) 0012daa4: 0804b6b0 j 0x0012dac0 0012daa8: 00000000 nop 0012daac: 28420002 slti r2,r2,0x0002 0012dab0: 1440000a bne r2,r0,0x0012dadc 0012dab4: 02202021 addu r4,r17,r0 0012dab8: 3c028009 lui r2,0x8009 0012dabc: 2442be04 addiu r2,r2,0xbe04 store 0x8009be04 to inner sub routine 0012dac0: 3c018017 lui r1,0x8017 0012dac4: ac223ca8 sw r2,0x3ca8(r1) save thread 0012dac8: 0c0533ad jal 0x0014ceb4 Call Inner Subroutine - Call 0x0009be04 or 0x0009be54, not initialised in ROM? (many a nop.) 0012dacc: 02202021 addu r4,r17,r0 0012dad0: 0804b6b9 j 0x0012dae4 0012dad4: 00000000 nop 0012dad8: 02202021 addu r4,r17,r0 0012dadc: 0c022f9f jal 0x0008be7c 0012dae0: 02402821 addu r5,r18,r0 0012dae4: 8fbf001c lw r31,0x001c(r29) 0012dae8: 8fb20018 lw r18,0x0018(r29) 0012daec: 8fb10014 lw r17,0x0014(r29) 0012daf0: 8fb00010 lw r16,0x0010(r29) 0012daf4: 27bd0020 addiu r29,r29,0x0020 0012daf8: 03e00008 jr r31 0012dafc: 00000000 nop