Difference between revisions of "Load ability effect"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 
  Parameters : r4 = Used Ability ID
 
  Parameters : r4 = Used Ability ID
 
   
 
   
  Returns : r2 = 0x01 if Ability effect is 0xffff / Else 0x00
+
  Returns : r2 = 0x01 if Ability effect is 0xffff or flag 0x8000 is enabled/ Else 0x00
 
  -------------------------------------------------------------------------------------------------------------------------------
 
  -------------------------------------------------------------------------------------------------------------------------------
 
  001a1814: 2482fe6b addiu r2,r4,-0x0195      |{{f/std|<nowiki>r2 = Ability ID - 0x195</nowiki>}}
 
  001a1814: 2482fe6b addiu r2,r4,-0x0195      |{{f/std|<nowiki>r2 = Ability ID - 0x195</nowiki>}}
Line 14: Line 14:
 
  001a1838: 3c01801b lui r1,0x801b                {{f/Cond|Else}}
 
  001a1838: 3c01801b lui r1,0x801b                {{f/Cond|Else}}
 
  001a183c: 00220821 addu r1,r1,r2                    |{{f/std|<nowiki>r1 = 0x801b0000 + Ability Offset</nowiki>}}
 
  001a183c: 00220821 addu r1,r1,r2                    |{{f/std|<nowiki>r1 = 0x801b0000 + Ability Offset</nowiki>}}
  001a1840: 842263f0 lh r2,0x63f0(r1)                |{{f/load|<nowiki>r2 = Ability Effect</nowiki>}}    {{f/std|0x801b63f0}}
+
  001a1840: 842263f0 lh r2,0x63f0(r1)                |{{f/load|<nowiki>r2 = Ability Effect signed</nowiki>}}    {{f/std|0x801b63f0}}
 
  001a1844: 00000000 nop                              |
 
  001a1844: 00000000 nop                              |
  001a1848: 000217c2 srl r2,r2,0x1f          |{{f/std|<nowiki>r2 = 0x01 if Ability Effect is 0xffff, else 0x00</nowiki>}}
+
  001a1848: 000217c2 srl r2,r2,0x1f          |{{f/std|<nowiki>r2 = 0x01 if Ability Effect is > 0x8000, else 0x00</nowiki>}}
 
  001a184c: 03e00008 jr r31                   
 
  001a184c: 03e00008 jr r31                   
 
  001a1850: 00000000 nop                       
 
  001a1850: 00000000 nop                       

Revision as of 09:33, 1 February 2024

Parameters : r4 = Used Ability ID

Returns : r2 = 0x01 if Ability effect is 0xffff or flag 0x8000 is enabled/ Else 0x00
-------------------------------------------------------------------------------------------------------------------------------
001a1814: 2482fe6b addiu r2,r4,-0x0195      |r2 = Ability ID - 0x195
001a1818: 2c420009 sltiu r2,r2,0x0009       |r2 = 0x01 If used ability is a Charge ability (or Jump 8 ?)
001a181c: 1440000b bne r2,r0,0x001a184c     #If Used ability is not a charge ability /Else branch to END - r2 = 0x00
001a1820: 00001021 addu r2,r0,r0            |r2 = 0x00
001a1824: 34020092 ori r2,r0,0x0092             |r2 = 0x92 (Accumulate ID)
001a1828: 14820003 bne r4,r2,0x001a1838         #If Used Ability is Accumulate
001a182c: 00041040 sll r2,r4,0x01               |r2 = Ability ID * 2
001a1830: 08068613 j 0x001a184c                     >>jump to END (r2 = 0x00)
001a1834: 00001021 addu r2,r0,r0                    |r2 = 0x00
001a1838: 3c01801b lui r1,0x801b                #Else
001a183c: 00220821 addu r1,r1,r2                    |r1 = 0x801b0000 + Ability Offset
001a1840: 842263f0 lh r2,0x63f0(r1)                 |r2 = Ability Effect signed    0x801b63f0
001a1844: 00000000 nop                              |
001a1848: 000217c2 srl r2,r2,0x1f           |r2 = 0x01 if Ability Effect is > 0x8000, else 0x00
001a184c: 03e00008 jr r31                   
001a1850: 00000000 nop                      

Return locations

00072c48: 
00073f70: Set_damage_display_type_based_on_ability
0007751c: ?_0x773f8 000773f8_-_0007775c
000775f0: ?_0x773f8 000773f8_-_0007775c