Spread Move to East Preset

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
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