Difference between revisions of "Float/Float/Fly movements"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Added the last four lines back in.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  Float/Float/Fly movements (and some other stuff)
+
  Parameters : r4 = unit data pointer
  0017f020: 9086005a lbu r6,0x005a(r4) Load 3rd set of Current Status
+
Return r2 = holding various flags
  0017f024: 90850095 lbu r5,0x0095(r4) Load 3rd set of Movements
+
            0x01 -
  0017f028: 90840094 lbu r4,0x0094(r4) Load 2nd set of Movements
+
            0x02 - Unit uses silent walk movement skill
  0017f02c: 30c20040 andi r2,r6,0x0040
+
            0x04 -
  0017f030: 10400002 beq r2,r0,0x0017f03c Branch if Unit doesn't have Float
+
            0x08 - Unit uses Teleport*Teleport 2 (never with 0x80)
  0017f034: 00001821 addu r3,r0,r0 R3 = 0
+
            0x10 - Unit uses move in water (never with 0x20, 0x40)
  0017f038: 34a50008 ori r5,r5,0x0008
+
            0x20 - Unit uses move on water (never with 0x10, 0x40)
  0017f03c: 30c20006 andi r2,r6,0x0006
+
            0x40 - Unit is floating (never with 0x10,0x20)
  0017f040: 10400003 beq r2,r0,0x0017f050 Branch if unit doesn't have Frog  or Chicken
+
            0x80 - Unit is flying (never with 0x08)
  0017f044: 30a20080 andi r2,r5,0x0080
+
----------------------------------------------------------------------------
  0017f048: 30a500fb andi r5,r5,0x00fb
+
  0017f020: 9086005a lbu r6,0x005a(r4)       |{{f/load|<nowiki>r6 = Unit's 3rd set of Current Status</nowiki>}}
  0017f04c: 30a20080 andi r2,r5,0x0080
+
  0017f024: 90850095 lbu r5,0x0095(r4)       |{{f/load|<nowiki>r5 = Unit's 3rd set of Movements</nowiki>}}
  0017f050: 10400003 beq r2,r0,0x0017f060
+
  0017f028: 90840094 lbu r4,0x0094(r4)       |{{f/load|<nowiki>r4 = Unit's 2nd set of Movements</nowiki>}}
  0017f054: 30a20040 andi r2,r5,0x0040
+
  0017f02c: 30c20040 andi r2,r6,0x0040       |{{f/std|<nowiki>r2 = 0x40 if unit have float</nowiki>}}
  0017f058: 0805fc1b j 0x0017f06c
+
  0017f030: 10400002 beq r2,r0,0x0017f03c     {{f/Cond|<nowiki>If unit have float</nowiki>}} {{f/std|<nowiki>Else branch to frog-chicken check</nowiki>}}
  0017f05c: 34030020 ori r3,r0,0x0020
+
  0017f034: 00001821 addu r3,r0,r0           |{{f/std|<nowiki>r3 = 0x00</nowiki>}}
  0017f060: 10400003 beq r2,r0,0x0017f070
+
  0017f038: 34a50008 ori r5,r5,0x0008             |{{f/load|<nowiki>r5 = Unit's 3rd set of movements updated with float movement</nowiki>}}
  0017f064: 30a20002 andi r2,r5,0x0002
+
  0017f03c: 30c20006 andi r2,r6,0x0006       |{{f/std|<nowiki>r2 = 0x06 if unit have frog or chicken</nowiki>}}
  0017f068: 34030010 ori r3,r0,0x0010
+
  0017f040: 10400003 beq r2,r0,0x0017f050     {{f/Cond|<nowiki>If unit is a frog or a chicken</nowiki>}} {{f/std|<nowiki> Else branch to movement skill scheck</nowiki>}}
  0017f06c: 30a20002 andi r2,r5,0x0002
+
  0017f044: 30a20080 andi r2,r5,0x0080       |{{f/std|<nowiki>r2 = 0x80 if unit use walk on water</nowiki>}}
  0017f070: 10400002 beq r2,r0,0x0017f07c
+
  0017f048: 30a500fb andi r5,r5,0x00fb             |{{f/load|<nowiki>r5 = Unit's 3rd set of movements updated without fly</nowiki>}}
  0017f074: 30a20004 andi r2,r5,0x0004
+
  0017f04c: 30a20080 andi r2,r5,0x0080             |{{f/std|<nowiki>r2 = 0x80 if unit use walk on water</nowiki>}}
  0017f078: 34630002 ori r3,r3,0x0002
+
  0017f050: 10400003 beq r2,r0,0x0017f060     {{f/Cond|<nowiki>If unit use walk on water</nowiki>}}
  0017f07c: 10400003 beq r2,r0,0x0017f08c
+
  0017f054: 30a20040 andi r2,r5,0x0040       |{{f/std|<nowiki>r2 = 0x40 if unit use move in water</nowiki>}}
  0017f080: 3082000c andi r2,r4,0x000c
+
  0017f058: 0805fc1b j 0x0017f06c                 {{f/jump|<nowiki>jump avoiding move in water check</nowiki>}}
  0017f084: 0805fc25 j 0x0017f094
+
  0017f05c: 34030020 ori r3,r0,0x0020             |{{f/std|<nowiki>r3 = 0x20</nowiki>}}
  0017f088: 34640080 ori r4,r3,0x0080
+
  0017f060: 10400003 beq r2,r0,0x0017f070     {{f/Cond|<nowiki> Else If unit use move in water</nowiki>}} {{f/std|<nowiki> (and not using move on water)</nowiki>}}
  0017f08c: 10400007 beq r2,r0,0x0017f0ac
+
  0017f064: 30a20002 andi r2,r5,0x0002       |{{f/std|<nowiki>r2 = 0x02 if unit uses silent walk</nowiki>}}
  0017f090: 34640008 ori r4,r3,0x0008
+
  0017f068: 34030010 ori r3,r0,0x0010             |{{f/std|<nowiki>r3 = 0x10 </nowiki>}}
  0017f094: 30a20008 andi r2,r5,0x0008
+
  0017f06c: 30a20002 andi r2,r5,0x0002             |{{f/std|<nowiki>r2 = 0x02 if unit uses silent walk</nowiki>}} '''>''' Walk on water jump landing site
  0017f098: 10400012 beq r2,r0,0x0017f0e4
+
  0017f070: 10400002 beq r2,r0,0x0017f07c     {{f/Cond|<nowiki>If unit uses silent walk</nowiki>}} /Else branch to fly check
  0017f09c: 00801821 addu r3,r4,r0
+
  0017f074: 30a20004 andi r2,r5,0x0004       |{{f/std|<nowiki>r2 = 0x04 if unit uses fly (and is not a frog)</nowiki>}}
  0017f0a0: 3082008e andi r2,r4,0x008e
+
  0017f078: 34630002 ori r3,r3,0x0002             |{{f/std|<nowiki>r3 = r3 updated with 0x02</nowiki>}}
  0017f0a4: 0805fc39 j 0x0017f0e4
+
  0017f07c: 10400003 beq r2,r0,0x0017f08c     {{f/Cond|<nowiki>If unit is flying</nowiki>}} /Else branch to teleport check
  0017f0a8: 34430040 ori r3,r2,0x0040
+
  0017f080: 3082000c andi r2,r4,0x000c       |{{f/std|<nowiki>r2 <>0x00 if unit uses teleport or teleport 2</nowiki>}}
  0017f0ac: 30a20008 andi r2,r5,0x0008
+
  0017f084: 0805fc25 j 0x0017f094                 {{f/jump|<nowiki>jump further</nowiki>}} (avoid teleport check and flag if flying)
  0017f0b0: 10400003 beq r2,r0,0x0017f0c0
+
  0017f088: 34640080 ori r4,r3,0x0080             |{{f/std|<nowiki>r4 = r3 updated with 0x80</nowiki>}}
  0017f0b4: 30620006 andi r2,r3,0x0006
+
  0017f08c: 10400007 beq r2,r0,0x0017f0ac     {{f/Cond|<nowiki>If unit uses teleport</nowiki>}} /Else branch to float check
  0017f0b8: 0805fc39 j 0x0017f0e4
+
  0017f090: 34640008 ori r4,r3,0x0008             |{{f/std|<nowiki>r4 = r3 updated + 0x08</nowiki>}}
  0017f0bc: 34430040 ori r3,r2,0x0040
+
  0017f094: 30a20008 andi r2,r5,0x0008             |{{f/std|<nowiki>r2 = 0x08 if unit have float movement</nowiki>}}  Flying jump landing here
  0017f0c0: 30a20080 andi r2,r5,0x0080
+
  0017f098: 10400012 beq r2,r0,0x0017f0e4         {{f/Cond|<nowiki>If unit uses float (and is teleporting or flying)</nowiki>}} /Else branch to end (avoid float check)
  0017f0c4: 10400003 beq r2,r0,0x0017f0d4
+
  0017f09c: 00801821 addu r3,r4,r0                 |{{f/std|<nowiki>r3 = r3 with fly or teleport enabled</nowiki>}}
  0017f0c8: 00000000 nop
+
  0017f0a0: 3082008e andi r2,r4,0x008e                 |{{f/std|<nowiki>r2 = r4  without walk on/in water flags</nowiki>}}
  0017f0cc: 0805fc39 j 0x0017f0e4
+
  0017f0a4: 0805fc39 j 0x0017f0e4                     {{f/jump|<nowiki>jump to end</nowiki>}} (r3 updated with 0x40, without 0x10 and 0x20)
  0017f0d0: 34630020 ori r3,r3,0x0020
+
  0017f0a8: 34430040 ori r3,r2,0x0040                 |{{f/std|<nowiki>r3 = r2 updated with 0x40 flag</nowiki>}}
  0017f0d4: 30a20040 andi r2,r5,0x0040
+
  0017f0ac: 30a20008 andi r2,r5,0x0008       {{f/Cond|<nowiki>Else (unit doesn't uses teleport)</nowiki>}} {{f/std|<nowiki>r2 = 0x08 if unit's uses/have float</nowiki>}}
  0017f0d8: 10400002 beq r2,r0,0x0017f0e4
+
  0017f0b0: 10400003 beq r2,r0,0x0017f0c0     {{f/Cond|<nowiki>If unit is floating</nowiki>}} /Else branch to move on water check
 +
  0017f0b4: 30620006 andi r2,r3,0x0006             |{{f/std|<nowiki>r2 = 0x02 if unit uses silent walk</nowiki>}}
 +
  0017f0b8: 0805fc39 j 0x0017f0e4                 {{f/jump|<nowiki>jump to end</nowiki>}} (r3 = 0x42)
 +
  0017f0bc: 34430040 ori r3,r2,0x0040             |{{f/std|<nowiki>r3 = 0x42</nowiki>}}
 +
  0017f0c0: 30a20080 andi r2,r5,0x0080       |{{f/std|<nowiki>Else (not floating)</nowiki>}} {{f/std|<nowiki>r2 = 0x80 if unit uses walk on water</nowiki>}}
 +
  0017f0c4: 10400003 beq r2,r0,0x0017f0d4     {{f/Cond|<nowiki>If unit Walks on water</nowiki>}} {{f/std|<nowiki>(second check ? Wtf ?)</nowiki>}}
 +
  0017f0c8: 00000000 nop                           |{{f/std|<nowiki> </nowiki>}}
 +
  0017f0cc: 0805fc39 j 0x0017f0e4                 {{f/jump|<nowiki>jump to end</nowiki>}}
 +
  0017f0d0: 34630020 ori r3,r3,0x0020             |{{f/std|<nowiki>r3 is updated with 0x20</nowiki>}}
 +
  0017f0d4: 30a20040 andi r2,r5,0x0040       |{{f/std|<nowiki>r2 = 0x40 if unit uses walk in water</nowiki>}}
 +
  0017f0d8: 10400002 beq r2,r0,0x0017f0e4     {{f/Cond|<nowiki>If unit uses walk in water</nowiki>}} {{f/Cond|<nowiki>branch to end</nowiki>}}
 
  0017f0dc: 00000000 nop
 
  0017f0dc: 00000000 nop
  0017f0e0: 34630010 ori r3,r3,0x0010
+
  0017f0e0: 34630010 ori r3,r3,0x0010             |{{f/std|<nowiki>r3 is updated with 0x10</nowiki>}}
 
  0017f0e4: 03e00008 jr r31
 
  0017f0e4: 03e00008 jr r31
 
  0017f0e8: 306200ff andi r2,r3,0x00ff
 
  0017f0e8: 306200ff andi r2,r3,0x00ff
  
 +
=== Return Locations ===
  
== Return Locations ==
+
  0006dcb0: - [[Knockback_with_bows%3F]]
 
+
  0007d01c: - [[0007cff8_-_0007d09c]]
  0006dca8: - [[Routine at 6dc8c]]
+
  0007d1ec: - [[Complex_Height_Data_from_unit_misc_data_and_coordinates]]
  0007d014: - [[Routine at 7cff8]]
+
  00082820: - [[Movement_validation_-_float/fly%3F]]
  0007d1e4: - [[Routine at 7d0d4]]
+
  0008402c: - [[Update_Sprite_display_data]]
  00082818: - [[Routine at 8278c]]
+
  00086d04: - [[00086b44_-_00086dc0]]
  00084024: - [[Routine at 83f18]]
+
  00177164: - [[00176c90_-_0017717c]]
  00086cfc: - [[Routine at 86b44]]
 
  0017715c: - [[Routine at 176c90]]
 
 
  00184584: - [[Knockback Calculation]]
 
  00184584: - [[Knockback Calculation]]

Latest revision as of 03:12, 10 October 2024

Parameters : r4 = unit data pointer
Return r2 = holding various flags
            0x01 - 
            0x02 - Unit uses silent walk movement skill
            0x04 -
            0x08 - Unit uses Teleport*Teleport 2 (never with 0x80)
            0x10 - Unit uses move in water (never with 0x20, 0x40)
            0x20 - Unit uses move on water (never with 0x10, 0x40)
            0x40 - Unit is floating (never with 0x10,0x20)
            0x80 - Unit is flying (never with 0x08)
---------------------------------------------------------------------------- 
0017f020: 9086005a lbu r6,0x005a(r4)        |r6 = Unit's 3rd set of Current Status
0017f024: 90850095 lbu r5,0x0095(r4)        |r5 = Unit's 3rd set of Movements
0017f028: 90840094 lbu r4,0x0094(r4)        |r4 = Unit's 2nd set of Movements
0017f02c: 30c20040 andi r2,r6,0x0040        |r2 = 0x40 if unit have float
0017f030: 10400002 beq r2,r0,0x0017f03c     #If unit have float Else branch to frog-chicken check
0017f034: 00001821 addu r3,r0,r0            |r3 = 0x00
0017f038: 34a50008 ori r5,r5,0x0008              |r5 = Unit's 3rd set of movements updated with float movement
0017f03c: 30c20006 andi r2,r6,0x0006        |r2 = 0x06 if unit have frog or chicken
0017f040: 10400003 beq r2,r0,0x0017f050     #If unit is a frog or a chicken  Else branch to movement skill scheck
0017f044: 30a20080 andi r2,r5,0x0080        |r2 = 0x80 if unit use walk on water
0017f048: 30a500fb andi r5,r5,0x00fb             |r5 = Unit's 3rd set of movements updated without fly
0017f04c: 30a20080 andi r2,r5,0x0080             |r2 = 0x80 if unit use walk on water
0017f050: 10400003 beq r2,r0,0x0017f060     #If unit use walk on water
0017f054: 30a20040 andi r2,r5,0x0040        |r2 = 0x40 if unit use move in water
0017f058: 0805fc1b j 0x0017f06c                  >>jump avoiding move in water check
0017f05c: 34030020 ori r3,r0,0x0020              |r3 = 0x20
0017f060: 10400003 beq r2,r0,0x0017f070     # Else If unit use move in water  (and not using move on water)
0017f064: 30a20002 andi r2,r5,0x0002        |r2 = 0x02 if unit uses silent walk
0017f068: 34030010 ori r3,r0,0x0010              |r3 = 0x10 
0017f06c: 30a20002 andi r2,r5,0x0002             |r2 = 0x02 if unit uses silent walk > Walk on water jump landing site
0017f070: 10400002 beq r2,r0,0x0017f07c     #If unit uses silent walk /Else branch to fly check
0017f074: 30a20004 andi r2,r5,0x0004        |r2 = 0x04 if unit uses fly (and is not a frog)
0017f078: 34630002 ori r3,r3,0x0002              |r3 = r3 updated with 0x02
0017f07c: 10400003 beq r2,r0,0x0017f08c     #If unit is flying /Else branch to teleport check
0017f080: 3082000c andi r2,r4,0x000c        |r2 <>0x00 if unit uses teleport or teleport 2
0017f084: 0805fc25 j 0x0017f094                  >>jump further (avoid teleport check and flag if flying)
0017f088: 34640080 ori r4,r3,0x0080              |r4 = r3 updated with 0x80
0017f08c: 10400007 beq r2,r0,0x0017f0ac     #If unit uses teleport /Else branch to float check
0017f090: 34640008 ori r4,r3,0x0008              |r4 = r3 updated + 0x08
0017f094: 30a20008 andi r2,r5,0x0008             |r2 = 0x08 if unit have float movement  Flying jump landing here
0017f098: 10400012 beq r2,r0,0x0017f0e4          #If unit uses float (and is teleporting or flying) /Else branch to end (avoid float check)
0017f09c: 00801821 addu r3,r4,r0                 |r3 = r3 with fly or teleport enabled
0017f0a0: 3082008e andi r2,r4,0x008e                 |r2 = r4  without walk on/in water flags
0017f0a4: 0805fc39 j 0x0017f0e4                      >>jump to end (r3 updated with 0x40, without 0x10 and 0x20)
0017f0a8: 34430040 ori r3,r2,0x0040                  |r3 = r2 updated with 0x40 flag
0017f0ac: 30a20008 andi r2,r5,0x0008        #Else (unit doesn't uses teleport) r2 = 0x08 if unit's uses/have float
0017f0b0: 10400003 beq r2,r0,0x0017f0c0     #If unit is floating /Else branch to move on water check
0017f0b4: 30620006 andi r2,r3,0x0006             |r2 = 0x02 if unit uses silent walk
0017f0b8: 0805fc39 j 0x0017f0e4                  >>jump to end (r3 = 0x42)
0017f0bc: 34430040 ori r3,r2,0x0040              |r3 = 0x42
0017f0c0: 30a20080 andi r2,r5,0x0080        |Else (not floating) r2 = 0x80 if unit uses walk on water
0017f0c4: 10400003 beq r2,r0,0x0017f0d4     #If unit Walks on water (second check ? Wtf ?)
0017f0c8: 00000000 nop                           | 
0017f0cc: 0805fc39 j 0x0017f0e4                  >>jump to end
0017f0d0: 34630020 ori r3,r3,0x0020              |r3 is updated with 0x20
0017f0d4: 30a20040 andi r2,r5,0x0040        |r2 = 0x40 if unit uses walk in water
0017f0d8: 10400002 beq r2,r0,0x0017f0e4     #If unit uses walk in water #branch to end
0017f0dc: 00000000 nop
0017f0e0: 34630010 ori r3,r3,0x0010              |r3 is updated with 0x10
0017f0e4: 03e00008 jr r31
0017f0e8: 306200ff andi r2,r3,0x00ff

Return Locations

0006dcb0: - Knockback_with_bows?
0007d01c: - 0007cff8_-_0007d09c
0007d1ec: - Complex_Height_Data_from_unit_misc_data_and_coordinates
00082820: - Movement_validation_-_float/fly?
0008402c: - Update_Sprite_display_data
00086d04: - 00086b44_-_00086dc0
00177164: - 00176c90_-_0017717c
00184584: - Knockback Calculation