Some Map calculations - height diff., coordinates
Jump to navigation
Jump to search
0019abb4: 27bdffc8 addiu r29,r29,0xffc8 0019abb8: afb3002c sw r19,0x002c(r29) 0019abbc: 3c13801a lui r19,0x801a 0019abc0: 2673f3c4 addiu r19,r19,0xf3c4 load AI data 0019abc4: 3c03801a lui r3,0x801a 0019abc8: 90630bc3 lbu r3,0x0bc3(r3) load ?? 0019abcc: 34020005 ori r2,r0,0x0005 0019abd0: afbf0034 sw r31,0x0034(r29) 0019abd4: afb40030 sw r20,0x0030(r29) 0019abd8: afb20028 sw r18,0x0028(r29) 0019abdc: afb10024 sw r17,0x0024(r29) 0019abe0: 10620003 beq r3,r2,0x0019abf0 branch if 5 0019abe4: afb00020 sw r16,0x0020(r29) 0019abe8: 08066b54 j 0x0019ad50 0019abec: 00601021 addu r2,r3,r0 0019abf0: 3c04801a lui r4,0x801a 0019abf4: 908401f2 lbu r4,0x01f2(r4) load acting unit ID 0019abf8: 26650e30 addiu r5,r19,0x0e30 r5 = acting units location data 0019abfc: 00008021 addu r16,r0,r0 0019ac00: 27b20018 addiu r18,r29,0x0018 0019ac04: 0c067ca9 jal 0x0019f2a4 Transfer Unit Coordinates to AI 0019ac08: 00008821 addu r17,r0,r0 0019ac0c: 92620e30 lbu r2,0x0e30(r19) load unit ID 0019ac10: 3c01801a lui r1,0x801a 0019ac14: 00310821 addu r1,r1,r17 0019ac18: 9023f358 lbu r3,-0x0ca8(r1) load X mod 0019ac1c: 26640e30 addiu r4,r19,0x0e30 unit data 0019ac20: 00431021 addu r2,r2,r3 X mod + unit ID? 0019ac24: a3a20010 sb r2,0x0010(r29) store on stack 0019ac28: 92620e32 lbu r2,0x0e32(r19) load Y coordinate 0019ac2c: 3c01801a lui r1,0x801a 0019ac30: 00310821 addu r1,r1,r17 0019ac34: 9023f359 lbu r3,-0x0ca7(r1) load Y mod 0019ac38: 27a50010 addiu r5,r29,0x0010 0019ac3c: a3a00011 sb r0,0x0011(r29) 0019ac40: 00431021 addu r2,r2,r3 add them 0019ac44: 0c066b5d jal 0x0019ad74 [[Determine if Height Difference < 3]] 0019ac48: a3a20012 sb r2,0x0012(r29) store on stack 0019ac4c: 10400003 beq r2,r0,0x0019ac5c branch if ?? 0019ac50: 34020001 ori r2,r0,0x0001 0019ac54: 08066b19 j 0x0019ac64 0019ac58: a2400000 sb r0,0x0000(r18) store 0 into stack? 0019ac5c: 0200a021 addu r20,r16,r0 0019ac60: a2420000 sb r2,0x0000(r18) store 1 into stack 0019ac64: 26520001 addiu r18,r18,0x0001 0019ac68: 26100001 addiu r16,r16,0x0001 0019ac6c: 2a020004 slti r2,r16,0x0004 do 4 times 0019ac70: 1440ffe6 bne r2,r0,0x0019ac0c 0019ac74: 26310002 addiu r17,r17,0x0002 0019ac78: 8fa20018 lw r2,0x0018(r29) 0019ac7c: 00000000 nop 0019ac80: 14400004 bne r2,r0,0x0019ac94 0019ac84: 34030001 ori r3,r0,0x0001 0019ac88: 3c020101 lui r2,0x0101 0019ac8c: 34420101 ori r2,r2,0x0101 0019ac90: afa20018 sw r2,0x0018(r29) 0019ac94: 34110014 ori r17,r0,0x0014 0019ac98: 26620014 addiu r2,r19,0x0014 0019ac9c: a0430c8d sb r3,0x0c8d(r2) store targetable unit list? 0019aca0: 2631ffff addiu r17,r17,0xffff 0019aca4: 0621fffd bgez r17,0x0019ac9c 0019aca8: 2442ffff addiu r2,r2,0xffff 0019acac: 00009021 addu r18,r0,r0 0019acb0: 92700e2e lbu r16,0x0e2e(r19) actnig unit battle id 0019acb4: 0c066449 jal 0x00199124 Calculate Physical? Target 0019acb8: 34040001 ori r4,r0,0x0001 0019acbc: 00408821 addu r17,r2,r0 0019acc0: 16110006 bne r16,r17,0x0019acdc 0019acc4: 02202021 addu r4,r17,r0 0019acc8: 0c066449 jal 0x00199124 Calculate Physical? Target 0019accc: 34040002 ori r4,r0,0x0002 0019acd0: 00408821 addu r17,r2,r0 0019acd4: 34120001 ori r18,r0,0x0001 0019acd8: 02202021 addu r4,r17,r0 0019acdc: 0c067ca9 jal 0x0019f2a4 Transfer Unit Coordinates to AI 0019ace0: 27a50010 addiu r5,r29,0x0010 0019ace4: 27a40010 addiu r4,r29,0x0010 0019ace8: 0c065e39 jal 0x001978e4 Find Direction of Target 0019acec: 26650e30 addiu r5,r19,0x0e30 0019acf0: 00408021 addu r16,r2,r0 0019acf4: 27a30018 addiu r3,r29,0x0018 0019acf8: 00701021 addu r2,r3,r16 0019acfc: 90420000 lbu r2,0x0000(r2) 0019ad00: 00000000 nop 0019ad04: 14400012 bne r2,r0,0x0019ad50 0019ad08: 02001021 addu r2,r16,r0 0019ad0c: 16400004 bne r18,r0,0x0019ad20 0019ad10: 00000000 nop 0019ad14: 02711021 addu r2,r19,r17 0019ad18: 08066b2c j 0x0019acb0 0019ad1c: a0400c8d sb r0,0x0c8d(r2) 0019ad20: 8e6217f8 lw r2,0x17f8(r19) 0019ad24: 00000000 nop 0019ad28: 94420048 lhu r2,0x0048(r2) 0019ad2c: 00000000 nop 0019ad30: 00021202 srl r2,r2,0x08 0019ad34: 3044000f andi r4,r2,0x000f 0019ad38: 00641021 addu r2,r3,r4 0019ad3c: 90430000 lbu r3,0x0000(r2) 0019ad40: 00000000 nop 0019ad44: 10600002 beq r3,r0,0x0019ad50 0019ad48: 02801021 addu r2,r20,r0 0019ad4c: 00801021 addu r2,r4,r0 0019ad50: 8fbf0034 lw r31,0x0034(r29) 0019ad54: 8fb40030 lw r20,0x0030(r29) 0019ad58: 8fb3002c lw r19,0x002c(r29) 0019ad5c: 8fb20028 lw r18,0x0028(r29) 0019ad60: 8fb10024 lw r17,0x0024(r29) 0019ad64: 8fb00020 lw r16,0x0020(r29) 0019ad68: 27bd0038 addiu r29,r29,0x0038 0019ad6c: 03e00008 jr r31 0019ad70: 00000000 nop