Spread Move to South Preset

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
BATTLE.BIN : Spread Move to South 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
---------------------------------------------------------------------------------------------------------
00175540: 3c038019 lui r3,0x8019                        |South
00175544: 8c63f4e4 lw r3,-0x0b1c(r3)        |Pointer to Scratch Pad (0x1f800180)
00175548: 2402ffff addiu r2,r0,-0x0001      |
0017554c: a462003c sh r2,0x003c(r3)         |Spreading Tile Y mod = -0x01
00175550: 34020004 ori r2,r0,0x0004         |
00175554: a0620044 sb r2,0x0044(r3)         |Origin Exit Side Slope Mod  (4 = South)
00175558: 34020006 ori r2,r0,0x0006         |
0017555c: a460003a sh r0,0x003a(r3)         |Spreading Tile X mod = 0x0
00175560: 03e00008 jr r31                   |
00175564: a0620045 sb r2,0x0045(r3)         |Destination Entry Side Slope Mod  (6 = North)

Return Locations

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