Spread Move to North Preset

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
BATTLE.BIN : Spread Move to North 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
---------------------------------------------------------------------------------------------------------
001754f4: 3c038019 lui r3,0x8019            |
001754f8: 8c63f4e4 lw r3,-0x0b1c(r3)        |Pointer to Scratch Pad (0x1f800180) North
001754fc: 34020001 ori r2,r0,0x0001         |
00175500: a462003c sh r2,0x003c(r3)         |Spreading Tile Y mod = 0x01
00175504: 34020006 ori r2,r0,0x0006         |
00175508: a0620044 sb r2,0x0044(r3)         |Origin Exit Side Slope Mod  (6 = North)
0017550c: 34020004 ori r2,r0,0x0004         |
00175510: a460003a sh r0,0x003a(r3)         |Spreading Tile X mod = 0x0
00175514: 03e00008 jr r31                   |
00175518: a0620045 sb r2,0x0045(r3)         |Destination Entry Side Slope Mod  (4 = South)

Return Locations

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