Disable Green Panel on all but Target's Tile
Jump to navigation
Jump to search
Disable Green Panel on all but Target's Tile 0017b7b4: 27bdffd0 addiu r29,r29,0xffd0 0017b7b8: 27a50010 addiu r5,r29,0x0010 r5 = Stack Pointer 0017b7bc: afbf002c sw r31,0x002c(r29) 0017b7c0: 0c01788b jal 0x0005e22c Transfer Attacker/Self ID? Through Mount Data 0017b7c4: afb00028 sw r16,0x0028(r29) 0017b7c8: 93a7001c lbu r7,0x001c(r29) Load Target's X 0017b7cc: 3c06800e lui r6,0x800e 0017b7d0: 90c64e9c lbu r6,0x4e9c(r6) Load Map's Max X 0017b7d4: 93a30020 lbu r3,0x0020(r29) Load Target's Y 0017b7d8: 93a5001e lbu r5,0x001e(r29) Load Target's Higher Elevation Flag 0017b7dc: 00e6102b sltu r2,r7,r6 0017b7e0: 1040001e beq r2,r0,0x 0017b85c Branch if TX >= Max X 0017b7e4: 306400ff andi r4,r3,0x00ff r4 = Target's Y 0017b7e8: 3c02800e lui r2,0x800e 0017b7ec: 90424ea0 lbu r2,0x4ea0(r2) Load Map's Max Y 0017b7f0: 00000000 nop 0017b7f4: 0082102b sltu r2,r4,r2 0017b7f8: 10400018 beq r2,r0,0x 0017b85c Branch if TY >= Max Y 0017b7fc: 30a300ff andi r3,r5,0x00ff r3 = Higher Elevation Flag 0017b800: 2c620002 sltiu r2,r3,0x0002 0017b804: 10400015 beq r2,r0,0x 0017b85c Branch if HE Flag isn't legal 0017b808: 00860018 mult r4,r6 TY * Max X 0017b80c: 00031200 sll r2,r3,0x08 HE Flag * 0x100 0017b810: 00001812 mflo r3 0017b814: 00431021 addu r2,r2,r3 TY * Max X + HE Flag * 0x100 0017b818: 00471021 addu r2,r2,r7 TY * Max X + TX + HE Flag * 0x100 0017b81c: 000210c0 sll r2,r2,0x03 Tile ID = (TY * Max X + TX + HE Flag * 0x100) 0017b820: 3c038019 lui r3,0x8019 0017b824: 2463f8cc addiu r3,r3,0xf8cc 0017b828: 00438021 addu r16,r2,r3 0017b82c: 92020006 lbu r2,0x0006(r16) Load Tile's ? 0017b830: 00000000 nop 0017b834: 30420001 andi r2,r2,0x0001 0017b838: 14400009 bne r2,r0,0x 0017b860 Branch if Tile Can't be targeted 0017b83c: 2402ffff addiu r2,r0,0xffff r2 = -1 0017b840: 0c05ed28 jal 0x 0017b4a0 Disable Green Panel Flags 0017b844: 00000000 nop 0017b848: 92030005 lbu r3,0x0005(r16) Load Tile's ? 0017b84c: 34020001 ori r2,r0,0x0001 r2 = 1 0017b850: 34630080 ori r3,r3,0x0080 Enable Green Panel Flag 0017b854: 0805ee18 j 0x 0017b860 0017b858: a2030005 sb r3,0x0005(r16) Store ? with GPF enabled 0017b85c: 2402ffff addiu r2,r0,0xffff r2 = -1 0017b860: 8fbf002c lw r31,0x002c(r29) 0017b864: 8fb00028 lw r16,0x0028(r29) 0017b868: 27bd0030 addiu r29,r29,0x0030 0017b86c: 03e00008 jr r31 0017b870: 00000000 nop