Difference between revisions of "Spread Move to West Preset"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0017551c: 3c028019 lui r2,0x8019 00175520: 8c42f4e4 lw r2,-0x0b1c(r2) 00175524: 2403ffff addiu r3,r0,0xffff 00175528: a443003a sh r3,0x003a(r2)...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<font face='Courier New'>
+
BATTLE.BIN : Spread Move to West Preset
 +
-------------------------------------------------------------------------------------------------------
 +
Parameters : Nothing
 
   
 
   
 +
Returns : Nothing
 +
 +
Set some data in Scratch Pad at [[1f800180|<span style="color:blue">'''0x1f800180'''</span>]]) (refered as 0x180)
 +
Used to Spread pathfinding around a tile (4 different routines)
 +
    - Set Spreading Tile X and Y
 +
    - Set Entry and Exit sides slope mod
 +
Note : The slope mod will be used to shift slope type so the wanted side (entry or exit) flags will be 0x1 and 0x2
 +
        This value will be used to multiply the halves to get the Side Effective height (see [[Slope_Type|<span style="color:blue">'''Slope Type'''</span>)]]
 +
          0x00 (low side) --> No halves
 +
          0x01 (egde) --> Halves * 1
 +
          0x11 (High side) --> Halves * 2
 +
---------------------------------------------------------------------------------------------------------
 
  0017551c: 3c028019 lui r2,0x8019
 
  0017551c: 3c028019 lui r2,0x8019
  00175520: 8c42f4e4 lw r2,-0x0b1c(r2)
+
  00175520: 8c42f4e4 lw r2,-0x0b1c(r2)       |{{f/adr|Pointer to Scratch Pad (0x1f800180)}}
  00175524: 2403ffff addiu r3,r0,0xffff
+
  00175524: 2403ffff addiu r3,r0,-0x0001      |
  00175528: a443003a sh r3,0x003a(r2)
+
  00175528: a443003a sh r3,0x003a(r2)         |{{f/store|<nowiki>Spreading Tile X mod = -0x1</nowiki>}}
  0017552c: 34030002 ori r3,r0,0x0002
+
  0017552c: 34030002 ori r3,r0,0x0002         |
  00175530: a440003c sh r0,0x003c(r2)
+
  00175530: a440003c sh r0,0x003c(r2)         |{{f/store|<nowiki>Spreading Tile Y mod = 0x0</nowiki>}}
  00175534: a0430044 sb r3,0x0044(r2)
+
  00175534: a0430044 sb r3,0x0044(r2)         |{{f/store|<nowiki>Origin Exit Side Slope Mod  (2 = West Side)</nowiki>}}
  00175538: 03e00008 jr r31
+
  00175538: 03e00008 jr r31                   |
  0017553c: a0400045 sb r0,0x0045(r2)
+
  0017553c: a0400045 sb r0,0x0045(r2)         |{{f/store|<nowiki>Destination Entry Side Slope Mod  (0 = East Side)</nowiki>}}
</font>
+
=== Return Locations ===
 +
'''BATTLE.BIN'''
 +
00175f18 : [[00175ea0_-_00175fa0]] (Via Jalr) - Address is at 8018f500 - 0x08
 +
00176558 : [[001764d8_-_001766b0]] (Via Jalr) - idem

Latest revision as of 19:27, 29 May 2023

BATTLE.BIN : Spread Move to West Preset
-------------------------------------------------------------------------------------------------------
Parameters : Nothing

Returns : Nothing

Set some data in Scratch Pad at 0x1f800180) (refered as 0x180)
Used to Spread pathfinding around a tile (4 different routines)
    - Set Spreading Tile X and Y
    - Set Entry and Exit sides slope mod
Note : The slope mod will be used to shift slope type so the wanted side (entry or exit) flags will be 0x1 and 0x2
       This value will be used to multiply the halves to get the Side Effective height (see Slope Type)
         0x00 (low side) --> No halves
         0x01 (egde) --> Halves * 1
         0x11 (High side) --> Halves * 2
---------------------------------------------------------------------------------------------------------
0017551c: 3c028019 lui r2,0x8019
00175520: 8c42f4e4 lw r2,-0x0b1c(r2)        |Pointer to Scratch Pad (0x1f800180)
00175524: 2403ffff addiu r3,r0,-0x0001      |
00175528: a443003a sh r3,0x003a(r2)         |Spreading Tile X mod = -0x1
0017552c: 34030002 ori r3,r0,0x0002         |
00175530: a440003c sh r0,0x003c(r2)         |Spreading Tile Y mod = 0x0
00175534: a0430044 sb r3,0x0044(r2)         |Origin Exit Side Slope Mod  (2 = West Side)
00175538: 03e00008 jr r31                   |
0017553c: a0400045 sb r0,0x0045(r2)         |Destination Entry Side Slope Mod  (0 = East Side)

Return Locations

BATTLE.BIN
00175f18 : 00175ea0_-_00175fa0 (Via Jalr) - Address is at 8018f500 - 0x08
00176558 : 001764d8_-_001766b0 (Via Jalr) - idem