Unit Existence/crystaltreasure check
Jump to navigation
Jump to search
00180c90: 00003821 addu r7,r0,r0 00180c94: 340800ff ori r8,r0,0x00ff 00180c98: 308600ff andi r6,r4,0x00ff r4 = ENTD ID 00180c9c: 2409fffd addiu r9,r0,0xfffd 00180ca0: 3c038019 lui r3,0x8019 00180ca4: 246308cc addiu r3,r3,0x08cc 00180ca8: 90620001 lbu r2,0x0001(r3) 00180cac: 00000000 nop 00180cb0: 1048000e beq r2,r8,0x00180cec unit exists check 00180cb4: 00000000 nop 00180cb8: 90620161 lbu r2,0x0161(r3) load ENTD ID 00180cbc: 00000000 nop 00180cc0: 1446000a bne r2,r6,0x00180cec branch if = r4 00180cc4: 00000000 nop 00180cc8: 94620058 lhu r2,0x0058(r3) 00180ccc: 00000000 nop 00180cd0: 30420140 andi r2,r2,0x0140 00180cd4: 10400003 beq r2,r0,0x00180ce4 branch if not crystal/treasure 00180cd8: 00601021 addu r2,r3,r0 r2 = unit data if not crystal/treasure 00180cdc: 0806036a j 0x00180da8 00180ce0: aca90000 sw r9,0x0000(r5) 00180ce4: 0806036a j 0x00180da8 00180ce8: aca70000 sw r7,0x0000(r5) 00180cec: 24e70001 addiu r7,r7,0x0001 00180cf0: 28e20015 slti r2,r7,0x0015 00180cf4: 1440ffec bne r2,r0,0x00180ca8 Do for all units 00180cf8: 246301c0 addiu r3,r3,0x01c0 00180cfc: 00003821 addu r7,r0,r0 00180d00: 340c00ff ori r12,r0,0x00ff 00180d04: 308400ff andi r4,r4,0x00ff r4 = ENTD ID 00180d08: 240bfffe addiu r11,r0,0xfffe 00180d0c: 34090080 ori r9,r0,0x0080 00180d10: 240afffd addiu r10,r0,0xfffd 00180d14: 34080002 ori r8,r0,0x0002 00180d18: 3c038019 lui r3,0x8019 00180d1c: 246308cc addiu r3,r3,0x08cc 00180d20: 90660001 lbu r6,0x0001(r3) 00180d24: 00000000 nop 00180d28: 14cc0018 bne r6,r12,0x00180d8c unit exists check 00180d2c: 00000000 nop 00180d30: 90620161 lbu r2,0x0161(r3) 00180d34: 00000000 nop 00180d38: 14440014 bne r2,r4,0x00180d8c branch if ENTD ID != ENTD ID input 00180d3c: 00000000 nop 00180d40: 90620183 lbu r2,0x0183(r3) 00180d44: 00000000 nop 00180d48: 10460010 beq r2,r6,0x00180d8c units ability to appear check = Unit ID 00180d4c: 00000000 nop 00180d50: 14400004 bne r2,r0,0x00180d64 00180d54: 00000000 nop 00180d58: acab0000 sw r11,0x0000(r5) 00180d5c: 0806036a j 0x00180da8 00180d60: 00601021 addu r2,r3,r0 00180d64: 14490004 bne r2,r9,0x00180d78 00180d68: 00000000 nop 00180d6c: acaa0000 sw r10,0x0000(r5) 00180d70: 0806036a j 0x00180da8 00180d74: 00601021 addu r2,r3,r0 00180d78: 14480004 bne r2,r8,0x00180d8c 00180d7c: 2402fffa addiu r2,r0,0xfffa 00180d80: aca20000 sw r2,0x0000(r5) 00180d84: 0806036a j 0x00180da8 00180d88: 00601021 addu r2,r3,r0 00180d8c: 24e70001 addiu r7,r7,0x0001 00180d90: 28e20015 slti r2,r7,0x0015 00180d94: 1440ffe2 bne r2,r0,0x00180d20 Do for all units 00180d98: 246301c0 addiu r3,r3,0x01c0 00180d9c: 2402fffd addiu r2,r0,0xfffd 00180da0: aca20000 sw r2,0x0000(r5) 00180da4: 00001021 addu r2,r0,r0 00180da8: 03e00008 jr r31 00180dac: 00000000 nop