Set Specific Animation Value From Unit Misc ID

From Final Fantasy Hacktics Wiki
Revision as of 22:49, 21 April 2022 by Glain (talk | contribs) (Created page with " # ROUTINE: SET SPECIFIC ANIMATION VALUE FROM UNIT MISC ID # Parameters: # r4 = (unitMiscID) Unit Misc ID # r5 = (animationValue) Animation valu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#   ROUTINE: SET SPECIFIC ANIMATION VALUE FROM UNIT MISC ID
#       Parameters:
#           r4 = (unitMiscID) Unit Misc ID
#           r5 = (animationValue) Animation value to apply to the unit

8008be7c: 27bdffe8 addiu r29,r29,-0x0018
8008be80: afb00010 sw r16,0x0010(r29)
8008be84: 00a08021 addu r16,r5,r0                   #   animationValue
8008be88: afbf0014 sw r31,0x0014(r29)
8008be8c: 0c01e9b9 jal 0x8007a6e4                   #   miscUnit = Get Unit Misc Data Pointer (unitMiscID);
8008be90: 3084ffff andi r4,r4,0xffff
8008be94: 10400004 beq r2,r0,0x8008bea8             #   if (miscUnit != null) {
8008be98: 02002021 addu r4,r16,r0
8008be9c: 84450070 lh r5,0x0070(r2)
8008bea0: 0c02065e jal 0x80081978                   #       Store unit animation and facing value (animationValue, miscUnit.unitFacing, miscUnit); 
8008bea4: 00403021 addu r6,r2,r0
                                                    #   }
8008bea8: 8fbf0014 lw r31,0x0014(r29)
8008beac: 8fb00010 lw r16,0x0010(r29)
8008beb0: 27bd0018 addiu r29,r29,0x0018
8008beb4: 03e00008 jr r31
8008beb8: 00000000 nop