Process Status Bubble Display

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
#   ROUTINE: PROCESS STATUS BUBBLE DISPLAY
#       Conditionally calls the routine to display the status bubble when appropriate, after making relevant checks.
#       Parameters:
#           r4 = [Unit misc data pointer]

000865a4: 27bdffe0 addiu r29,r29,-0x0020
000865a8: afbf0018 sw r31,0x0018(r29)
000865ac: 94820120 lhu r2,0x0120(r4)                    #   MiscUnitData.0x120
000865b0: 00000000 nop
000865b4: a7a20010 sh r2,0x0010(r29)                    #   STACK[0x10] = MiscUnitData.0x120
000865b8: 2442ff9f addiu r2,r2,-0x0061                  #   MiscUnitData.0x120 - 0x61
000865bc: 94830122 lhu r3,0x0122(r4)                    #   MiscUnitData.0x122
000865c0: 2c42013f sltiu r2,r2,0x013f
000865c4: 1040001a beq r2,r0,0x00086630
000865c8: a7a30012 sh r3,0x0012(r29)                    #   STACK[0x12] = MiscUnitData.0x122
                                                        #   if ((MiscUnitData.0x120 - 0x61) >= 0x13f), return (exit the routine)
000865cc: 2462001f addiu r2,r3,0x001f                   #   MiscUnitData.0x122 + 0x1f
000865d0: 3042ffff andi r2,r2,0xffff
000865d4: 2c42012f sltiu r2,r2,0x012f
000865d8: 10400015 beq r2,r0,0x00086630
000865dc: 00000000 nop
                                                        #   if (MiscUnitData.0x122 >= 0x12f), return (exit the routine)
000865e0: 8c820128 lw r2,0x0128(r4)                     #   MiscUnitData.0x128
000865e4: 00000000 nop
000865e8: 2442ffff addiu r2,r2,-0x0001                  #   MiscUnitData.0x128 - 1
000865ec: 2c42017f sltiu r2,r2,0x017f
000865f0: 1040000f beq r2,r0,0x00086630
000865f4: 00000000 nop
                                                        #   if ((MiscUnitData.0x128 - 1) >= 0x17f), return (exit the routine)
000865f8: 948201d8 lhu r2,0x01d8(r4)                    #   Sprite Activation flag
000865fc: 00000000 nop
00086600: 1040000b beq r2,r0,0x00086630                 
00086604: 34020002 ori r2,r0,0x0002
                                                        #   if ([Sprite Activation flag] == 0), return (exit the routine)
00086608: 90830130 lbu r3,0x0130(r4)                    #   Mount/Rider value
0008660c: 00000000 nop
00086610: 10620007 beq r3,r2,0x00086630
00086614: 00000000 nop
                                                        #   if ([Mount/Rider value] == 2 (is a Mount)), return (exit the routine)
00086618: 908202dc lbu r2,0x02dc(r4)                    #   Activation byte for Status Bubble
0008661c: 00000000 nop
00086620: 10400003 beq r2,r0,0x00086630
00086624: 00000000 nop                  
                                                        #   if ([Activaton byte for Status Bubble] == 0), return (exit the routine)
                                                        
00086628: 0c01fbb0 jal 0x0007eec0                       #   ROUTINE: Display Status Bubble (r4 = [Unit misc data pointer])
0008662c: 27a50010 addiu r5,r29,0x0010

00086630: 8fbf0018 lw r31,0x0018(r29)
00086634: 27bd0020 addiu r29,r29,0x0020
00086638: 03e00008 jr r31
0008663c: 00000000 nop