0019ad74 - 0019ae2c
Jump to navigation
Jump to search
Determine if Height Difference < 3
0019ad74: 90a30000 lbu r3,0x0000(r5) Load X 0019ad78: 3c06801a lui r6,0x801a 0019ad7c: 90c601fe lbu r6,0x01fe(r6) Load Map Max X 0019ad80: 00000000 nop 0019ad84: 0066102b sltu r2,r3,r6 0019ad88: 10400027 beq r2,r0,0x0019ae28 Branch if X >= Map Max X 0019ad8c: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail) 0019ad90: 90a50002 lbu r5,0x0002(r5) Load Y 0019ad94: 3c02801a lui r2,0x801a 0019ad98: 904201ff lbu r2,0x01ff(r2) Load Map Max Y 0019ad9c: 00000000 nop 0019ada0: 00a2102b sltu r2,r5,r2 0019ada4: 1040000c beq r2,r0,0x0019add8 Branch if Y >= Map Max Y 0019ada8: 00a60018 mult r5,r6 Max X * Y 0019adac: 00001012 mflo r2 0019adb0: 00431021 addu r2,r2,r3 Max X * Y + X 0019adb4: 000210c0 sll r2,r2,0x03 Tile ID = (Max X * Y + Max X) * 8 0019adb8: 3c038019 lui r3,0x8019 0019adbc: 2463f8cc addiu r3,r3,0xf8cc 0019adc0: 00432821 addu r5,r2,r3 0019adc4: 90a20006 lbu r2,0x0006(r5) Load Tile's ? 0019adc8: 00000000 nop 0019adcc: 30420001 andi r2,r2,0x0001 0019add0: 10400003 beq r2,r0,0x0019ade0 Branch if Tile can be selected 0019add4: 00000000 nop 0019add8: 08066b8a j 0x0019ae28 0019addc: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail) 0019ade0: 90820002 lbu r2,0x0002(r4) Load Y 0019ade4: 00000000 nop 0019ade8: 00460018 mult r2,r6 Y * Max X 0019adec: 90830001 lbu r3,0x0001(r4) Load Map Level 0019adf0: 90840000 lbu r4,0x0000(r4) Load X 0019adf4: 00031a00 sll r3,r3,0x08 Level * 256 0019adf8: 00001012 mflo r2 0019adfc: 00621821 addu r3,r3,r2 Y * Max X + Level * 256 0019ae00: 00641821 addu r3,r3,r4 Y * Max X + Level * 256 + X 0019ae04: 000318c0 sll r3,r3,0x03 Tile ID = (Y * Max X + Level * 256 + X) * 8 0019ae08: 90a20002 lbu r2,0x0002(r5) Load Target Tile's Height 0019ae0c: 3c018019 lui r1,0x8019 0019ae10: 00230821 addu r1,r1,r3 0019ae14: 9023f8ce lbu r3,-0x0732(r1) Load Attacker Tile's Height 0019ae18: 00000000 nop 0019ae1c: 00431023 subu r2,r2,r3 Target Height -= Attacker Height 0019ae20: 28420003 slti r2,r2,0x0003 0019ae24: 38420001 xori r2,r2,0x0001 r2 = 0 if Height Difference < 3 0019ae28: 03e00008 jr r31 0019ae2c: 00000000 nop