Difference between revisions of "Set item/throw stone ability display stuff?"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00072b50: 27bdffe0 addiu r29,r29,0xffe0 00072b54: afbf001c sw r31,0x001c(r29) 00072b58: 0c01bbbc jal 0x0006eef0 00072b5c: afb00018 sw r16,0x001...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<font face='Courier New'>
+
'''BATTLE.BIN''' :  - Set item/throw stone ability display stuff?
   
+
------------------------------------------------------------------------------------------
  00072b50: 27bdffe0 addiu r29,r29,0xffe0
+
No Parameters
  00072b54: afbf001c sw r31,0x001c(r29)
+
Returns nothing
  00072b58: 0c01bbbc jal 0x0006eef0
+
  ------------------------------------------------------------------------------------------
  00072b5c: afb00018 sw r16,0x0018(r29)
+
  00072bf0: 27bdffe0 addiu r29,r29,-0x0020    |
  00072b60: 34020016 ori r2,r0,0x0016
+
  00072bf4: 3402002d ori r2,r0,0x002d          |
00072b64: 3c018009 lui r1,0x8009
+
00072bf8: afbf0018 sw r31,0x0018(r29)       |
  00072b68: ac2260e4 sw r2,0x60e4(r1) store display = 16
+
  00072bfc: afb10014 sw r17,0x0014(r29)        |
  00072b6c: 0c01e886 jal 0x0007a218 load misc data
+
  00072c00: afb00010 sw r16,0x0010(r29)       |
  00072b70: 00000000 nop
+
  00072c04: 3c018009 lui r1,0x8009             |
  00072b74: 00408021 addu r16,r2,r0
+
  00072c08: ac2260e4 sw r2,0x60e4(r1)         |{{f/store|Store 0x2d in display Byte}} {{f/std|* [ 800960e4 ] used in Game Flow control routine}}
  00072b78: 8e030174 lw r3,0x0174(r16) load ability range?
+
  00072c0c: 0c01e875 jal 0x0007a1d4            |{{f/jal|Get_casting_unit%27s_misc_data|Get_casting_unit%27s_misc_data}}
  00072b7c: 34020003 ori r2,r0,0x0003
+
  00072c10: 00000000 nop                       |
  00072b80: 14620003 bne r3,r2,0x00072b90 branch if not 3
+
  00072c14: 00408821 addu r17,r2,r0           |{{f/std|Preserves Casting Unit misc data}}
  00072b84: 34040001 ori r4,r0,0x0001
+
  00072c18: 96300138 lhu r16,0x0138(r17)       |{{f/load|Load and Preserves used Ability ID}}
  00072b88: 0801cae5 j 0x00072b94
+
00072c1c: 02202021 addu r4,r17,r0            |
  00072b8c: 34050001 ori r5,r0,0x0001
+
00072c20: 0c01a106 jal 0x00068418            |{{f/jal|X/Y_Data_Gathering_for_Attacks%3F|X/Y Data Gathering for Attacks?}}
  00072b90: 00002821 addu r5,r0,r0
+
00072c24: a6200008 sh r0,0x0008(r17)        |{{f/store|Reset Misc 0x08}}
  00072b94: 00003821 addu r7,r0,r0
+
  00072c28: 12000003 beq r16,r0,0x00072c38    {{f/Cond|If Ability ID is 0x00 -  [Attack] Branch to dedicated section}}
  00072b98: 8e020134 lw r2,0x0134(r16) load unit data
+
00072c2c: 34020200 ori r2,r0,0x0200          |
  00072b9c: 9203013d lbu r3,0x013d(r16) load entd flags
+
  00072c30: 16020003 bne r16,r2,0x00072c40    {{f/Cond|Branch to Default section if Not Fall}}
  00072ba0: 9046018a lbu r6,0x018a(r2) load entd ID
+
  00072c34: 00000000 nop                          |
  00072ba4: 30630008 andi r3,r3,0x0008
+
{{f/sec|ATTACK / FALL SECTION}}
  00072ba8: 0c05066e jal 0x001419b8 go to targeting
+
  00072c38: 0801cb30 j 0x00072cc0                  {{f/jump|<nowiki>Jump to terminal section - (r2 = 0x01)</nowiki>}}
  00072bac: afa30010 sw r3,0x0010(r29) store control check
+
  00072c3c: 34020001 ori r2,r0,0x0001                 |{{f/std|0x01}}
  00072bb0: 9202013d lbu r2,0x013d(r16)
+
  {{f/sec|OTHER CASES}}
  00072bb4: 00000000 nop
+
00072c40: 0c068605 jal 0x001a1814                |{{f/jal|Load_ability_effect|Load_ability_effect}}
  00072bb8: 30420008 andi r2,r2,0x0008
+
00072c44: 02002021 addu r4,r16,r0               |{{f/std|Send Ability ID}}
  00072bbc: 10400005 beq r2,r0,0x00072bd4 branch if not under player control
+
00072c48: 1440001d bne r2,r0,0x00072cc0          {{f/Cond|<nowiki>If Effect ID = 0xff - branch to </nowiki>}} {{f/loc|%Terminal section }}
  00072bc0: 00000000 nop
+
  00072c4c: 34020001 ori r2,r0,0x0001                  |
  00072bc4: 0c01a0f0 jal 0x000683c0 store At list ID = 1
+
00072c50: 34020092 ori r2,r0,0x0092              |
  00072bc8: 00000000 nop
+
  00072c54: 12020004 beq r16,r2,0x00072c68        {{f/Cond|<nowiki>If Ability ID = 0x92 (Accumulate) - Branch to dedicated section</nowiki>}}
  00072bcc: 0801caf7 j 0x00072bdc
+
00072c58: 2602fe6a addiu r2,r16,-0x0196          |{{f/std|ID - 0x196}}
  00072bd0: 00000000 nop
+
00072c5c: 2c420008 sltiu r2,r2,0x0008            |{{f/std|Check if Ability is a charge ability}}
  00072bd4: 0c01a0f5 jal 0x000683d4 store AT list iD = 0
+
00072c60: 10400009 beq r2,r0,0x00072c88          {{f/Cond|Branch to default section if not a charge Ability}}
  00072bd8: 00000000 nop
+
00072c64: 00000000 nop                              |
  00072bdc: 8fbf001c lw r31,0x001c(r29)
+
                                            {{f/sec|Charge or Acumulate}}
  00072be0: 8fb00018 lw r16,0x0018(r29)
+
00072c68: 0c068615 jal 0x001a1854                |{{f/jal|Check_flag_0x0800_on_Ability_Effect|Check_flag_0x0800_on_Ability_Effect}}
  00072be4: 27bd0020 addiu r29,r29,0x0020
+
  00072c6c: 02002021 addu r4,r16,r0                |
  00072be8: 03e00008 jr r31
+
  00072c70: 14400013 bne r2,r0,0x00072cc0          {{f/Cond|<nowiki>If Flag 0x800 is ON branch to terminal section- r2 = 0x01</nowiki>}}
  00072bec: 00000000 nop
+
00072c74: 34020001 ori r2,r0,0x0001                  |
</font>
+
00072c78: 0c068620 jal 0x001a1880                |{{f/jal|Increment_effect_section_address_loading_directive|Increment_effect_section_address_loading_directive}}
 +
00072c7c: 00000000 nop                          |
 +
00072c80: 0801cb30 j 0x00072cc0                  {{f/jump|Jump to }} {{f/loc|%Terminal section }}
 +
  00072c84: 34020001 ori r2,r0,0x0001                  |
 +
                                            {{f/sec|Default - Not charge nor accumulate}}
 +
  00072c88: 0c068615 jal 0x001a1854                |{{f/jal|Check_flag_0x0800_on_Ability_Effect|Check_flag_0x0800_on_Ability_Effect}}
 +
00072c8c: 02002021 addu r4,r16,r0                |
 +
00072c90: 10400006 beq r2,r0,0x00072cac          {{f/Cond|If flag 0x800 is OFF branch to dedicated section}}
 +
  00072c94: 34030039 ori r3,r0,0x0039                  |
 +
  00072c98: 962201dc lhu r2,0x01dc(r17)           |{{f/load|Caster Current animation}}
 +
  00072c9c: 00000000 nop                           |
 +
  00072ca0: 00021042 srl r2,r2,0x01                |{{f/std|Animation / 2}}
 +
  00072ca4: 14430003 bne r2,r3,0x00072cb4          {{f/Cond|If caster animation is not 0x72 or 0x73 branch to flag 0x0800 section}} {{f/std|*72 is point blank potion}}
 +
  00072ca8: 00000000 nop                               |
 +
                                                {{f/sec|Flag 0x800 OFF or Anim 0x39}}
 +
  00072cac: 0c068620 jal 0x001a1880                    |{{f/jal|Increment_effect_section_address_loading_directive|Increment_effect_section_address_loading_directive}}
 +
  00072cb0: 00000000 nop                               |
 +
                                                {{f/sec|Flag 0x800 ON and not Animation 0x72 nor 0x73}}
 +
  00072cb4: 0c01104a jal 0x00044128                    |{{f/jal|00044128_-_00044150|00044128_-_00044150}}
 +
  00072cb8: 00000000 nop                               |
 +
00072cbc: 34020002 ori r2,r0,0x0002                  |{{f/std|<nowiki>Go in terminal section with r2 = 0x02</nowiki>}}
 +
{{f/sec|TERMINAL SECTION}}
 +
  00072cc0: 3c018004 lui r1,0x8004            |
 +
00072cc4: ac225980 sw r2,0x5980(r1)          |{{f/store|Store r2 at [ 80045980 ]}} {{f/std|*Animation speed ? }}
 +
00072cc8: 0c01a0f5 jal 0x000683d4           |{{f/jal|Store_AT_list_ID_%3D_0|Store_AT_list_ID_%3D_0}}
 +
  00072ccc: 00000000 nop
 +
  00072cd0: 8fbf0018 lw r31,0x0018(r29)
 +
00072cd4: 8fb10014 lw r17,0x0014(r29)
 +
  00072cd8: 8fb00010 lw r16,0x0010(r29)
 +
  00072cdc: 27bd0020 addiu r29,r29,0x0020
 +
  00072ce0: 03e00008 jr r31
 +
  00072ce4: 00000000 nop
 +
===Return locations===
 +
'''BATTLE.BIN'''
 +
  0007739c: [[00077378_-_000773b0]]

Latest revision as of 19:56, 16 March 2024

BATTLE.BIN :  - Set item/throw stone ability display stuff?
------------------------------------------------------------------------------------------
No Parameters
Returns nothing
------------------------------------------------------------------------------------------
00072bf0: 27bdffe0 addiu r29,r29,-0x0020     |
00072bf4: 3402002d ori r2,r0,0x002d          |
00072bf8: afbf0018 sw r31,0x0018(r29)        |
00072bfc: afb10014 sw r17,0x0014(r29)        |
00072c00: afb00010 sw r16,0x0010(r29)        |
00072c04: 3c018009 lui r1,0x8009             |
00072c08: ac2260e4 sw r2,0x60e4(r1)          |Store 0x2d in display Byte * [ 800960e4 ] used in Game Flow control routine
00072c0c: 0c01e875 jal 0x0007a1d4            |-->Get_casting_unit%27s_misc_data
00072c10: 00000000 nop                       |
00072c14: 00408821 addu r17,r2,r0            |Preserves Casting Unit misc data
00072c18: 96300138 lhu r16,0x0138(r17)       |Load and Preserves used Ability ID
00072c1c: 02202021 addu r4,r17,r0            |
00072c20: 0c01a106 jal 0x00068418            |-->X/Y Data Gathering for Attacks?
00072c24: a6200008 sh r0,0x0008(r17)         |Reset Misc 0x08
00072c28: 12000003 beq r16,r0,0x00072c38     #If Ability ID is 0x00 -  [Attack] Branch to dedicated section
00072c2c: 34020200 ori r2,r0,0x0200          |
00072c30: 16020003 bne r16,r2,0x00072c40     #Branch to Default section if Not Fall
00072c34: 00000000 nop                           |
ATTACK / FALL SECTION
00072c38: 0801cb30 j 0x00072cc0                  >>Jump to terminal section - (r2 = 0x01)
00072c3c: 34020001 ori r2,r0,0x0001                  |0x01
OTHER CASES
00072c40: 0c068605 jal 0x001a1814                |-->Load_ability_effect
00072c44: 02002021 addu r4,r16,r0                |Send Ability ID
00072c48: 1440001d bne r2,r0,0x00072cc0          #If Effect ID = 0xff - branch to  %Terminal section 
00072c4c: 34020001 ori r2,r0,0x0001                  |
00072c50: 34020092 ori r2,r0,0x0092              |
00072c54: 12020004 beq r16,r2,0x00072c68         #If Ability ID = 0x92 (Accumulate) - Branch to dedicated section
00072c58: 2602fe6a addiu r2,r16,-0x0196          |ID - 0x196
00072c5c: 2c420008 sltiu r2,r2,0x0008            |Check if Ability is a charge ability
00072c60: 10400009 beq r2,r0,0x00072c88          #Branch to default section if not a charge Ability
00072c64: 00000000 nop                               |
                                            Charge or Acumulate
00072c68: 0c068615 jal 0x001a1854                |-->Check_flag_0x0800_on_Ability_Effect
00072c6c: 02002021 addu r4,r16,r0                |
00072c70: 14400013 bne r2,r0,0x00072cc0          #If Flag 0x800 is ON branch to terminal section- r2 = 0x01
00072c74: 34020001 ori r2,r0,0x0001                  |
00072c78: 0c068620 jal 0x001a1880                |-->Increment_effect_section_address_loading_directive
00072c7c: 00000000 nop                           |
00072c80: 0801cb30 j 0x00072cc0                  >>Jump to  %Terminal section 
00072c84: 34020001 ori r2,r0,0x0001                  |
                                            Default - Not charge nor accumulate
00072c88: 0c068615 jal 0x001a1854                |-->Check_flag_0x0800_on_Ability_Effect
00072c8c: 02002021 addu r4,r16,r0                |
00072c90: 10400006 beq r2,r0,0x00072cac          #If flag 0x800 is OFF branch to dedicated section
00072c94: 34030039 ori r3,r0,0x0039                  |
00072c98: 962201dc lhu r2,0x01dc(r17)            |Caster Current animation
00072c9c: 00000000 nop                           |
00072ca0: 00021042 srl r2,r2,0x01                |Animation / 2
00072ca4: 14430003 bne r2,r3,0x00072cb4          #If caster animation is not 0x72 or 0x73 branch to flag 0x0800 section *72 is point blank potion
00072ca8: 00000000 nop                               |
                                                Flag 0x800 OFF or Anim 0x39
00072cac: 0c068620 jal 0x001a1880                    |-->Increment_effect_section_address_loading_directive
00072cb0: 00000000 nop                               |
                                                Flag 0x800 ON and not Animation 0x72 nor 0x73
00072cb4: 0c01104a jal 0x00044128                    |-->00044128_-_00044150
00072cb8: 00000000 nop                               |
00072cbc: 34020002 ori r2,r0,0x0002                  |Go in terminal section with r2 = 0x02
TERMINAL SECTION
00072cc0: 3c018004 lui r1,0x8004             |
00072cc4: ac225980 sw r2,0x5980(r1)          |Store r2 at [ 80045980 ] *Animation speed ? 
00072cc8: 0c01a0f5 jal 0x000683d4            |-->Store_AT_list_ID_%3D_0
00072ccc: 00000000 nop
00072cd0: 8fbf0018 lw r31,0x0018(r29)
00072cd4: 8fb10014 lw r17,0x0014(r29)
00072cd8: 8fb00010 lw r16,0x0010(r29)
00072cdc: 27bd0020 addiu r29,r29,0x0020
00072ce0: 03e00008 jr r31
00072ce4: 00000000 nop

Return locations

BATTLE.BIN
 0007739c: 00077378_-_000773b0