Determine Status Bubble Activation Byte

From Final Fantasy Hacktics Wiki
Revision as of 01:00, 17 October 2016 by Glain (talk | contribs) (Created page with " # ROUTINE: DETERMINE STATUS BUBBLE ACTIVATION BYTE # Parameters: # r4 = [Unit misc data pointer] 00082508: 3c031fff lui r3,0x1fff 0008250c: 8c82...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
#   ROUTINE: DETERMINE STATUS BUBBLE ACTIVATION BYTE
#       Parameters:
#           r4 = [Unit misc data pointer]      

00082508: 3c031fff lui r3,0x1fff
0008250c: 8c820140 lw r2,0x0140(r4)             #   Status Flags 1 to 4
00082510: 3463c2c4 ori r3,r3,0xc2c4             #   Status flags mask: 0x1fffc2c4
00082514: 00431024 and r2,r2,r3                 #           Check for statuses: 
                                                #               (Byte 4, mask 0x1f): Reraise, Darkness, Death Sentence, Silence, Charm
                                                #               (Byte 3, mask 0xff): Oil, Poison, Protect, Shell, Don't Act, Don't Move, Blood Suck, Innocent
                                                #               (Byte 2, mask 0xc2): Faith, Berserk, Charging
                                                #               (Byte 1, mask 0xc4): Confusion, Sleep, Dead (KO)
00082518: 14400007 bne r2,r0,0x00082538
0008251c: 34020001 ori r2,r0,0x0001
                                                #   if ((At least one checked status was present)
00082520: 90830004 lbu r3,0x0004(r4)            #       (Unit Misc ID?)
00082524: 3c028009 lui r2,0x8009
00082528: 8c426118 lw r2,0x6118(r2)             #       (Casting Unit's ID?)
0008252c: 00000000 nop
00082530: 14620004 bne r3,r2,0x00082544         #       or ((Unit Misc ID?) == (Casting Unit's ID?))
00082534: 34020001 ori r2,r0,0x0001
                                                #   {
00082538: a08202dc sb r2,0x02dc(r4)             #       [Status Bubble Activation Byte] = 1       
0008253c: 08020952 j 0x00082548
00082540: a48002e0 sh r0,0x02e0(r4)             #       Timer? (Counter) = 0
                                                #   } else {
00082544: a08002dc sb r0,0x02dc(r4)             #       [Status Bubble Activation Byte] = 0
                                                #   }
00082548: 03e00008 jr r31
0008254c: 00000000 nop