Difference between revisions of "Another targeting routine"
Jump to navigation
Jump to search
m (Choto moved page 0017a7bc - 0017a8bc to Another targeting routine) |
|
(No difference)
|
Revision as of 22:23, 14 February 2015
another targeting routine 17a7bc: : some map calculation
0017a7bc: 308400ff andi r4,r4,0x00ff Mask second byte 0017a7c0: 30a500ff andi r5,r5,0x00ff Mask second byte 0017a7c4: 00a05021 addu r10,r5,r0 0017a7c8: 2406ffe1 addiu r6,r0,0xffe1 0017a7cc: 3c0c8019 lui r12,0x8019 0017a7d0: 258c2dd8 addiu r12,r12,0x2dd8 0017a7d4: 258d0500 addiu r13,r12,0x0500 Exception 0017a7d8: 340b0001 ori r11,r0,0x0001 r11 = (0x1) 1 0017a7dc: 3c08800e lui r8,0x800e 0017a7e0: 91084e9c lbu r8,0x4e9c(r8) Load Map Max X coordinate 0017a7e4: 00000000 nop 0017a7e8: 01480018 mult r10,r8 0x0 * Map Max X coordinate 0017a7ec: 00864821 addu r9,r4,r6 0017a7f0: 00001012 mflo r2 0x0 0017a7f4: 00491821 addu r3,r2,r9 0017a7f8: 00031080 sll r2,r3,0x02 Shift left 2 bits (*0x4) (*4) 0017a7fc: 00433821 addu r7,r2,r3 0017a800: 0520000a bltz r9,0x0017a82c 0017a804: 00ec1821 addu r3,r7,r12 0017a808: 0128102a slt r2,r9,r8 Set if -0x1F + Unit Data < Map Max X coordinate 0017a80c: 10400007 beq r2,r0,0x0017a82c Branch if not 0017a810: 00000000 nop 0017a814: 90620000 lbu r2,0x0000(r3) Load ??? 0017a818: 00000000 nop 0017a81c: 10400003 beq r2,r0,0x0017a82c Branch if == 0x0 0017a820: 00ed1021 addu r2,r7,r13 0017a824: a06b0001 sb r11,0x0001(r3) Store 1 (1) into 0x1 0017a828: a04b0001 sb r11,0x0001(r2) Store 1 (1) into 0x2 0017a82c: 24c60001 addiu r6,r6,0x0001 0017a830: 28c20020 slti r2,r6,0x0020 Set if -0x1E < 32 0017a834: 1440ffe9 bne r2,r0,0x0017a7dc Branch if so 0017a838: 00804821 addu r9,r4,r0 0017a83c: 2406ffe1 addiu r6,r0,0xffe1 0017a840: 3c088019 lui r8,0x8019 0017a844: 25082dd8 addiu r8,r8,0x2dd8 0017a848: 250b0500 addiu r11,r8,0x0500 Exception 0017a84c: 34070001 ori r7,r0,0x0001 r7 = (0x1) 1 0017a850: 3c02800e lui r2,0x800e 0017a854: 90424e9c lbu r2,0x4e9c(r2) Load Map Max X coordinate 0017a858: 00a65021 addu r10,r5,r6 0017a85c: 01420018 mult r10,r2 -0x1001F + 0x0 * Map Max X coordinate 0017a860: 00001012 mflo r2 0x0 0017a864: 00491821 addu r3,r2,r9 0017a868: 00031080 sll r2,r3,0x02 Shift left 2 bits (*0x4) (*4) 0017a86c: 00432021 addu r4,r2,r3 0017a870: 0540000d bltz r10,0x0017a8a8 0017a874: 00881821 addu r3,r4,r8 0017a878: 3c02800e lui r2,0x800e 0017a87c: 90424ea0 lbu r2,0x4ea0(r2) Load Map Max Y coordinate 0017a880: 00000000 nop 0017a884: 0142102a slt r2,r10,r2 Set if -0x1001F + 0x0 < Map Max Y coordinate 0017a888: 10400007 beq r2,r0,0x0017a8a8 Branch if not 0017a88c: 00000000 nop 0017a890: 90620000 lbu r2,0x0000(r3) Load ??? 0017a894: 00000000 nop 0017a898: 10400003 beq r2,r0,0x0017a8a8 Branch if == 0x0 0017a89c: 008b1021 addu r2,r4,r11 0017a8a0: a0670001 sb r7,0x0001(r3) Store 1 (1) into 0x1 0017a8a4: a0470001 sb r7,0x0001(r2) Store 1 (1) into 0x2 0017a8a8: 24c60001 addiu r6,r6,0x0001 0017a8ac: 28c20020 slti r2,r6,0x0020 Set if -0x1001E < 32 0017a8b0: 1440ffe7 bne r2,r0,0x0017a850 Branch if so 0017a8b4: 00000000 nop 0017a8b8: 03e00008 jr r31 Jump to Address 0017a8bc: 00000000 nop