Check if Unit can be Targeted (Cryst/Trea/Mount/Trans)
Jump to navigation
Jump to search
00196ce8: 3c06801a lui r6,0x801a 00196cec: 24c6f3c4 addiu r6,r6,0xf3c4 r6 = AI Data Pointer 00196cf0: 000410c0 sll r2,r4,0x03 Unit ID * 8 00196cf4: 00441023 subu r2,r2,r4 ID * 7 00196cf8: 00021180 sll r2,r2,0x06 ID * 448 00196cfc: 3c038019 lui r3,0x8019 00196d00: 246308cc addiu r3,r3,0x08cc 00196d04: 00432821 addu r5,r2,r3 r5 = Unit's Data Pointer 00196d08: 90a30001 lbu r3,0x0001(r5) Load Unit's ID 00196d0c: 340200ff ori r2,r0,0x00ff 00196d10: 10620025 beq r3,r2,0x00196da8 Branch if Unit doesn't exist 00196d14: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail) 00196d18: 94a20058 lhu r2,0x0058(r5) Load Current Statuses 1+2 00196d1c: 00000000 nop 00196d20: 30420140 andi r2,r2,0x0140 00196d24: 14400020 bne r2,r0,0x00196da8 Branch if Unit has Crystal/Treasure 00196d28: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail) 00196d2c: 90a30182 lbu r3,0x0182(r5) Load Unit's Mount Info 00196d30: 00000000 nop 00196d34: 30620040 andi r2,r3,0x0040 00196d38: 1440001b bne r2,r0,0x00196da8 Branch if Unit is a Mount 00196d3c: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail) 00196d40: 00041100 sll r2,r4,0x04 ID * 16 00196d44: 00461021 addu r2,r2,r6 00196d48: 90421834 lbu r2,0x1834(r2) Load ? 00196d4c: 00000000 nop 00196d50: 10400015 beq r2,r0,0x00196da8 Branch if ? = 0 00196d54: 00001021 addu r2,r0,r0 r2 = 0 (Success) 00196d58: 90a2005a lbu r2,0x005a(r5) Load Current Statuses 3 00196d5c: 00000000 nop 00196d60: 30420010 andi r2,r2,0x0010 00196d64: 1040000f beq r2,r0,0x00196da4 Branch if Unit isn't Transparent 00196d68: 30620080 andi r2,r3,0x0080 00196d6c: 1040000b beq r2,r0,0x00196d9c Branch if Unit isn't Riding a unit 00196d70: 3062000f andi r2,r3,0x000f r2 = Mount ID 00196d74: 000218c0 sll r3,r2,0x03 ID * 8 00196d78: 00621823 subu r3,r3,r2 ID * 7 00196d7c: 00031980 sll r3,r3,0x06 ID * 448 00196d80: 3c018019 lui r1,0x8019 00196d84: 00230821 addu r1,r1,r3 00196d88: 90220926 lbu r2,0x0926(r1) Load Mount's Current Statuses 3 00196d8c: 00000000 nop 00196d90: 30420010 andi r2,r2,0x0010 *Is this supposed to be a beq? Makes more sense for both being invisible failing* 00196d94: 14400004 bne r2,r0,0x00196da8 Branch if Mount is Transparent 00196d98: 00001021 addu r2,r0,r0 r2 = 0 (Success) 00196d9c: 08065b6a j 0x00196da8 00196da0: 34020001 ori r2,r0,0x0001 r2 = 1 (Fail) 00196da4: 00001021 addu r2,r0,r0 r2 = 0 (Success) 00196da8: 03e00008 jr r31 00196dac: 00000000 nop