Difference between revisions of "Spread Horizontal Jump"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 001764d8: 27bdffc8 addiu r29,r29,0xffc8 001764dc: afb40030 sw r20,0x0030(r29) 001764e0: 3c148019 lui r20,0x8019 001764e4: 8e94f4e0 lw r20,-0x0b...")
 
Line 1: Line 1:
<font face='Courier New'>
+
001764d8: 27bdffc8 addiu r29,r29,-0x0038    |
 +
001764dc: afb40030 sw r20,0x0030(r29)      |
 +
001764e0: 3c148019 lui r20,0x8019          |
 +
001764e4: 8e94f4e0 lw r20,-0x0b20(r20)      |{{f/adr|Pointer to Scratch Pad (0x1f800000)}}
 +
001764e8: afb10024 sw r17,0x0024(r29)      |
 +
001764ec: 3c118019 lui r17,0x8019          |
 +
001764f0: 8e31f4e4 lw r17,-0x0b1c(r17)      |{{f/adr|Pointer to Scratch Pad (0x1f800180)}}
 +
001764f4: afbf0034 sw r31,0x0034(r29)      |
 +
001764f8: afb3002c sw r19,0x002c(r29)      |
 +
001764fc: afb20028 sw r18,0x0028(r29)      |
 +
00176500: 0c05d56a jal 0x001755a8          |{{f/jal|Transfer_Tiles_Height_Halves_and_Slope_in_Scratch_Pad|Transfer_Tiles_Height_Halves_and_Slope_in_Scratch_Pad}} {{f/std|Origin Tile}}
 +
00176504: afb00020 sw r16,0x0020(r29)      |
 +
00176508: 92220054 lbu r2,0x0054(r17)      |{{f/load|Spread Counter}}
 +
0017650c: 00000000 nop                      |
 +
00176510: 1840005f blez r2,0x00176690      {{f/Cond|If Invalid :}} {{f/loc| Exit routine}}
 +
00176514: 00009821 addu r19,r0,r0              |
 +
00176518: 2a620004 slti r2,r19,0x0004          |
 
   
 
   
001764d8: 27bdffc8 addiu r29,r29,0xffc8
+
  0017651c: 38420001 xori r2,r2,0x0001           |{{f/std|Tile Path / Unit Path flag}} {{f/std|<nowiki> 0x00 Until counter = 4 then 0x01</nowiki>}}
001764dc: afb40030 sw r20,0x0030(r29)
+
  00176520: a2220040 sb r2,0x0040(r17)           |{{f/store|Store Tile/Unit Path Flag}}
001764e0: 3c148019 lui r20,0x8019
+
  00176524: 06610002 bgez r19,0x00176530         {{f/Cond|If Counter < 0x00}}
001764e4: 8e94f4e0 lw r20,-0x0b20(r20)
+
  00176528: 02601021 addu r2,r19,r0                   |
001764e8: afb10024 sw r17,0x0024(r29)
+
  0017652c: 26620003 addiu r2,r19,0x0003             |{{f/std|Counter + 3}}
001764ec: 3c118019 lui r17,0x8019
+
  00176530: 00021083 sra r2,r2,0x02               |{{f/std|Counter/4}}
001764f0: 8e31f4e4 lw r17,-0x0b1c(r17)
+
  00176534: 00021080 sll r2,r2,0x02               |
001764f4: afbf0034 sw r31,0x0034(r29)
+
  00176538: 02621023 subu r2,r19,r2               |
001764f8: afb3002c sw r19,0x002c(r29)
+
  0017653c: 00021080 sll r2,r2,0x02               |{{f/std|Counter Word Offset }}
001764fc: afb20028 sw r18,0x0028(r29)
+
  00176540: 3c018019 lui r1,0x8019               |
00176500: 0c05d56a jal 0x001755a8
+
  00176544: 00220821 addu r1,r1,r2               |
00176504: afb00020 sw r16,0x0020(r29)
+
  00176548: 8c22f500 lw r2,-0x0b00(r1)           |{{f/adr|Load Routine Address (based on direction)}}
00176508: 92220054 lbu r2,0x0054(r17)
+
  0017654c: 00000000 nop                         |
0017650c: 00000000 nop
+
  00176550: 0040f809 jalr r2,r31                 |{{f/jal|#1764d8Notes|Jal to spreading routine}} {{f/std|Set value at 3a 3c 44 45 in S-Pad 0x180}}
00176510: 1840005f blez r2,0x00176690
+
  00176554: 00000000 nop                         |
00176514: 00009821 addu r19,r0,r0
+
  00176558: 0c05d59f jal 0x0017567c               |{{f/jal|0017567c_-_00175954|Set Origin Height data}} {{f/std|<nowiki>returns r2 = 0 or 4 (Grid AoE tile)</nowiki>}}
00176518: 2a620004 slti r2,r19,0x0004
+
  0017655c: 02602021 addu r4,r19,r0               |{{f/std|Send Counter}}
  0017651c: 38420001 xori r2,r2,0x0001
+
  00176560: 14400046 bne r2,r0,0x0017667c         {{f/Cond|If There is no AoE to spread}} {{f/loc| Go to next iteration}}
  00176520: a2220040 sb r2,0x0040(r17)
+
  00176564: 00000000 nop                             |
  00176524: 06610002 bgez r19,0x00176530
+
  00176568: 0c05d57a jal 0x001755e8               |{{f/jal|Set_spreading_Tile_X_and_Y_coordinates|Set_spreading_Tile_X_and_Y_coordinates}}
  00176528: 02601021 addu r2,r19,r0
+
  0017656c: 34120001 ori r18,r0,0x0001           |
  0017652c: 26620003 addiu r2,r19,0x0003
+
  00176570: 92820005 lbu r2,0x0005(r20)           |{{f/load|Acting Unit Jump/2}}
  00176530: 00021083 sra r2,r2,0x02
+
  00176574: 00000000 nop                         |
  00176534: 00021080 sll r2,r2,0x02
+
  00176578: 10400040 beq r2,r0,0x0017667c         {{f/Cond|<nowiki>If Acting Unit Jump = 0x00</nowiki>}} {{f/loc| Go to next iteration}}
  00176538: 02621023 subu r2,r19,r2
+
  0017657c: 00000000 nop                             |
  0017653c: 00021080 sll r2,r2,0x02
+
  00176540: 3c018019 lui r1,0x8019
+
  00176580: 8e220010 lw r2,0x0010(r17)               |{{f/adr|Pointer : Origin Tile Grid data}}
  00176544: 00220821 addu r1,r1,r2
+
  00176584: 00000000 nop                             |
  00176548: 8c22f500 lw r2,-0x0b00(r1)
+
  00176588: 90420000 lbu r2,0x0000(r2)               |{{f/load|Origin AoE of Moves}}
  0017654c: 00000000 nop
+
  0017658c: 00000000 nop                             |
  00176550: 0040f809 jalr r2,r31
+
  00176590: 00521023 subu r2,r2,r18                   |{{f/std|AoE - Jump Counter}}
  00176554: 00000000 nop
+
  00176594: a6220024 sh r2,0x0024(r17)               |{{f/store|Store Decreased move's AoE}}
  00176558: 0c05d59f jal 0x0017567c
+
  00176598: 00021400 sll r2,r2,0x10                   |
  0017655c: 02602021 addu r4,r19,r0
+
  0017659c: 00021403 sra r2,r2,0x10                   |
  00176560: 14400046 bne r2,r0,0x0017667c
+
  001765a0: 28420002 slti r2,r2,0x0002               |
  00176564: 00000000 nop
+
  001765a4: 14400035 bne r2,r0,0x0017667c             {{f/Cond|<nowiki>If Remaining AoE >=2</nowiki>}}
  00176568: 0c05d57a jal 0x001755e8
+
  001765a8: 00000000 nop                                 |
  0017656c: 34120001 ori r18,r0,0x0001
+
  001765ac: 0c05d586 jal 0x00175618                       |{{f/jal|Check_Spreading_Tile_Coordinates|Check_Spreading_Tile_Coordinates}}
  00176570: 92820005 lbu r2,0x0005(r20)
+
  001765b0: 00000000 nop                                 |
  00176574: 00000000 nop
+
  001765b4: 14400031 bne r2,r0,0x0017667c                 {{f/Cond|If Destination Coordinate are valid}}
  00176578: 10400040 beq r2,r0,0x0017667c
+
  001765b8: 00000000 nop                                     |
  0017657c: 00000000 nop
+
  001765bc: 86230032 lh r3,0x0032(r17)                       |{{f/load|Destination Y}}
  00176580: 8e220010 lw r2,0x0010(r17)
+
  001765c0: 92820018 lbu r2,0x0018(r20)                       |{{f/load|Map Max X}}
  00176584: 00000000 nop
+
  001765c4: 00000000 nop                                     |
  00176588: 90420000 lbu r2,0x0000(r2)
+
  001765c8: 00620018 mult r3,r2                               |
  0017658c: 00000000 nop
+
  001765cc: 92250044 lbu r5,0x0044(r17)                       |{{f/load|Origin Exit Side Slope Mod (Jal)}}
  00176590: 00521023 subu r2,r2,r18
+
  001765d0: 92260045 lbu r6,0x0045(r17)                       |{{f/load|Destination Entry Side Slope Mod}}
  00176594: a6220024 sh r2,0x0024(r17)
+
  001765d4: 92270048 lbu r7,0x0048(r17)                       |{{f/load|Origin Exit Side Height}}
  00176598: 00021400 sll r2,r2,0x10
+
  001765d8: 86220030 lh r2,0x0030(r17)                       |{{f/load|Destination X}}
  0017659c: 00021403 sra r2,r2,0x10
+
  001765dc: 00002012 mflo r4                                 |{{f/std|Max X * Destination Y}}
  001765a0: 28420002 slti r2,r2,0x0002
+
  001765e0: 0c05d88b jal 0x0017622c                           |{{f/jal|Check_Horizontal_Jump_option|Check_Horizontal_Jump_option}} {{f/std|<nowiki>returns r2 = 0x00 if Unit can Jump</nowiki>}}
  001765a4: 14400035 bne r2,r0,0x0017667c
+
  001765e4: 00822021 addu r4,r4,r2                           |{{f/std|Destination Tile ID (without elevation)}}
  001765a8: 00000000 nop
+
  001765e8: 14400024 bne r2,r0,0x0017667c                     {{f/Cond|If Cannot Jump in that direction}} {{f/loc| Go to next iteration}}
  001765ac: 0c05d586 jal 0x00175618
+
  001765ec: 26430001 addiu r3,r18,0x0001                         |
  001765b0: 00000000 nop
+
  001765f0: 8622003a lh r2,0x003a(r17)                       |{{f/load|Destination X direction}}
  001765b4: 14400031 bne r2,r0,0x0017667c
+
  001765f4: 00000000 nop                                     |
  001765b8: 00000000 nop
+
  001765f8: 00430018 mult r2,r3                               |
  001765bc: 86230032 lh r3,0x0032(r17)
+
  001765fc: 00002012 mflo r4                                 |{{f/std|X direction * Jump counter}}
  001765c0: 92820018 lbu r2,0x0018(r20)
+
  00176600: 8622003c lh r2,0x003c(r17)                       |{{f/load|Destination Y direction}}
  001765c4: 00000000 nop
+
  00176604: 00000000 nop                                     |
  001765c8: 00620018 mult r3,r2
+
  00176608: 00430018 mult r2,r3                               |
  001765cc: 92250044 lbu r5,0x0044(r17)
+
  0017660c: 96220026 lhu r2,0x0026(r17)                       |{{f/load|X coordinates}}
  001765d0: 92260045 lbu r6,0x0045(r17)
+
  00176610: 00000000 nop                                     |
  001765d4: 92270048 lbu r7,0x0048(r17)
+
  00176614: 00441021 addu r2,r2,r4                           |{{f/std|X coordinates + Jump Mod}}
  001765d8: 86220030 lh r2,0x0030(r17)
+
  00176618: a6220030 sh r2,0x0030(r17)                       |{{f/store|Potential Jump destination X coordinates}}
  001765dc: 00002012 mflo r4
+
  0017661c: 96220028 lhu r2,0x0028(r17)                       |
  001765e0: 0c05d88b jal 0x0017622c
+
  00176620: 00001812 mflo r3                                 |{{f/std|Y direction * Jump counter}}
  001765e4: 00822021 addu r4,r4,r2
+
  00176624: 00431021 addu r2,r2,r3                           |{{f/std|Y coordinates + Jump Mod}}
  001765e8: 14400024 bne r2,r0,0x0017667c
+
  00176628: 0c05d586 jal 0x00175618                           |{{f/jal|Check_Spreading_Tile_Coordinates|Check_Spreading_Tile_Coordinates}}
  001765ec: 26430001 addiu r3,r18,0x0001
+
  0017662c: a6220032 sh r2,0x0032(r17)                       |{{f/store|Potential Jump destination Y coordinates}}
  001765f0: 8622003a lh r2,0x003a(r17)
+
  00176630: 14400012 bne r2,r0,0x0017667c                     {{f/Cond|If destination coordinates are valid}}
  001765f4: 00000000 nop
+
  00176634: 00000000 nop                                         |
  001765f8: 00430018 mult r2,r3
+
  00176638: 92220055 lbu r2,0x0055(r17)                           |{{f/load|Load 2nd loop counter}}
  001765fc: 00002012 mflo r4
+
  0017663c: 00000000 nop                                         |
  00176600: 8622003c lh r2,0x003c(r17)
+
  00176640: 18400009 blez r2,0x00176668                           {{f/Cond|If this counter is invalid }} {{f/loc| Go to next iteration}}
  00176604: 00000000 nop
+
  00176644: 00008021 addu r16,r0,r0                                   |
  00176608: 00430018 mult r2,r3
+
  00176648: 02002021 addu r4,r16,r0                               |
  0017660c: 96220026 lhu r2,0x0026(r17)
+
                                                                {{f/bloop|LOOP 4 Times}}
  00176610: 00000000 nop
+
  0017664c: 0c05d656 jal 0x00175958                                   |{{f/jal|Movement_routine|Movement_routine}} {{f/std|Enable Flag on Jumpable Tiles (4 directions both elevation)}}
  00176614: 00441021 addu r2,r2,r4
+
  00176650: 02402821 addu r5,r18,r0                                   |
  00176618: a6220030 sh r2,0x0030(r17)
+
  00176654: 92220055 lbu r2,0x0055(r17)                               |{{f/load|2nd loop counter}}
  0017661c: 96220028 lhu r2,0x0028(r17)
+
  00176658: 26100001 addiu r16,r16,0x0001                             |{{f/std|Counter +1}}
  00176620: 00001812 mflo r3
+
  0017665c: 0202102a slt r2,r16,r2                                   |
  00176624: 00431021 addu r2,r2,r3
+
  00176660: 1440fffa bne r2,r0,0x0017664c                         {{f/eloop|Loop}}
  00176628: 0c05d586 jal 0x00175618
+
  00176664: 02002021 addu r4,r16,r0                                   |
  0017662c: a6220032 sh r2,0x0032(r17)
+
  00176668: 92820005 lbu r2,0x0005(r20)               |{{f/load|Acting Unit Jump/2}}
  00176630: 14400012 bne r2,r0,0x0017667c
+
  0017666c: 26520001 addiu r18,r18,0x0001             |{{f/std|Counter + 1}}
  00176634: 00000000 nop
+
  00176670: 0052102a slt r2,r2,r18                   |
  00176638: 92220055 lbu r2,0x0055(r17)
+
  00176674: 1040ffc2 beq r2,r0,0x00176580         {{f/eloop|Loop While counter < Acting Unit Jump/2}}
  0017663c: 00000000 nop
+
  00176678: 00000000 nop                             |
  00176640: 18400009 blez r2,0x00176668
+
  0017667c: 92220054 lbu r2,0x0054(r17)           |{{f/load|Loop counter}}
  00176644: 00008021 addu r16,r0,r0
+
  00176680: 26730001 addiu r19,r19,0x0001         |{{f/std|Counter + 1}}
  00176648: 02002021 addu r4,r16,r0
+
  00176684: 0262102a slt r2,r19,r2               |
  0017664c: 0c05d656 jal 0x00175958
+
  00176688: 1440ffa4 bne r2,r0,0x0017651c     {{f/eloop|Loop while counter < ScratchPad counter}}
  00176650: 02402821 addu r5,r18,r0
+
  0017668c: 2a620004 slti r2,r19,0x0004           |
  00176654: 92220055 lbu r2,0x0055(r17)
+
  00176690: 8fbf0034 lw r31,0x0034(r29)       END
  00176658: 26100001 addiu r16,r16,0x0001
 
  0017665c: 0202102a slt r2,r16,r2
 
  00176660: 1440fffa bne r2,r0,0x0017664c
 
  00176664: 02002021 addu r4,r16,r0
 
  00176668: 92820005 lbu r2,0x0005(r20)
 
  0017666c: 26520001 addiu r18,r18,0x0001
 
  00176670: 0052102a slt r2,r2,r18
 
  00176674: 1040ffc2 beq r2,r0,0x00176580
 
  00176678: 00000000 nop
 
  0017667c: 92220054 lbu r2,0x0054(r17)
 
  00176680: 26730001 addiu r19,r19,0x0001
 
  00176684: 0262102a slt r2,r19,r2
 
  00176688: 1440ffa4 bne r2,r0,0x0017651c
 
  0017668c: 2a620004 slti r2,r19,0x0004
 
  00176690: 8fbf0034 lw r31,0x0034(r29)
 
 
  00176694: 8fb40030 lw r20,0x0030(r29)
 
  00176694: 8fb40030 lw r20,0x0030(r29)
 
  00176698: 8fb3002c lw r19,0x002c(r29)
 
  00176698: 8fb3002c lw r19,0x002c(r29)
Line 120: Line 121:
 
  001766ac: 03e00008 jr r31
 
  001766ac: 03e00008 jr r31
 
  001766b0: 00000000 nop
 
  001766b0: 00000000 nop
</font>
+
=== Notes ===
 +
Table of Spreading routines - 8018f500 <span id="1764d8Notes"></span>
 +
    0x00 - 801754d0 [[Spread_Move_to_East_Preset]]
 +
    0x04 - 801754f4 [[Spread_Move_to_North_Preset]]
 +
    0x08 - 8017551c [[Spread_Move_to_West_Preset]]
 +
    0x0c - 80175540 [[Spread_Move_to_South_Preset]]
 +
=== Return Location ===
 +
'''BATTLE.BIN'''
 +
00174d24: [[00174b8c_-_00174df4]]
 +
00178804: [[Calculate_Pathing]]

Revision as of 19:35, 30 May 2023

001764d8: 27bdffc8 addiu r29,r29,-0x0038    |
001764dc: afb40030 sw r20,0x0030(r29)       |
001764e0: 3c148019 lui r20,0x8019           |
001764e4: 8e94f4e0 lw r20,-0x0b20(r20)      |Pointer to Scratch Pad (0x1f800000)
001764e8: afb10024 sw r17,0x0024(r29)       |
001764ec: 3c118019 lui r17,0x8019           |
001764f0: 8e31f4e4 lw r17,-0x0b1c(r17)      |Pointer to Scratch Pad (0x1f800180)
001764f4: afbf0034 sw r31,0x0034(r29)       |
001764f8: afb3002c sw r19,0x002c(r29)       |
001764fc: afb20028 sw r18,0x0028(r29)       |
00176500: 0c05d56a jal 0x001755a8           |-->Transfer_Tiles_Height_Halves_and_Slope_in_Scratch_Pad Origin Tile
00176504: afb00020 sw r16,0x0020(r29)       |
00176508: 92220054 lbu r2,0x0054(r17)       |Spread Counter
0017650c: 00000000 nop                      |
00176510: 1840005f blez r2,0x00176690       #If Invalid :  Exit routine
00176514: 00009821 addu r19,r0,r0               |
00176518: 2a620004 slti r2,r19,0x0004           |

0017651c: 38420001 xori r2,r2,0x0001            |Tile Path / Unit Path flag  0x00 Until counter = 4 then 0x01
00176520: a2220040 sb r2,0x0040(r17)            |Store Tile/Unit Path Flag
00176524: 06610002 bgez r19,0x00176530          #If Counter < 0x00
00176528: 02601021 addu r2,r19,r0                   |
0017652c: 26620003 addiu r2,r19,0x0003              |Counter + 3
00176530: 00021083 sra r2,r2,0x02               |Counter/4
00176534: 00021080 sll r2,r2,0x02               |
00176538: 02621023 subu r2,r19,r2               |
0017653c: 00021080 sll r2,r2,0x02               |Counter Word Offset 
00176540: 3c018019 lui r1,0x8019                |
00176544: 00220821 addu r1,r1,r2                |
00176548: 8c22f500 lw r2,-0x0b00(r1)            |Load Routine Address (based on direction)
0017654c: 00000000 nop                          |
00176550: 0040f809 jalr r2,r31                  |-->Jal to spreading routine Set value at 3a 3c 44 45 in S-Pad 0x180
00176554: 00000000 nop                          |
00176558: 0c05d59f jal 0x0017567c               |-->Set Origin Height data returns r2 = 0 or 4 (Grid AoE tile)
0017655c: 02602021 addu r4,r19,r0               |Send Counter
00176560: 14400046 bne r2,r0,0x0017667c         #If There is no AoE to spread  Go to next iteration
00176564: 00000000 nop                              |
00176568: 0c05d57a jal 0x001755e8               |-->Set_spreading_Tile_X_and_Y_coordinates
0017656c: 34120001 ori r18,r0,0x0001            |
00176570: 92820005 lbu r2,0x0005(r20)           |Acting Unit Jump/2
00176574: 00000000 nop                          |
00176578: 10400040 beq r2,r0,0x0017667c         #If Acting Unit Jump = 0x00  Go to next iteration
0017657c: 00000000 nop                              |

00176580: 8e220010 lw r2,0x0010(r17)                |Pointer : Origin Tile Grid data
00176584: 00000000 nop                              |
00176588: 90420000 lbu r2,0x0000(r2)                |Origin AoE of Moves
0017658c: 00000000 nop                              |
00176590: 00521023 subu r2,r2,r18                   |AoE - Jump Counter
00176594: a6220024 sh r2,0x0024(r17)                |Store Decreased move's AoE
00176598: 00021400 sll r2,r2,0x10                   |
0017659c: 00021403 sra r2,r2,0x10                   |
001765a0: 28420002 slti r2,r2,0x0002                |
001765a4: 14400035 bne r2,r0,0x0017667c             #If Remaining AoE >=2
001765a8: 00000000 nop                                  |
001765ac: 0c05d586 jal 0x00175618                       |-->Check_Spreading_Tile_Coordinates
001765b0: 00000000 nop                                  |
001765b4: 14400031 bne r2,r0,0x0017667c                 #If Destination Coordinate are valid
001765b8: 00000000 nop                                      |
001765bc: 86230032 lh r3,0x0032(r17)                        |Destination Y
001765c0: 92820018 lbu r2,0x0018(r20)                       |Map Max X
001765c4: 00000000 nop                                      |
001765c8: 00620018 mult r3,r2                               |
001765cc: 92250044 lbu r5,0x0044(r17)                       |Origin Exit Side Slope Mod (Jal)
001765d0: 92260045 lbu r6,0x0045(r17)                       |Destination Entry Side Slope Mod
001765d4: 92270048 lbu r7,0x0048(r17)                       |Origin Exit Side Height
001765d8: 86220030 lh r2,0x0030(r17)                        |Destination X
001765dc: 00002012 mflo r4                                  |Max X * Destination Y
001765e0: 0c05d88b jal 0x0017622c                           |-->Check_Horizontal_Jump_option returns r2 = 0x00 if Unit can Jump
001765e4: 00822021 addu r4,r4,r2                            |Destination Tile ID (without elevation)
001765e8: 14400024 bne r2,r0,0x0017667c                     #If Cannot Jump in that direction  Go to next iteration
001765ec: 26430001 addiu r3,r18,0x0001                          |
001765f0: 8622003a lh r2,0x003a(r17)                        |Destination X direction
001765f4: 00000000 nop                                      |
001765f8: 00430018 mult r2,r3                               |
001765fc: 00002012 mflo r4                                  |X direction * Jump counter
00176600: 8622003c lh r2,0x003c(r17)                        |Destination Y direction
00176604: 00000000 nop                                      |
00176608: 00430018 mult r2,r3                               |
0017660c: 96220026 lhu r2,0x0026(r17)                       |X coordinates
00176610: 00000000 nop                                      |
00176614: 00441021 addu r2,r2,r4                            |X coordinates + Jump Mod
00176618: a6220030 sh r2,0x0030(r17)                        |Potential Jump destination X coordinates
0017661c: 96220028 lhu r2,0x0028(r17)                       |
00176620: 00001812 mflo r3                                  |Y direction * Jump counter
00176624: 00431021 addu r2,r2,r3                            |Y coordinates + Jump Mod
00176628: 0c05d586 jal 0x00175618                           |-->Check_Spreading_Tile_Coordinates
0017662c: a6220032 sh r2,0x0032(r17)                        |Potential Jump destination Y coordinates
00176630: 14400012 bne r2,r0,0x0017667c                     #If destination coordinates are valid
00176634: 00000000 nop                                          |
00176638: 92220055 lbu r2,0x0055(r17)                           |Load 2nd loop counter
0017663c: 00000000 nop                                          |
00176640: 18400009 blez r2,0x00176668                           #If this counter is invalid   Go to next iteration
00176644: 00008021 addu r16,r0,r0                                   |
00176648: 02002021 addu r4,r16,r0                               |
                                                                @LOOP 4 Times
0017664c: 0c05d656 jal 0x00175958                                   |-->Movement_routine Enable Flag on Jumpable Tiles (4 directions both elevation)
00176650: 02402821 addu r5,r18,r0                                   |
00176654: 92220055 lbu r2,0x0055(r17)                               |2nd loop counter
00176658: 26100001 addiu r16,r16,0x0001                             |Counter +1
0017665c: 0202102a slt r2,r16,r2                                    |
00176660: 1440fffa bne r2,r0,0x0017664c                         Λ Loop
00176664: 02002021 addu r4,r16,r0                                   |
00176668: 92820005 lbu r2,0x0005(r20)               |Acting Unit Jump/2
0017666c: 26520001 addiu r18,r18,0x0001             |Counter + 1
00176670: 0052102a slt r2,r2,r18                    |
00176674: 1040ffc2 beq r2,r0,0x00176580         Λ Loop While counter < Acting Unit Jump/2
00176678: 00000000 nop                              |
0017667c: 92220054 lbu r2,0x0054(r17)           |Loop counter
00176680: 26730001 addiu r19,r19,0x0001         |Counter + 1
00176684: 0262102a slt r2,r19,r2                |
00176688: 1440ffa4 bne r2,r0,0x0017651c     Λ Loop while counter < ScratchPad counter
0017668c: 2a620004 slti r2,r19,0x0004           |
00176690: 8fbf0034 lw r31,0x0034(r29)       END
00176694: 8fb40030 lw r20,0x0030(r29)
00176698: 8fb3002c lw r19,0x002c(r29)
0017669c: 8fb20028 lw r18,0x0028(r29)
001766a0: 8fb10024 lw r17,0x0024(r29)
001766a4: 8fb00020 lw r16,0x0020(r29)
001766a8: 27bd0038 addiu r29,r29,0x0038
001766ac: 03e00008 jr r31
001766b0: 00000000 nop

Notes

Table of Spreading routines - 8018f500 
   0x00 - 801754d0 Spread_Move_to_East_Preset
   0x04 - 801754f4 Spread_Move_to_North_Preset
   0x08 - 8017551c Spread_Move_to_West_Preset
   0x0c - 80175540 Spread_Move_to_South_Preset

Return Location

BATTLE.BIN
00174d24: 00174b8c_-_00174df4
00178804: Calculate_Pathing