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

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
  0017f028: 90840094 lbu r4,0x0094(r4) Load 2nd set of Movements
 
  0017f028: 90840094 lbu r4,0x0094(r4) Load 2nd set of Movements
 
  0017f02c: 30c20040 andi r2,r6,0x0040
 
  0017f02c: 30c20040 andi r2,r6,0x0040
  0017f030: 10400002 beq r2,r0,0x0017f03c Branch if Unit doesn't have Float
+
  0017f030: 10400002 beq r2,r0,0x0017f03c Branch if Unit doesn't have Float status
 
  0017f034: 00001821 addu r3,r0,r0 R3 = 0
 
  0017f034: 00001821 addu r3,r0,r0 R3 = 0
  0017f038: 34a50008 ori r5,r5,0x0008
+
  0017f038: 34a50008 ori r5,r5,0x0008 enable float movement support
 
  0017f03c: 30c20006 andi r2,r6,0x0006
 
  0017f03c: 30c20006 andi r2,r6,0x0006
 
  0017f040: 10400003 beq r2,r0,0x0017f050 Branch if unit doesn't have Frog  or Chicken
 
  0017f040: 10400003 beq r2,r0,0x0017f050 Branch if unit doesn't have Frog  or Chicken
  0017f044: 30a20080 andi r2,r5,0x0080
+
  0017f044: 30a20080 andi r2,r5,0x0080 walk on water
  0017f048: 30a500fb andi r5,r5,0x00fb
+
  0017f048: 30a500fb andi r5,r5,0x00fb remove fly flag
  0017f04c: 30a20080 andi r2,r5,0x0080
+
  0017f04c: 30a20080 andi r2,r5,0x0080 walk on water
  0017f050: 10400003 beq r2,r0,0x0017f060
+
  0017f050: 10400003 beq r2,r0,0x0017f060 branch if unit doesn't have walk on water
  0017f054: 30a20040 andi r2,r5,0x0040
+
  0017f054: 30a20040 andi r2,r5,0x0040 move in water
 
  0017f058: 0805fc1b j 0x0017f06c
 
  0017f058: 0805fc1b j 0x0017f06c
  0017f05c: 34030020 ori r3,r0,0x0020
+
  0017f05c: 34030020 ori r3,r0,0x0020 set r3 = 0x20 (unit has walk on water?
  0017f060: 10400003 beq r2,r0,0x0017f070
+
  0017f060: 10400003 beq r2,r0,0x0017f070 branch if unit doesn't have move in water
  0017f064: 30a20002 andi r2,r5,0x0002
+
  0017f064: 30a20002 andi r2,r5,0x0002 silent walk
  0017f068: 34030010 ori r3,r0,0x0010
+
  0017f068: 34030010 ori r3,r0,0x0010 set r3 = 0x10 (unit has move in water?)
 
  0017f06c: 30a20002 andi r2,r5,0x0002
 
  0017f06c: 30a20002 andi r2,r5,0x0002
  0017f070: 10400002 beq r2,r0,0x0017f07c
+
  0017f070: 10400002 beq r2,r0,0x0017f07c branch if unit doesn't have silent walk
  0017f074: 30a20004 andi r2,r5,0x0004
+
  0017f074: 30a20004 andi r2,r5,0x0004 fly
  0017f078: 34630002 ori r3,r3,0x0002
+
  0017f078: 34630002 ori r3,r3,0x0002 enable flag 0x02 - silent walk
  0017f07c: 10400003 beq r2,r0,0x0017f08c
+
  0017f07c: 10400003 beq r2,r0,0x0017f08c branch if unit doesn't have fly
  0017f080: 3082000c andi r2,r4,0x000c
+
  0017f080: 3082000c andi r2,r4,0x000c teleports check
  0017f084: 0805fc25 j 0x0017f094
+
  0017f084: 0805fc25 j 0x0017f094               jump further
  0017f088: 34640080 ori r4,r3,0x0080
+
  0017f088: 34640080 ori r4,r3,0x0080           r4 = return flags + 0x80 (fly?)
  0017f08c: 10400007 beq r2,r0,0x0017f0ac
+
  0017f08c: 10400007 beq r2,r0,0x0017f0ac       branch if unit doesn't have teleports
  0017f090: 34640008 ori r4,r3,0x0008
+
  0017f090: 34640008 ori r4,r3,0x0008           r4 = return flags + 0x08 (teleport?)
  0017f094: 30a20008 andi r2,r5,0x0008
+
  0017f094: 30a20008 andi r2,r5,0x0008           float movement
  0017f098: 10400012 beq r2,r0,0x0017f0e4
+
  0017f098: 10400012 beq r2,r0,0x0017f0e4       branch if unit has teleports doesn't have float support
  0017f09c: 00801821 addu r3,r4,r0
+
  0017f09c: 00801821 addu r3,r4,r0               r3 = return flags (with fly or teleport)
  0017f0a0: 3082008e andi r2,r4,0x008e
+
  0017f0a0: 3082008e andi r2,r4,0x008e           r2 = return flags fly, teleport, 0x04,0x03,0x02
 
  0017f0a4: 0805fc39 j 0x0017f0e4
 
  0017f0a4: 0805fc39 j 0x0017f0e4
  0017f0a8: 34430040 ori r3,r2,0x0040
+
  0017f0a8: 34430040 ori r3,r2,0x0040           enable 0x40 return flag
 
  0017f0ac: 30a20008 andi r2,r5,0x0008
 
  0017f0ac: 30a20008 andi r2,r5,0x0008
  0017f0b0: 10400003 beq r2,r0,0x0017f0c0
+
  0017f0b0: 10400003 beq r2,r0,0x0017f0c0       branch if float support not present
  0017f0b4: 30620006 andi r2,r3,0x0006
+
  0017f0b4: 30620006 andi r2,r3,0x0006           r2 = silent walk, 0x04 flag
 
  0017f0b8: 0805fc39 j 0x0017f0e4
 
  0017f0b8: 0805fc39 j 0x0017f0e4
  0017f0bc: 34430040 ori r3,r2,0x0040
+
  0017f0bc: 34430040 ori r3,r2,0x0040           enable 0x40 return flag
 
  0017f0c0: 30a20080 andi r2,r5,0x0080
 
  0017f0c0: 30a20080 andi r2,r5,0x0080
 
  0017f0c4: 10400003 beq r2,r0,0x0017f0d4
 
  0017f0c4: 10400003 beq r2,r0,0x0017f0d4
 
  0017f0c8: 00000000 nop
 
  0017f0c8: 00000000 nop
  0017f0cc: 0805fc39 j 0x0017f0e4
+
  0017f0cc: 0805fc39 j 0x0017f0e4                 jump to end, add 0x20 flag to r3
 
  0017f0d0: 34630020 ori r3,r3,0x0020
 
  0017f0d0: 34630020 ori r3,r3,0x0020
 
  0017f0d4: 30a20040 andi r2,r5,0x0040
 
  0017f0d4: 30a20040 andi r2,r5,0x0040
  0017f0d8: 10400002 beq r2,r0,0x0017f0e4
+
  0017f0d8: 10400002 beq r2,r0,0x0017f0e4         branch to end
 
  0017f0dc: 00000000 nop
 
  0017f0dc: 00000000 nop
 
  0017f0e0: 34630010 ori r3,r3,0x0010
 
  0017f0e0: 34630010 ori r3,r3,0x0010

Revision as of 13:54, 27 November 2012

Float/Float/Fly movements (and some other stuff)
0017f020: 9086005a lbu r6,0x005a(r4)		Load 3rd set of Current Status
0017f024: 90850095 lbu r5,0x0095(r4)		Load 3rd set of Movements
0017f028: 90840094 lbu r4,0x0094(r4)		Load 2nd set of Movements
0017f02c: 30c20040 andi r2,r6,0x0040		
0017f030: 10400002 beq r2,r0,0x0017f03c		Branch if Unit doesn't have Float status
0017f034: 00001821 addu r3,r0,r0		R3 = 0
0017f038: 34a50008 ori r5,r5,0x0008 		enable float movement support
0017f03c: 30c20006 andi r2,r6,0x0006	 	
0017f040: 10400003 beq r2,r0,0x0017f050		Branch if unit doesn't have Frog  or Chicken
0017f044: 30a20080 andi r2,r5,0x0080		walk on water
0017f048: 30a500fb andi r5,r5,0x00fb		remove fly flag
0017f04c: 30a20080 andi r2,r5,0x0080		walk on water
0017f050: 10400003 beq r2,r0,0x0017f060	branch if unit doesn't have walk on water
0017f054: 30a20040 andi r2,r5,0x0040		move in water
0017f058: 0805fc1b j 0x0017f06c			
0017f05c: 34030020 ori r3,r0,0x0020		set r3 = 0x20 (unit has walk on water?
0017f060: 10400003 beq r2,r0,0x0017f070	branch if unit doesn't have move in water	
0017f064: 30a20002 andi r2,r5,0x0002		silent walk
0017f068: 34030010 ori r3,r0,0x0010		set r3 = 0x10 (unit has move in water?)
0017f06c: 30a20002 andi r2,r5,0x0002		
0017f070: 10400002 beq r2,r0,0x0017f07c	branch if unit doesn't have silent walk	
0017f074: 30a20004 andi r2,r5,0x0004		fly
0017f078: 34630002 ori r3,r3,0x0002		enable flag 0x02 - silent walk
0017f07c: 10400003 beq r2,r0,0x0017f08c	branch if unit doesn't have fly	
0017f080: 3082000c andi r2,r4,0x000c		teleports check
0017f084: 0805fc25 j 0x0017f094                jump further
0017f088: 34640080 ori r4,r3,0x0080            r4 = return flags + 0x80 (fly?)
0017f08c: 10400007 beq r2,r0,0x0017f0ac        branch if unit doesn't have teleports
0017f090: 34640008 ori r4,r3,0x0008            r4 = return flags + 0x08 (teleport?)
0017f094: 30a20008 andi r2,r5,0x0008           float movement
0017f098: 10400012 beq r2,r0,0x0017f0e4        branch if unit has teleports doesn't have float support
0017f09c: 00801821 addu r3,r4,r0               r3 = return flags (with fly or teleport)
0017f0a0: 3082008e andi r2,r4,0x008e           r2 = return flags fly, teleport, 0x04,0x03,0x02
0017f0a4: 0805fc39 j 0x0017f0e4
0017f0a8: 34430040 ori r3,r2,0x0040            enable 0x40 return flag
0017f0ac: 30a20008 andi r2,r5,0x0008
0017f0b0: 10400003 beq r2,r0,0x0017f0c0        branch if float support not present
0017f0b4: 30620006 andi r2,r3,0x0006           r2 = silent walk, 0x04 flag
0017f0b8: 0805fc39 j 0x0017f0e4
0017f0bc: 34430040 ori r3,r2,0x0040            enable 0x40 return flag
0017f0c0: 30a20080 andi r2,r5,0x0080
0017f0c4: 10400003 beq r2,r0,0x0017f0d4
0017f0c8: 00000000 nop
0017f0cc: 0805fc39 j 0x0017f0e4                  jump to end, add 0x20 flag to r3
0017f0d0: 34630020 ori r3,r3,0x0020
0017f0d4: 30a20040 andi r2,r5,0x0040
0017f0d8: 10400002 beq r2,r0,0x0017f0e4          branch to end
0017f0dc: 00000000 nop
0017f0e0: 34630010 ori r3,r3,0x0010
0017f0e4: 03e00008 jr r31
0017f0e8: 306200ff andi r2,r3,0x00ff


Return Locations

0006dca8: - Routine at 6dc8c
0007d014: - Routine at 7cff8
0007d1e4: - Routine at 7d0d4
00082818: - Routine at 8278c
00084024: - Routine at 83f18
00086cfc: - Routine at 86b44
0017715c: - Routine at 176c90
00184584: - Knockback Calculation