Check flag 0x0800 on Ability Effect

From Final Fantasy Hacktics Wiki
Revision as of 13:43, 14 January 2024 by Orkney (talk | contribs) (Orkney moved page Check if ability is Item ability to Check flag 0x0800 on Ability Effect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
BATTLE.BIN :  - Check if ability is Item ability
------------------------------------------------------------
Parameter : r4 - Ability ID
Return : r2 = 0x1 if flag 0x0800 is ON on effect

Note : Flag 0x0800 on effect make the ability effect to wait the end of the projectile animation
------------------------------------------------------------
001a1854: 00042040 sll r4,r4,0x01            |Ability ID *2
001a1858: 3c01801b lui r1,0x801b             |
001a185c: 00240821 addu r1,r1,r4             |0x801b0000 + Halfword offset based on ability ID
001a1860: 842263f0 lh r2,0x63f0(r1)          |load ability effect (signed)
001a1864: 00000000 nop                       |
001a1868: 04410002 bgez r2,0x001a1874        #If Effect ID is 0xffff (<0)
001a186c: 00000000 nop                           |
001a1870: 00021027 nor r2,r0,r2                  |Forces effect ID to 0x00
001a1874: 30420800 andi r2,r2,0x0800         |Check flag 0x0800
001a1878: 03e00008 jr r31                    |
001a187c: 0002102b sltu r2,r0,r2             |returns 1 if flag 0x0800 is ON

Return locations

BATTLE.BIN
00072c70: Set_item/throw_stone_ability_display_stuff?
00072c90: Set_item/throw_stone_ability_display_stuff?