BUNIT.OUT Unit List Display
Jump to navigation
Jump to search
This is found in event/bunit.out, 0x00007e08 - 0x00007f44
[0x00007e08] addiu r29,r29,-0x0038 [0x00007e0c] sw r21,0x002c(r29) [0x00007e10] addu r21,r6,r0 [0x00007e14] sw r17,0x001c(r29) [0x00007e18] addu r17,r0,r0 [0x00007e1c] sw r18,0x0020(r29) [0x00007e20] addu r18,r0,r0 [0x00007e24] sw r16,0x0018(r29) [0x00007e28] addu r16,r0,r0 [0x00007e2c] sw r20,0x0028(r29) [0x00007e30] lui r20,0x801f [0x00007e34] addiu r20,r20,-0x4d80 [0x00007e38] sw r19,0x0024(r29) [0x00007e3c] addu r19,r0,r0 [0x00007e40] sw r31,0x0030(r29) [0x00007e44] jal 0x00180afc Get Unit's Data Pointer [0x00007e48] addu r4,r16,r0 [0x00007e4c] addu r4,r2,r0 [0x00007e50] beq r4,r0,0x00007ed4 [0x00007e54] ori r2,r0,0x00ff [0x00007e58] lbu r3,0x0001(r4) Load unit ID [0x00007e5c] nop [0x00007e60] beq r3,r2,0x00007ed4 Branch if unit doesn't exist [0x00007e64] nop [0x00007e68] lbu r2,0x0006(r4) Load gender byte [0x00007e6c] nop [0x00007e70] andi r2,r2,0x0004 [0x00007e74] beq r2,r0,0x00007e84 Branch if not ??? stats [0x00007e78] nop [0x00007e7c] j 0x001c6ed4 [0x00007e80] addiu r18,r18,0x0001 [0x00007e84] lbu r2,0x0058(r4) Current status 1 [0x00007e88] nop [0x00007e8c] andi r2,r2,0x0040 [0x00007e90] bne r2,r0,0x00007ed4 Branch if crystal [0x00007e94] nop [0x00007e98] lbu r2,0x0059(r4) Current status 2 [0x00007e9c] nop [0x00007ea0] andi r2,r2,0x0001 [0x00007ea4] bne r2,r0,0x00007ed4 Branch if treasure [0x00007ea8] nop [0x00007eac] addiu r18,r18,0x0001 [0x00007eb0] lui r5,0x801f [0x00007eb4] addiu r5,r5,-0x4d50 [0x00007eb8] addu r5,r19,r5 [0x00007ebc] jal 0x001c6854 [0x00007ec0] addu r6,r17,r0 [0x00007ec4] sh r17,0x0000(r20) [0x00007ec8] addiu r20,r20,0x0002 [0x00007ecc] addiu r19,r19,0x010c [0x00007ed0] addiu r17,r17,0x0001 [0x00007ed4] addiu r16,r16,0x0001 [0x00007ed8] slti r2,r16,0x0015 [0x00007edc] bne r2,r0,0x00007e44 [0x00007ee0] nop [0x00007ee4] blez r17,0x00007f0c [0x00007ee8] addu r16,r0,r0 [0x00007eec] addu r3,r0,r0 [0x00007ef0] lui r1,0x801f [0x00007ef4] addu r1,r1,r3 [0x00007ef8] sh r18,-0x4d4a(r1) [0x00007efc] addiu r16,r16,0x0001 [0x00007f00] slt r2,r16,r17 [0x00007f04] bne r2,r0,0x00007ef0 [0x00007f08] addiu r3,r3,0x010c [0x00007f0c] lui r1,0x801f [0x00007f10] sh r17,-0x4d54(r1) [0x00007f14] jal 0x001c6f48 [0x00007f18] addu r4,r21,r0 [0x00007f1c] addu r2,r17,r0 [0x00007f20] lw r31,0x0030(r29) [0x00007f24] lw r21,0x002c(r29) [0x00007f28] lw r20,0x0028(r29) [0x00007f2c] lw r19,0x0024(r29) [0x00007f30] lw r18,0x0020(r29) [0x00007f34] lw r17,0x001c(r29) [0x00007f38] lw r16,0x0018(r29) [0x00007f3c] addiu r29,r29,0x0038 [0x00007f40] jr r31 [0x00007f44] nop