Difference between revisions of "Check flag 0x0800 on Ability Effect"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 001a1854: 00042040 sll r4,r4,0x01 001a1858: 3c01801b lui r1,0x801b 001a185c: 00240821 addu r1,r1,r4 001a1860: 842263f0 lh r2,0x63f0(r1) load ...")
 
Line 1: Line 1:
<font face='Courier New'>
+
'''BATTLE.BIN''' :  - Check if ability is Item ability
 +
------------------------------------------------------------
 +
Parameter : r4 - Ability ID
 +
Return : r2 = 0x1 if flag 0x0800 is ON on effect
 
   
 
   
  001a1854: 00042040 sll r4,r4,0x01
+
Note : Flag 0x0800 on effect make the ability effect to wait the end of the projectile animation
  001a1858: 3c01801b lui r1,0x801b
+
------------------------------------------------------------
  001a185c: 00240821 addu r1,r1,r4
+
  001a1854: 00042040 sll r4,r4,0x01           |{{f/std|Ability ID *2}}
  001a1860: 842263f0 lh r2,0x63f0(r1) load ability effect
+
  001a1858: 3c01801b lui r1,0x801b             |
  001a1864: 00000000 nop
+
  001a185c: 00240821 addu r1,r1,r4             |{{f/std|0x801b0000 + Halfword offset based on ability ID}}
  001a1868: 04410002 bgez r2,0x001a1874 branch if >= 0
+
  001a1860: 842263f0 lh r2,0x63f0(r1)         |{{f/load|load ability effect (signed)}}
  001a186c: 00000000 nop
+
  001a1864: 00000000 nop                       |
  001a1870: 00021027 nor r2,r0,r2
+
  001a1868: 04410002 bgez r2,0x001a1874       {{f/Cond|If Effect ID is 0xffff (<0)}}
  001a1874: 30420800 andi r2,r2,0x0800 item abilities?
+
  001a186c: 00000000 nop                           |
  001a1878: 03e00008 jr r31
+
  001a1870: 00021027 nor r2,r0,r2                 |{{f/std|Forces effect ID to 0x00}}
  001a187c: 0002102b sltu r2,r0,r2 set if  
+
  001a1874: 30420800 andi r2,r2,0x0800         |{{f/std|Check flag 0x0800}}
</font>
+
  001a1878: 03e00008 jr r31                   |
 +
  001a187c: 0002102b sltu r2,r0,r2             |{{f/std|returns 1 if flag 0x0800 is ON}}
 +
===Return locations===
 +
'''BATTLE.BIN'''
 +
00072c70: [[Set_item/throw_stone_ability_display_stuff%3F]]
 +
00072c90: [[Set_item/throw_stone_ability_display_stuff%3F]]

Revision as of 13:42, 14 January 2024

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?