Difference between revisions of "Spread Move to East Preset"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 001754d0: 3c028019 lui r2,0x8019 001754d4: 8c42f4e4 lw r2,-0x0b1c(r2) 001754d8: 34030001 ori r3,r0,0x0001 001754dc: a443003a sh r3,0x003a(r2) ...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<font face='Courier New'>
+
BATTLE.BIN : Spread Move to East Preset
 +
-------------------------------------------------------------------------------------------------------
 +
Parameters : Nothing
 
   
 
   
  001754d0: 3c028019 lui r2,0x8019
+
Returns : Nothing
  001754d4: 8c42f4e4 lw r2,-0x0b1c(r2)
+
  001754d8: 34030001 ori r3,r0,0x0001
+
Set some data in Scratch Pad at [[1f800180|<span style="color:blue">'''0x1f800180'''</span>]]) (refered as 0x180)
  001754dc: a443003a sh r3,0x003a(r2)
+
Used to Spread pathfinding around a tile (4 different routines)
  001754e0: 34030002 ori r3,r0,0x0002
+
    - Set Spreading Tile X and Y
  001754e4: a440003c sh r0,0x003c(r2)
+
    - Set Entry and Exit sides slope mod
  001754e8: a0400044 sb r0,0x0044(r2)
+
Note : The slope mod will be used to shift slope type so the wanted side (entry or exit) flags will be 0x1 and 0x2
  001754ec: 03e00008 jr r31
+
        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>)]]
  001754f0: a0430045 sb r3,0x0045(r2)
+
          0x00 (low side) --> No halves
</font>
+
          0x01 (egde) --> Halves * 1
 +
          0x11 (High side) --> Halves * 2
 +
---------------------------------------------------------------------------------------------------------
 +
  001754d0: 3c028019 lui r2,0x8019           |
 +
  001754d4: 8c42f4e4 lw r2,-0x0b1c(r2)       |{{f/adr|Pointer to Scratch Pad (0x1f800180)}} {{f/adr|East ?}} {{f/adr|Direction ???}}
 +
  001754d8: 34030001 ori r3,r0,0x0001         |
 +
  001754dc: a443003a sh r3,0x003a(r2)         |{{f/store|<nowiki>Spreading Tile X mod = 0x1</nowiki>}}
 +
  001754e0: 34030002 ori r3,r0,0x0002         |
 +
  001754e4: a440003c sh r0,0x003c(r2)         |{{f/store|<nowiki>Spreading Tile Y mod = 0x0</nowiki>}}
 +
  001754e8: a0400044 sb r0,0x0044(r2)         |{{f/store|<nowiki>Origin Exit Side Slope Mod  (0 = East Side)</nowiki>}}
 +
  001754ec: 03e00008 jr r31                   |
 +
  001754f0: a0430045 sb r3,0x0045(r2)         |{{f/store|<nowiki>Destination Entry Side Slope Mod  (2 = West)</nowiki>}}
 +
=== Return Locations ===
 +
'''BATTLE.BIN'''
 +
00175f18 : [[00175ea0_-_00175fa0]] (Via Jalr) - Address is at 8018f500 - 0x00
 +
00176558 : [[001764d8_-_001766b0]] (Via Jalr) - idem

Latest revision as of 19:19, 29 May 2023

BATTLE.BIN : Spread Move to East 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
---------------------------------------------------------------------------------------------------------
001754d0: 3c028019 lui r2,0x8019            |
001754d4: 8c42f4e4 lw r2,-0x0b1c(r2)        |Pointer to Scratch Pad (0x1f800180) East ? Direction ???
001754d8: 34030001 ori r3,r0,0x0001         |
001754dc: a443003a sh r3,0x003a(r2)         |Spreading Tile X mod = 0x1
001754e0: 34030002 ori r3,r0,0x0002         |
001754e4: a440003c sh r0,0x003c(r2)         |Spreading Tile Y mod = 0x0
001754e8: a0400044 sb r0,0x0044(r2)         |Origin Exit Side Slope Mod  (0 = East Side)
001754ec: 03e00008 jr r31                   |
001754f0: a0430045 sb r3,0x0045(r2)         |Destination Entry Side Slope Mod  (2 = West)

Return Locations

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