Difference between revisions of "Spread Move to South Preset"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00175540: 3c038019 lui r3,0x8019 00175544: 8c63f4e4 lw r3,-0x0b1c(r3) 00175548: 2402ffff addiu r2,r0,0xffff 0017554c: a462003c sh r2,0x003c(r3)...")
 
Line 1: Line 1:
<font face='Courier New'>
+
BATTLE.BIN : Spread Move to South Preset
 +
-------------------------------------------------------------------------------------------------------
 +
Parameters : Nothing
 
   
 
   
  00175540: 3c038019 lui r3,0x8019
+
Returns : Nothing
  00175544: 8c63f4e4 lw r3,-0x0b1c(r3)
+
  00175548: 2402ffff addiu r2,r0,0xffff
+
Set some data in Scratch Pad at [[1f800180|<span style="color:blue">'''0x1f800180'''</span>]]) (refered as 0x180)
  0017554c: a462003c sh r2,0x003c(r3)
+
Used to Spread pathfinding around a tile (4 different routines)
  00175550: 34020004 ori r2,r0,0x0004
+
    - Set Spreading Tile X and Y
  00175554: a0620044 sb r2,0x0044(r3)
+
    - Set Entry and Exit sides slope mod
  00175558: 34020006 ori r2,r0,0x0006
+
Note : The slope mod will be used to shift slope type so the wanted side (entry or exit) flags will be 0x1 and 0x2
  0017555c: a460003a sh r0,0x003a(r3)
+
        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>)]]
  00175560: 03e00008 jr r31
+
          0x00 (low side) --> No halves
  00175564: a0620045 sb r2,0x0045(r3)
+
          0x01 (egde) --> Halves * 1
</font>
+
          0x11 (High side) --> Halves * 2
 +
---------------------------------------------------------------------------------------------------------
 +
  00175540: 3c038019 lui r3,0x8019                       |{{f/std|South}}
 +
  00175544: 8c63f4e4 lw r3,-0x0b1c(r3)       |{{f/adr|Pointer to Scratch Pad (0x1f800180)}}
 +
  00175548: 2402ffff addiu r2,r0,-0x0001      |
 +
  0017554c: a462003c sh r2,0x003c(r3)         |{{f/store|<nowiki>Spreading Tile Y mod = -0x01</nowiki>}}
 +
  00175550: 34020004 ori r2,r0,0x0004         |
 +
  00175554: a0620044 sb r2,0x0044(r3)         |{{f/store|<nowiki>Origin Exit Side Slope Mod  (4 = South)</nowiki>}}
 +
  00175558: 34020006 ori r2,r0,0x0006         |
 +
  0017555c: a460003a sh r0,0x003a(r3)         |{{f/store|<nowiki>Spreading Tile X mod = 0x0</nowiki>}}
 +
  00175560: 03e00008 jr r31                   |
 +
  00175564: a0620045 sb r2,0x0045(r3)         |{{f/store|<nowiki>Destination Entry Side Slope Mod  (6 = North)</nowiki>}}
 +
=== Return Locations ===
 +
'''BATTLE.BIN'''
 +
00175f18 : [[00175ea0_-_00175fa0]] (Via Jalr) - Address is at 8018f500 - 0x0c
 +
00176558 : [[001764d8_-_001766b0]] (Via Jalr) - idem

Revision as of 19:32, 29 May 2023

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