Apply Staged Status Data To Unit

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: APPLY STAGED STATUS DATA TO UNIT
#       Applies status data to a unit from earlier staged status data.
#       Parameters:
#           r4 = (battleUnitIndex) Battle unit index
#           r5 = (unitMiscID) Unit Misc ID

801488a8: 27bdffc8 addiu r29,r29,-0x0038
801488ac: afb50024 sw r21,0x0024(r29)
801488b0: 0080a821 addu r21,r4,r0                   #   battleUnitIndex
801488b4: afb7002c sw r23,0x002c(r29)
801488b8: 00a0b821 addu r23,r5,r0                   #   unitMiscID
801488bc: afbf0030 sw r31,0x0030(r29)
801488c0: afb60028 sw r22,0x0028(r29)
801488c4: afb40020 sw r20,0x0020(r29)
801488c8: afb3001c sw r19,0x001c(r29)
801488cc: afb20018 sw r18,0x0018(r29)
801488d0: afb10014 sw r17,0x0014(r29)
801488d4: 0c050ad7 jal 0x80142b5c                   #   result = 0x142b5c ();
801488d8: afb00010 sw r16,0x0010(r29)
801488dc: 30428000 andi r2,r2,0x8000                #   result & 0x8000
801488e0: 144000f1 bne r2,r0,0x80148ca8             #   if (result & 0x8000) return;
801488e4: 00000000 nop
801488e8: 3c028017 lui r2,0x8017
801488ec: 8c423c78 lw r2,0x3c78(r2)                 #   *0x80173c78
801488f0: 00000000 nop
801488f4: 00551021 addu r2,r2,r21                   #   *0x80173c78 + battleUnitIndex
801488f8: 9043039c lbu r3,0x039c(r2)                #   testValue = *(*0x80173c78 + battleUnitIndex + 0x39c)
801488fc: 34020001 ori r2,r0,0x0001                 #   1
80148900: 146200e9 bne r3,r2,0x80148ca8             #   if (testValue != 1) return;
80148904: 00000000 nop
80148908: 0c0602bf jal 0x80180afc                   #   battleUnit = Get Unit's Data Pointer (battleUnitIndex);
8014890c: 02a02021 addu r4,r21,r0
80148910: 0040a021 addu r20,r2,r0                   #   battleUnit
80148914: 00008021 addu r16,r0,r0                   #   statusByteIndex = 0
80148918: 00151080 sll r2,r21,0x02                  #   battleUnitIndex * 4
8014891c: 00553821 addu r7,r2,r21                   #   battleUnitIndex * 5
80148920: 02903021 addu r6,r20,r16                  #   (battleUnit + statusByteIndex)
                                                    #   do {
80148924: 3c028017 lui r2,0x8017
80148928: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
8014892c: 90c30058 lbu r3,0x0058(r6)                #       battleUnit.currentStatus[statusByteIndex]
80148930: 00e21021 addu r2,r7,r2                    #       *0x80173c78 + (battleUnitIndex * 5)
80148934: 244401a4 addiu r4,r2,0x01a4               #       *0x80173c78 + (battleUnitIndex * 5) + 0x1a4
80148938: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex
8014893c: 90420069 lbu r2,0x0069(r2)                #       value = *(*0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex + 0x69)
80148940: 00902021 addu r4,r4,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex
80148944: 00621826 xor r3,r3,r2                     #       newValue = battleUnit.currentStatus[statusByteIndex] XOR value
80148948: a0830000 sb r3,0x0000(r4)                 #       *(*0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex) = newValue
8014894c: 3c028017 lui r2,0x8017
80148950: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
80148954: 00000000 nop
80148958: 00e21021 addu r2,r7,r2                    #       *0x80173c78 + (battleUnitIndex * 5)
8014895c: 2445013b addiu r5,r2,0x013b               #       *0x80173c78 + (battleUnitIndex * 5) + 0x13b
80148960: 00b02821 addu r5,r5,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + 0x13b + statusByteIndex
80148964: 00501821 addu r3,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
80148968: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
8014896c: 906301a4 lbu r3,0x01a4(r3)                #       value1 = *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x1a4)
80148970: 90440069 lbu r4,0x0069(r2)                #       value2 = *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x069)
80148974: 90a20000 lbu r2,0x0000(r5)                #       value3 = *(*0x80173c78 + (battleUnitIndex * 5) + 0x13b + statusByteIndex)
80148978: 00641824 and r3,r3,r4                     #       value1 & value2
8014897c: 00431025 or r2,r2,r3                      #       value3 | (value1 & value2)
80148980: a0a20000 sb r2,0x0000(r5)                 #       *(*0x80173c78 + (battleUnitIndex * 5) + 0x13b + statusByteIndex) = value3 | (value1 & value2)
80148984: 3c028017 lui r2,0x8017
80148988: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
8014898c: 90c40058 lbu r4,0x0058(r6)                #       battleUnit.currentStatus[statusByteIndex]
80148990: 00e21021 addu r2,r7,r2                    #       *0x80173c78 + (battleUnitIndex * 5)
80148994: 244201a4 addiu r2,r2,0x01a4               #       *0x80173c78 + (battleUnitIndex * 5) + 0x1a4
80148998: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex
8014899c: 90430000 lbu r3,0x0000(r2)                #       value = *(*0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex)
801489a0: 26100001 addiu r16,r16,0x0001             #       statusByteIndex = statusByteIndex + 1
801489a4: 00641824 and r3,r3,r4                     #       value & battleUnit.currentStatus[statusByteIndex]
801489a8: a0430000 sb r3,0x0000(r2)                 #       *(*0x80173c78 + (battleUnitIndex * 5) + 0x1a4 + statusByteIndex) = value
801489ac: 2a020005 slti r2,r16,0x0005                      
801489b0: 1440ffdc bne r2,r0,0x80148924
801489b4: 02903021 addu r6,r20,r16                  #       (battleUnit + statusByteIndex)
                                                    #   } while (statusByteIndex < 5);
801489b8: 00008021 addu r16,r0,r0                   #   statusByteIndex = 0
801489bc: 00151080 sll r2,r21,0x02                  #   battleUnitIndex * 4  
801489c0: 00552021 addu r4,r2,r21                   #   battleUnitIndex * 5
                                                    #   do {
801489c4: 3c028017 lui r2,0x8017
801489c8: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
801489cc: 00000000 nop
801489d0: 00821021 addu r2,r4,r2                    #       *0x80173c78 + (battleUnitIndex * 5)
801489d4: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
801489d8: 90420000 lbu r2,0x0000(r2)                #       *(0x80173c78 + (battleUnitIndex * 5) + statusByteIndex)
801489dc: 02901821 addu r3,r20,r16                  #       (battleUnit + statusByteIndex)
801489e0: a062004e sb r2,0x004e(r3)                 #       battleUnit.innateStatus[statusByteIndex] = *(0x80173c78 + (battleUnitIndex * 5) + statusByteIndex)
801489e4: 3c028017 lui r2,0x8017
801489e8: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
801489ec: 00000000 nop
801489f0: 00821021 addu r2,r4,r2                    #       *0x80173c78 + (battleUnitIndex * 5)
801489f4: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
801489f8: 904200d2 lbu r2,0x00d2(r2)                #       value = *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0xd2)
801489fc: 00000000 nop
80148a00: a06201bb sb r2,0x01bb(r3)                 #       battleUnit.inflictedStatus[statusByteIndex] = value
80148a04: 3c028017 lui r2,0x8017
80148a08: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
80148a0c: 00000000 nop
80148a10: 00821021 addu r2,r4,r2                    #       *0x80173c78 + (battleUnitIndex * 5)  
80148a14: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
80148a18: 90420069 lbu r2,0x0069(r2)                #       value = *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x69)
80148a1c: 26100001 addiu r16,r16,0x0001             #       statusByteIndex = statusByteIndex + 1
80148a20: a0620058 sb r2,0x0058(r3)                 #       battleUnit.currentStatus[statusByteIndex] = value
80148a24: 2a020005 slti r2,r16,0x0005
80148a28: 1440ffe6 bne r2,r0,0x801489c4             #   } while (statusByteIndex < 5);
80148a2c: 00000000 nop
80148a30: 00008021 addu r16,r0,r0                   #   statusCTIndex = 0
80148a34: 00152100 sll r4,r21,0x04                  #   battleUnitIndex * 16
                                                    #   do {
80148a38: 3c028017 lui r2,0x8017
80148a3c: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
80148a40: 02901821 addu r3,r20,r16                  #       (battleUnit + statusCTIndex)   
80148a44: 00821021 addu r2,r4,r2                    #       *0x80173c78 + (battleUnitIndex * 16)
80148a48: 00501021 addu r2,r2,r16                   #       *0x80173c78 + (battleUnitIndex * 16) + statusCTIndex
80148a4c: 9042020d lbu r2,0x020d(r2)                #       value = *(*0x80173c78 + (battleUnitIndex * 16) + statusCTIndex + 0x20d)
80148a50: 26100001 addiu r16,r16,0x0001             #       statusCTIndex = statusCTIndex + 1
80148a54: a062005d sb r2,0x005d(r3)                 #       unit.statusCT[statusCTIndex] = value
80148a58: 2a020010 slti r2,r16,0x0010               
80148a5c: 1440fff6 bne r2,r0,0x80148a38             #   } while (statusCTIndex < 16);
80148a60: 00151040 sll r2,r21,0x01                  #   battleUnitIndex * 2
80148a64: 3c038017 lui r3,0x8017
80148a68: 8c633c78 lw r3,0x3c78(r3)                 #   *0x80173c78
80148a6c: 00008021 addu r16,r0,r0                   #   statusIndex = 0
80148a70: 00431021 addu r2,r2,r3                    #   *0x80173c78 + (battleUnitIndex * 2)
80148a74: 944203c6 lhu r2,0x03c6(r2)                #   value = *(*0x80173c78 + (battleUnitIndex * 2) + 0x3c6)
80148a78: 00751821 addu r3,r3,r21                   #   *0x80173c78 + battleUnitIndex
80148a7c: a6820028 sh r2,0x0028(r20)                #   battleUnit.HP = value
80148a80: 90620387 lbu r2,0x0387(r3)                #   value = *0x80173c78 + battleUnitIndex + 0x387
80148a84: 34130001 ori r19,r0,0x0001                #   statusByteCounter = 1
80148a88: a2820005 sb r2,0x0005(r20)                #   battleUnit.ENTDFlags = value
80148a8c: 3c028017 lui r2,0x8017
80148a90: 8c423c78 lw r2,0x3c78(r2)                 #   *0x80173c78
80148a94: 00151880 sll r3,r21,0x02                  #   battleUnitIndex * 4
80148a98: 00551021 addu r2,r2,r21                   #   *0x80173c78 + (battleUnitIndex * 4)
80148a9c: 90420372 lbu r2,0x0372(r2)                #   value = *(*0x80173c78 + (battleUnitIndex * 4) + 0x372)
80148aa0: 0075b021 addu r22,r3,r21                  #   battleUnitIndex * 5
80148aa4: a2820007 sb r2,0x0007(r20)                #   battleUnit.deathCounter = value
80148aa8: 3c028007 lui r2,0x8007
80148aac: 24428e80 addiu r2,r2,-0x7180              #   0x80068e80
80148ab0: 3c018017 lui r1,0x8017
80148ab4: ac223ca8 sw r2,0x3ca8(r1)                 #   routine = 0x80068e80 (Special Status Flag Enabling?)
                                                    #   do {
80148ab8: 06010002 bgez r16,0x80148ac4
80148abc: 02001821 addu r3,r16,r0
80148ac0: 26030007 addiu r3,r16,0x0007
80148ac4: 000388c3 sra r17,r3,0x03                  #       statusByteIndex = statusIndex / 8
80148ac8: 001118c0 sll r3,r17,0x03
80148acc: 02031823 subu r3,r16,r3                   #       statusValue = statusIndex % 8
80148ad0: 3c028017 lui r2,0x8017
80148ad4: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
80148ad8: 34040080 ori r4,r0,0x0080                 #       0x80
80148adc: 02c21021 addu r2,r22,r2                   #       *0x80173c78 + (battleUnitIndex * 5)
80148ae0: 00511021 addu r2,r2,r17                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
80148ae4: 904201a4 lbu r2,0x01a4(r2)                #       *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x1a4)
80148ae8: 00649007 srav r18,r4,r3                   #       0x80 >> statusValue
80148aec: 00521024 and r2,r2,r18                    #       value = *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x1a4) & (0x80 >> statusValue)
80148af0: 10400004 beq r2,r0,0x80148b04             #       if (value != 0) {
80148af4: 02602021 addu r4,r19,r0                     
80148af8: 00002821 addu r5,r0,r0
80148afc: 0c0533ad jal 0x8014ceb4                   #           Call Inner Subroutine (statusByteCounter, 0, battleUnitIndex);   (routine = Special Status Flag Enabling?)
80148b00: 02a03021 addu r6,r21,r0
                                                    #       }
80148b04: 3c028017 lui r2,0x8017
80148b08: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
80148b0c: 00000000 nop
80148b10: 02c21021 addu r2,r22,r2                   #       *0x80173c78 + (battleUnitIndex * 5)
80148b14: 00511021 addu r2,r2,r17                   #       *0x80173c78 + (battleUnitIndex * 5) + statusByteIndex
80148b18: 9042013b lbu r2,0x013b(r2)                #       *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x13b)
80148b1c: 00000000 nop
80148b20: 00521024 and r2,r2,r18                    #       value = *(*0x80173c78 + (battleUnitIndex * 5) + statusByteIndex + 0x13b) & (0x80 >> statusValue)
80148b24: 10400005 beq r2,r0,0x80148b3c
80148b28: 26100001 addiu r16,r16,0x0001             #       statusIndex = statusIndex + 1
                                                    #       if (value != 0) {
80148b2c: 02602021 addu r4,r19,r0                          
80148b30: 34050001 ori r5,r0,0x0001
80148b34: 0c0533ad jal 0x8014ceb4                   #           Call Inner Subroutine (statusByteCounter, 1, battleUnitIndex);   (routine = Special Status Flag Enabling?)
80148b38: 02a03021 addu r6,r21,r0
                                                    #       }
80148b3c: 2a020028 slti r2,r16,0x0028
80148b40: 1440ffdd bne r2,r0,0x80148ab8
80148b44: 26730001 addiu r19,r19,0x0001             #       statusByteCounter = statusByteCounter + 1
                                                    #   } while (statusIndex < 40);
80148b48: 00151080 sll r2,r21,0x02                  #   battleUnitIndex * 4
80148b4c: 3c038017 lui r3,0x8017
80148b50: 8c633c78 lw r3,0x3c78(r3)                 #   *0x80173c78
80148b54: 00552021 addu r4,r2,r21                   #   battleUnitIndex * 5
80148b58: 00641021 addu r2,r3,r4                    #   *0x80173c78 + (battleUnitIndex * 5)
80148b5c: 9042013b lbu r2,0x013b(r2)                #   *(*0x80173c78 + (battleUnitIndex * 5))
80148b60: 00000000 nop
80148b64: 30420004 andi r2,r2,0x0004                #   value = *(*0x80173c78 + (battleUnitIndex * 5)) & 0x04
80148b68: 10400009 beq r2,r0,0x80148b90
80148b6c: 00641021 addu r2,r3,r4                    #   *0x80173c78 + (battleUnitIndex * 5)
                                                    #   if (value != 0) {
80148b70: 946203f0 lhu r2,0x03f0(r3)                #       origValue = *(*0x80173c78 + 0x3f0)
80148b74: 00000000 nop
80148b78: 34420001 ori r2,r2,0x0001                 #       origValue | 0x01
80148b7c: a46203f0 sh r2,0x03f0(r3)                 #       *(*0x80173c78 + 0x3f0) = origValue | 0x01
80148b80: 3c038017 lui r3,0x8017
80148b84: 8c633c78 lw r3,0x3c78(r3)                 #       *0x80173c78
80148b88: 00000000 nop
80148b8c: 00641021 addu r2,r3,r4                    #       *0x80173c78 + (battleUnitIndex * 5)
                                                    #   }
80148b90: 9042013d lbu r2,0x013d(r2)                #   *(*0x80173c78 + (battleUnitIndex * 5) + 0x13d)
80148b94: 00000000 nop
80148b98: 30420040 andi r2,r2,0x0040                #   value = *(*0x80173c78 + (battleUnitIndex * 5) + 0x13d)
80148b9c: 10400005 beq r2,r0,0x80148bb4             #   if (value != 0) {
80148ba0: 00000000 nop
80148ba4: 946203f0 lhu r2,0x03f0(r3)                #       origValue = *(*0x80173c78 + 0x3f0)      
80148ba8: 00000000 nop
80148bac: 34420002 ori r2,r2,0x0002                 #       origValue | 0x02
80148bb0: a46203f0 sh r2,0x03f0(r3)                 #       *(*0x80173c78 + 0x3f0) = origValue | 0x02
                                                    #   }
80148bb4: 3c028017 lui r2,0x8017
80148bb8: 8c423c78 lw r2,0x3c78(r2)                 #   *0x80173c78
80148bbc: 00000000 nop
80148bc0: 00551021 addu r2,r2,r21                   #   *0x80173c78 + battleUnitIndex
80148bc4: 904303b1 lbu r3,0x03b1(r2)                #   value = *(*0x80173c78 + battleUnitIndex + 0x3b1)
80148bc8: 00000000 nop
80148bcc: 1060001f beq r3,r0,0x80148c4c             #   if (value != 0) {
80148bd0: 34020003 ori r2,r0,0x0003
80148bd4: 14620006 bne r3,r2,0x80148bf0             #       if (value == 3) {
80148bd8: 34020002 ori r2,r0,0x0002
80148bdc: 928201aa lbu r2,0x01aa(r20)               #           battleUnit.actionInflictStatus[3]       // 4th set of statuses
80148be0: 00000000 nop
80148be4: 34420080 ori r2,r2,0x0080                 #           battleUnit.actionInflictStatus[3] | STATUS_POISON
80148be8: 0805230c j 0x80148c30
80148bec: a28201aa sb r2,0x01aa(r20)                #           battleUnit.actionInflictStatus[3] = battleUnit.actionInflictStatus[3] | STATUS_POISON
80148bf0: 14620006 bne r3,r2,0x80148c0c             #       } else if (value == 2) {
80148bf4: 34020001 ori r2,r0,0x0001
80148bf8: 928201a7 lbu r2,0x01a7(r20)               #           battleUnit.actionInflictStatus[0]
80148bfc: 00000000 nop
80148c00: 34420040 ori r2,r2,0x0040                 #           battleUnit.actionInflictStatus[0] | STATUS_REGEN
80148c04: 0805230c j 0x80148c30
80148c08: a28201a7 sb r2,0x01a7(r20)                #           battleUnit.actionInflictStatus[0] = battleUnit.actionInflictStatus[0] | STATUS_REGEN
80148c0c: 14620008 bne r3,r2,0x80148c30             #       } else if (value == 1) {
80148c10: 34020001 ori r2,r0,0x0001
80148c14: a6820028 sh r2,0x0028(r20)                #           battleUnit.HP = 1
80148c18: 928201a9 lbu r2,0x01a9(r20)               #           battleUnit.actionInflictStatus[2]   // 3rd set of statuses
80148c1c: 928301ac lbu r3,0x01ac(r20)               #           battleUnit.actionStatusRemoval[0]   // 1st set of statuses
80148c20: 34420001 ori r2,r2,0x0001                 #           battleUnit.actionInflictStatus[2] | STATUS_CRITICAL
80148c24: 34630020 ori r3,r3,0x0020                 #           battleUnit.actionStatusRemoval[0] | STATUS_DEAD
80148c28: a28201a9 sb r2,0x01a9(r20)                #           battleUnit.actionInflictStatus[2] = battleUnit.actionInflictStatus[2] | STATUS_CRITICAL
80148c2c: a28301ac sb r3,0x01ac(r20)                #           battleUnit.actionStatusRemoval[0] = battleUnit.actionStatusRemoval[0] | STATUS_DEAD
                                                    #       }
80148c30: 3c028019 lui r2,0x8019
80148c34: 2442e07c addiu r2,r2,-0x1f84              #       0x8018e07c
80148c38: 3c018017 lui r1,0x8017
80148c3c: ac223ca8 sw r2,0x3ca8(r1)                 #       routine = 0x8018e07c (Post Ability Hardcoding?)     // Status related
80148c40: 02a02021 addu r4,r21,r0
80148c44: 0c0533ad jal 0x8014ceb4                   #       Call Inner Subroutine (battleUnitIndex, 1);
80148c48: 34050001 ori r5,r0,0x0001
                                                    #   }
80148c4c: 92820058 lbu r2,0x0058(r20)               #   battleUnit.currentStatus[0]
80148c50: 00000000 nop
80148c54: 3042000d andi r2,r2,0x000d                #   battleUnit.currentStatus[0] & 0x0D              // Charging, Jump, Performing
80148c58: 10400006 beq r2,r0,0x80148c74             
80148c5c: 340200ff ori r2,r0,0x00ff                 #   storeValue = 0xff
                                                    #   if (!battleUnit.currentStatus[0] & 0x0D) {      // If none of those statuses are present
80148c60: 3c028017 lui r2,0x8017
80148c64: 8c423c78 lw r2,0x3c78(r2)                 #       *0x80173c78
80148c68: 00000000 nop
80148c6c: 00551021 addu r2,r2,r21                   #       *0x80173c78 + battleUnitIndex
80148c70: 9042035d lbu r2,0x035d(r2)                #       storeValue = (*0x80173c78 + battleUnitIndex + 0x35d)
80148c74: 00000000 nop                              #   }
80148c78: a282015d sb r2,0x015d(r20)                #   battleUnit.currentAbilityCT = storeValue
80148c7c: 3c028017 lui r2,0x8017
80148c80: 8c423c78 lw r2,0x3c78(r2)                 #   *0x80173c78
80148c84: 34030002 ori r3,r0,0x0002                 #   2
80148c88: 00551021 addu r2,r2,r21                   #   *0x80173c78 + battleUnitIndex
80148c8c: a043039c sb r3,0x039c(r2)                 #   *(*0x80173c78 + battleUnitIndex + 0x39c) = 2
80148c90: 3c028009 lui r2,0x8009
80148c94: 2442bde4 addiu r2,r2,-0x421c              #   0x8008bde4
80148c98: 3c018017 lui r1,0x8017
80148c9c: ac223ca8 sw r2,0x3ca8(r1)                 #   routine = 0x8008bde4 (Update Status/Sprite/Animation Display By Unit Misc ID (Wrapper Function))
80148ca0: 0c0533ad jal 0x8014ceb4                   #   Call Inner Subroutine (unitMiscID);
80148ca4: 02e02021 addu r4,r23,r0
80148ca8: 8fbf0030 lw r31,0x0030(r29)
80148cac: 8fb7002c lw r23,0x002c(r29)
80148cb0: 8fb60028 lw r22,0x0028(r29)
80148cb4: 8fb50024 lw r21,0x0024(r29)
80148cb8: 8fb40020 lw r20,0x0020(r29)
80148cbc: 8fb3001c lw r19,0x001c(r29)
80148cc0: 8fb20018 lw r18,0x0018(r29)
80148cc4: 8fb10014 lw r17,0x0014(r29)
80148cc8: 8fb00010 lw r16,0x0010(r29)
80148ccc: 27bd0038 addiu r29,r29,0x0038
80148cd0: 03e00008 jr r31
80148cd4: 00000000 nop