Set Exp/JP Display Data and get Palette
Jump to navigation
Jump to search
000808b8: 27bdffb0 addiu r29,r29,0xffb0 000808bc: afb30044 sw r19,0x0044(r29) 000808c0: 00809821 addu r19,r4,r0 r19 = Unit's Misc Data Pointer? 000808c4: afb1003c sw r17,0x003c(r29) 000808c8: afbf004c sw r31,0x004c(r29) 000808cc: afb40048 sw r20,0x0048(r29) 000808d0: afb20040 sw r18,0x0040(r29) 000808d4: afb00038 sw r16,0x0038(r29) 000808d8: 8e6301b8 lw r3,0x01b8(r19) Load Display Flags? 000808dc: 3c020200 lui r2,0x0200 000808e0: 00621024 and r2,r3,r2 000808e4: 1040000f beq r2,r0,0x00080924 Branch if not displaying Earned Exp 000808e8: 267102bc addiu r17,r19,0x02bc r17 = Unit Misc Data Pointer? + 0x2bc 000808ec: 3c04fdff lui r4,0xfdff 000808f0: 926301b0 lbu r3,0x01b0(r19) Load Earned Experience 000808f4: 34020040 ori r2,r0,0x0040 r2 = 40 000808f8: a66202be sh r2,0x02be(r19) Store Display Type? = Display Gained Exp 000808fc: 34020001 ori r2,r0,0x0001 r2 = 1 00080900: a26202bc sb r2,0x02bc(r19) Store ? = 1 00080904: 8e6201b8 lw r2,0x01b8(r19) Load Display Flags? 00080908: 3484ffff ori r4,r4,0xffff 0008090c: a66302c0 sh r3,0x02c0(r19) Store Number to Display = Experience 00080910: 966302c2 lhu r3,0x02c2(r19) Load ? 00080914: 00441024 and r2,r2,r4 00080918: ae6201b8 sw r2,0x01b8(r19) Store Display Flags? with Exp Disabled 0008091c: 08020278 j 0x000809e0 00080920: 2c630016 sltiu r3,r3,0x0016 00080924: 3c020400 lui r2,0x0400 00080928: 00621024 and r2,r3,r2 0008092c: 1040000e beq r2,r0,0x00080968 Branch if not displaying Earned JP 00080930: 3c04fbff lui r4,0xfbff 00080934: 926301b1 lbu r3,0x01b1(r19) Load Earned JP 00080938: 34020050 ori r2,r0,0x0050 r2 = 50 0008093c: a66202be sh r2,0x02be(r19) Store Display Type? = Display Gained JP 00080940: 34020001 ori r2,r0,0x0001 r2 = 1 00080944: a26202bc sb r2,0x02bc(r19) Store ? = 1 00080948: 8e6201b8 lw r2,0x01b8(r19) Load Display Flags? 0008094c: 3484ffff ori r4,r4,0xffff 00080950: a66302c0 sh r3,0x02c0(r19) Store Number to Display = Earned JP 00080954: 966302c2 lhu r3,0x02c2(r19) Load ? 00080958: 00441024 and r2,r2,r4 0008095c: ae6201b8 sw r2,0x01b8(r19) Store Display Flags? with JP Disabled 00080960: 08020278 j 0x000809e0 00080964: 2c630016 sltiu r3,r3,0x0016 00080968: 3c020800 lui r2,0x0800 0008096c: 00621024 and r2,r3,r2 00080970: 10400004 beq r2,r0,0x00080984 Branch if ? doesn't have 0x8000000 00080974: 3c04f7ff lui r4,0xf7ff 00080978: 3484ffff ori r4,r4,0xffff Disable 0x8000000 0008097c: 08020270 j 0x000809c0 00080980: 340200e0 ori r2,r0,0x00e0 r2 = e0 00080984: 3c021000 lui r2,0x1000 00080988: 00621024 and r2,r3,r2 0008098c: 10400004 beq r2,r0,0x000809a0 Branch if ? doesn't have 0x10000000 00080990: 3c04efff lui r4,0xefff 00080994: 3484ffff ori r4,r4,0xffff Disable 0x10000000 00080998: 08020270 j 0x000809c0 0008099c: 340200f0 ori r2,r0,0x00f0 r2 = f0 000809a0: 3c022000 lui r2,0x2000 000809a4: 00621024 and r2,r3,r2 000809a8: 14400003 bne r2,r0,0x000809b8 Branch if ? has 0x20000000 000809ac: 3c04dfff lui r4,0xdfff Disable 0x20000000 000809b0: 080203c8 j 0x00080f20 000809b4: 00001021 addu r2,r0,r0 r2 = 0 000809b8: 3484ffff ori r4,r4,0xffff 000809bc: 34020100 ori r2,r0,0x0100 r2 = 100 000809c0: a66202be sh r2,0x02be(r19) Store Display Type? 000809c4: 34020001 ori r2,r0,0x0001 r2 = 1 000809c8: a26202bc sb r2,0x02bc(r19) ? = 1 (displaying something?) 000809cc: 8e6201b8 lw r2,0x01b8(r19) Load Display Flags? 000809d0: 966302c2 lhu r3,0x02c2(r19) Load ? 000809d4: 00441024 and r2,r2,r4 000809d8: 2c630016 sltiu r3,r3,0x0016 000809dc: ae6201b8 sw r2,0x01b8(r19) Store new Display Flags? 000809e0: 14600003 bne r3,r0,0x000809f0 Branch if ? < 0x16 000809e4: 3c061062 lui r6,0x1062 000809e8: 34020015 ori r2,r0,0x0015 r2 = 0x15 (cap) 000809ec: a66202c2 sh r2,0x02c2(r19) Store ? capped at 0x15 000809f0: 8e250008 lw r5,0x0008(r17) Load Numerical? Display Pointer 1 000809f4: 8e24000c lw r4,0x000c(r17) Load Numerical? Display Pointer 2 000809f8: 8e230010 lw r3,0x0010(r17) Load Numerical? Display Pointer 3 000809fc: 34020096 ori r2,r0,0x0096 Red = 0x96 (150) 00080a00: a0620000 sb r2,0x0000(r3) Store Red Shading = 150 00080a04: a0820000 sb r2,0x0000(r4) Store Red Shading = 150 00080a08: a0a20000 sb r2,0x0000(r5) Store Red Shading = 150 00080a0c: 8e250008 lw r5,0x0008(r17) Load Numerical? Display Pointer 1 00080a10: 8e24000c lw r4,0x000c(r17) Load Numerical? Display Pointer 2 00080a14: 8e230010 lw r3,0x0010(r17) Load Numerical? Display Pointer 3 00080a18: 3402008c ori r2,r0,0x008c Green = 8c (140) 00080a1c: a0620001 sb r2,0x0001(r3) Store Green Shading = 140 00080a20: a0820001 sb r2,0x0001(r4) Store Green Shading = 140 00080a24: a0a20001 sb r2,0x0001(r5) Store Green Shading = 140 00080a28: 8e250008 lw r5,0x0008(r17) Load Numerical? Display Pointer 1 00080a2c: 8e24000c lw r4,0x000c(r17) Load Numerical? Display Pointer 2 00080a30: 8e230010 lw r3,0x0010(r17) Load Numerical? Display Pointer 3 00080a34: 34020014 ori r2,r0,0x0014 Blue = 0x14 (20) 00080a38: a0620002 sb r2,0x0002(r3) Store Blue Shading = 20 00080a3c: a0820002 sb r2,0x0002(r4) Store Blue Shading = 20 00080a40: a0a20002 sb r2,0x0002(r5) Store Blue Shading = 20 00080a44: 96240004 lhu r4,0x0004(r17) Load Number to Display 00080a48: 34c64dd3 ori r6,r6,0x4dd3 00080a4c: 00860019 multu r4,r6 Number * 0.064 00080a50: 00001010 mfhi r2 r2 = Number * 0.0064 00080a54: 00021182 srl r2,r2,0x06 Number / 1000 00080a58: 3042ffff andi r2,r2,0xffff 00080a5c: 10400005 beq r2,r0,0x00080a74 Branch if Number / 1000 = 0 (< 1000) 00080a60: 34020009 ori r2,r0,0x0009 r2 = 9 00080a64: afa20030 sw r2,0x0030(r29) Number's 100's digit = 9 00080a68: afa2002c sw r2,0x002c(r29) Number's 10's digit = 9 00080a6c: 080202bf j 0x00080afc 00080a70: afa20028 sw r2,0x0028(r29) Number's 1's digit = 9 (999 draw cap) 00080a74: 3c05cccc lui r5,0xcccc 00080a78: 34a5cccd ori r5,r5,0xcccd 00080a7c: 00850019 multu r4,r5 Number * 0.8 00080a80: 00001810 mfhi r3 r3 = Number * 0.8 00080a84: 000318c2 srl r3,r3,0x03 Number / 10 00080a88: 00031080 sll r2,r3,0x02 (Number / 10) * 4 00080a8c: 00431021 addu r2,r2,r3 (Number / 10) * 5 00080a90: 00021040 sll r2,r2,0x01 (Number / 10) * 10 00080a94: 00821023 subu r2,r4,r2 Number - (Number / 10) * 10 (remove ones) 00080a98: 3042ffff andi r2,r2,0xffff 00080a9c: afa20028 sw r2,0x0028(r29) Store Number's one's digit 00080aa0: 96220004 lhu r2,0x0004(r17) Load Number to Display 00080aa4: 00000000 nop 00080aa8: 00450019 multu r2,r5 Number * 0.8 00080aac: 00002010 mfhi r4 r4 = Number * 0.8 00080ab0: 000420c2 srl r4,r4,0x03 Number / 10 00080ab4: 3084ffff andi r4,r4,0xffff 00080ab8: 00850019 multu r4,r5 (Number / 10) * 0.8 00080abc: 3c0551eb lui r5,0x51eb 00080ac0: 00001810 mfhi r3 r3 = (Number / 10) * 0.8 00080ac4: 000318c2 srl r3,r3,0x03 (Number / 10) / 10 00080ac8: 00031080 sll r2,r3,0x02 ((Number / 10) / 10) * 4 00080acc: 00431021 addu r2,r2,r3 ((Number / 10) / 10) * 5 00080ad0: 00021040 sll r2,r2,0x01 ((Number / 10) / 10) * 10 00080ad4: 00822023 subu r4,r4,r2 (Number / 10) - ((Number / 10) / 10) * 10 00080ad8: 3084ffff andi r4,r4,0xffff 00080adc: afa4002c sw r4,0x002c(r29) Store Number's 10's digit 00080ae0: 96220004 lhu r2,0x0004(r17) Load Number to Display 00080ae4: 34a5851f ori r5,r5,0x851f 00080ae8: 00450019 multu r2,r5 Number * 0.32 00080aec: 00001010 mfhi r2 r2 = Number * 0.32 00080af0: 00021142 srl r2,r2,0x05 Number / 100 00080af4: 3042ffff andi r2,r2,0xffff 00080af8: afa20030 sw r2,0x0030(r29) Store Number's 100's digit 00080afc: 00002821 addu r5,r0,r0 Section Counter = 0 00080b00: 2406ffeb addiu r6,r0,0xffeb X Shift = -0x15 00080b04: 8e300008 lw r16,0x0008(r17) Load Numerical? Display Pointer 1 00080b08: 8e32000c lw r18,0x000c(r17) Load Numerical? Display Pointer 2 00080b0c: 8e340010 lw r20,0x0010(r17) Load Numerical? Display Pointer 3 00080b10: 34070010 ori r7,r0,0x0010 Y Shift = 0x10 00080b14: afa00010 sw r0,0x0010(r29) Store X Location = 0 00080b18: afa00014 sw r0,0x0014(r29) Store Y Location = 0 00080b1c: afa00018 sw r0,0x0018(r29) Store Image Width = 0 00080b20: afa0001c sw r0,0x001c(r29) Store Image Height = 0 00080b24: afa00020 sw r0,0x0020(r29) Store Y Location byte 2? = 0 00080b28: 0c01ed3b jal 0x0007b4ec Store Display Data 00080b2c: 02802021 addu r4,r20,r0 r4 = Numerical? Display Pointer 3 00080b30: 02402021 addu r4,r18,r0 r4 = Numerical? Display Pointer 2 00080b34: 00002821 addu r5,r0,r0 Section Counter = 0 00080b38: 2406ffeb addiu r6,r0,0xffeb X Shift = -0x15 00080b3c: 34070010 ori r7,r0,0x0010 Y Shift = 0x10 00080b40: afa00010 sw r0,0x0010(r29) Store X Location = 0 00080b44: afa00014 sw r0,0x0014(r29) Store Y Location = 0 00080b48: afa00018 sw r0,0x0018(r29) Store Image Width = 0 00080b4c: afa0001c sw r0,0x001c(r29) Store Image Height = 0 00080b50: 0c01ed3b jal 0x0007b4ec Store Display Data 00080b54: afa00020 sw r0,0x0020(r29) Store Y Location Byte 2? = 0 00080b58: 96220002 lhu r2,0x0002(r17) Load Display Type? 00080b5c: 00000000 nop 00080b60: 304301ff andi r3,r2,0x01ff 00080b64: 340200e0 ori r2,r0,0x00e0 r2 = e0 00080b68: 106200b4 beq r3,r2,0x00080e3c Branch if Displaying "No Target" 00080b6c: 02002021 addu r4,r16,r0 r4 = Load Numerical? Display Pointer 1 00080b70: 286200e1 slti r2,r3,0x00e1 00080b74: 10400007 beq r2,r0,0x00080b94 Branch if Displaying "Silenced"/"No MP" 00080b78: 34020040 ori r2,r0,0x0040 r2 = 0x40 00080b7c: 1062000d beq r3,r2,0x00080bb4 Branch if Displaying Gained Exp 00080b80: 34020050 ori r2,r0,0x0050 r2 = 0x50 00080b84: 1062005c beq r3,r2,0x00080cf8 Branch if Displaying Gained JP 00080b88: 00000000 nop 00080b8c: 080203c1 j 0x00080f04 00080b90: 00000000 nop 00080b94: 340200f0 ori r2,r0,0x00f0 r2 = 0xf0 00080b98: 106200b8 beq r3,r2,0x00080e7c Branch if Displaying "Silenced" 00080b9c: 02002021 addu r4,r16,r0 r4 = Load Numerical? Display Pointer 1 00080ba0: 34020100 ori r2,r0,0x0100 00080ba4: 106200c5 beq r3,r2,0x00080ebc Branch if Displaying "No MP" 00080ba8: 00002821 addu r5,r0,r0 Section Counter = 0 00080bac: 080203c1 j 0x00080f04 00080bb0: 00000000 nop 00080bb4: 8fa2002c lw r2,0x002c(r29) Load Number's 10's Digit 00080bb8: 00000000 nop 00080bbc: 14400020 bne r2,r0,0x00080c40 Branch if Number >= 10 00080bc0: 02002021 addu r4,r16,r0 r4 = Load Numerical? Display Pointer 1