Store some ENTD Data(War Trophy, gil), party level calculation
(Redirected from 00180e00 - 00180f3c)
Jump to navigation
Jump to search
Store some ENTD Data(War Trophy, gil), party level calculation 180e00: 00180e00 - 00180f3c
Duplicated here : Find_War_Trophies_and_Bonus_Money 00180e00: 00004021 addu r8,r0,r0 00180e04: 00004821 addu r9,r0,r0 00180e08: 340a0063 ori r10,r0,0x0063 r10 = (0x63) 99 00180e0c: 00002821 addu r5,r0,r0 00180e10: 340b00ff ori r11,r0,0x00ff r11 = (0xFF) 255 00180e14: 3c068019 lui r6,0x8019 00180e18: 24c608cc addiu r6,r6,0x08cc 00180e1c: 00803821 addu r7,r4,r0 00180e20: 90c20183 lbu r2,0x0183(r6) Load Dealing with unit's ability to appear in battle? 00180e24: 00000000 nop 00180e28: 104b001b beq r2,r11,0x00180e98 Branch if unit not present? 00180e2c: 00000000 nop 00180e30: 10400019 beq r2,r0,0x00180e98 Branch if unit not present? 00180e34: 00000000 nop 00180e38: 90c30163 lbu r3,0x0163(r6) Load War Trophy 00180e3c: 00000000 nop 00180e40: 10600004 beq r3,r0,0x00180e54 Branch if War Trophy == 0x0 00180e44: 00000000 nop 00180e48: a0e30000 sb r3,0x0000(r7) Store War Trophy into 0x0 00180e4c: 24e70001 addiu r7,r7,0x0001 00180e50: 25080001 addiu r8,r8,0x0001 00180e54: 90c20164 lbu r2,0x0164(r6) Load Bonus Money Mod (* 100 = Gil) 00180e58: 00000000 nop 00180e5c: 00021840 sll r3,r2,0x01 Shift left 1 bits (*0x2) (*2) 00180e60: 00621821 addu r3,r3,r2 00180e64: 000318c0 sll r3,r3,0x03 Bonus Money Mod (* 0x18 (* 24) 00180e68: 00621821 addu r3,r3,r2 00180e6c: 00031880 sll r3,r3,0x02 Bonus Money Mod (* 0x64 (* 100) 00180e70: 90c20002 lbu r2,0x0002(r6) Load Party ID 00180e74: 00000000 nop 00180e78: 104b0007 beq r2,r11,0x00180e98 Branch if Party ID == FF (255) 00180e7c: 01234821 addu r9,r9,r3 00180e80: 90c30022 lbu r3,0x0022(r6) Load Level 00180e84: 00000000 nop 00180e88: 006a102b sltu r2,r3,r10 Set if Level < 63 (99) 00180e8c: 10400002 beq r2,r0,0x00180e98 Branch if not 00180e90: 00000000 nop 00180e94: 00605021 addu r10,r3,r0 00180e98: 24a50001 addiu r5,r5,0x0001 00180e9c: 28a20015 slti r2,r5,0x0015 Set if 0x1 < 21 00180ea0: 1440ffdf bne r2,r0,0x00180e20 Branch if so 00180ea4: 24c601c0 addiu r6,r6,0x01c0 00180ea8: 01002821 addu r5,r8,r0 00180eac: 28a20015 slti r2,r5,0x0015 Set if 0x1 < 21 00180eb0: 10400007 beq r2,r0,0x00180ed0 Branch if not 00180eb4: a0880015 sb r8,0x0015(r4) Store 0x1 into 0x15 00180eb8: 00a41821 addu r3,r5,r4 00180ebc: a0600000 sb r0,0x0000(r3) Store Sprite Set 00180ec0: 24a50001 addiu r5,r5,0x0001 00180ec4: 28a20015 slti r2,r5,0x0015 Set if 0x2 < 21 00180ec8: 1440fffc bne r2,r0,0x00180ebc Branch if so 00180ecc: 24630001 addiu r3,r3,0x0001 00180ed0: 3c028019 lui r2,0x8019 00180ed4: 94423844 lhu r2,0x3844(r2) Load ??? 00180ed8: ac890018 sw r9,0x0018(r4) Store Bonus Money Mod (* 0x64 (* 100) + 0 into 0x18 00180edc: 00021840 sll r3,r2,0x01 Shift left 1 bits (*0x2) (*2) 00180ee0: 00621821 addu r3,r3,r2 00180ee4: 000318c0 sll r3,r3,0x03 * 0x18 (* 24) 00180ee8: 00621821 addu r3,r3,r2 00180eec: 3c028019 lui r2,0x8019 00180ef0: 90423898 lbu r2,0x3898(r2) Load 0193898 00180ef4: 00031880 sll r3,r3,0x02 * 0x64 (* 100) 00180ef8: 14400007 bne r2,r0,0x00180f18 Branch if 0193898 != 0x0 00180efc: ac83001c sw r3,0x001c(r4) Store * 0x64 (* 100) into 0x1C 00180f00: 3c038019 lui r3,0x8019 00180f04: 90633920 lbu r3,0x3920(r3) Load ??? 00180f08: 314500ff andi r5,r10,0x00ff Mask second byte 00180f0c: 00a3102b sltu r2,r5,r3 Set if Level < ??? 00180f10: 14400003 bne r2,r0,0x00180f20 Branch if so 00180f14: 00651823 subu r3,r3,r5 00180f18: 080603ce j 0x00180f38 00180f1c: ac800020 sw r0,0x0020(r4) Store 0x0 into 0x20 00180f20: 00031040 sll r2,r3,0x01 Shift left 1 bits (*0x2) (*2) 00180f24: 00431021 addu r2,r2,r3 00180f28: 000210c0 sll r2,r2,0x03 + - Level * 0x10 (* 16) 00180f2c: 00431021 addu r2,r2,r3 00180f30: 00021080 sll r2,r2,0x02 Tile Data * 0x40 (* 64) 00180f34: ac820020 sw r2,0x0020(r4) Store * 0x40 (* 64) into 0x20 00180f38: 03e00008 jr r31 Jump to Address 00180f3c: 00000000 nop