Spread Move to West Preset

From Final Fantasy Hacktics Wiki
Revision as of 19:27, 29 May 2023 by Orkney (talk | contribs) (Orkney moved page 0017551c - 0017553c to Spread Move to West Preset)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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