Difference between revisions of "0006c2bc - 0006c31c"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 0006c2bc: 9085007d lbu r5,0x007d(r4) 0006c2c0: 90830081 lbu r3,0x0081(r4) 0006c2c4: 00000000 nop 0006c2c8: 00a3102b sltu r2,r5,r3 0006c2cc: 10...")
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
 
   
 
   
  0006c2bc: 9085007d lbu r5,0x007d(r4)
+
  0006c2bc: 9085007d lbu r5,0x007d(r4)                   unit's Y coordinate
  0006c2c0: 90830081 lbu r3,0x0081(r4)
+
  0006c2c0: 90830081 lbu r3,0x0081(r4)                    unit's Y coordinate (destination?)
 
  0006c2c4: 00000000 nop
 
  0006c2c4: 00000000 nop
  0006c2c8: 00a3102b sltu r2,r5,r3
+
  0006c2c8: 00a3102b sltu r2,r5,r3                       1 if Y < destY
  0006c2cc: 10400003 beq r2,r0,0x0006c2dc
+
  0006c2cc: 10400003 beq r2,r0,0x0006c2dc                 branch if destination Y is less than/equal to current Y
 
  0006c2d0: 00000000 nop
 
  0006c2d0: 00000000 nop
 
  0006c2d4: 0801b0c6 j 0x0006c318
 
  0006c2d4: 0801b0c6 j 0x0006c318
  0006c2d8: 34030002 ori r3,r0,0x0002
+
  0006c2d8: 34030002 ori r3,r0,0x0002                     return move north
  0006c2dc: 0065102b sltu r2,r3,r5
+
 
  0006c2e0: 1440000d bne r2,r0,0x0006c318
+
  0006c2dc: 0065102b sltu r2,r3,r5                       1 if destY < Y
  0006c2e4: 00001821 addu r3,r0,r0
+
  0006c2e0: 1440000d bne r2,r0,0x0006c318                 branch if destination Y is less than current Y
  0006c2e8: 9085007c lbu r5,0x007c(r4)
+
  0006c2e4: 00001821 addu r3,r0,r0                       return move south
  0006c2ec: 90840080 lbu r4,0x0080(r4)
+
 
 +
  0006c2e8: 9085007c lbu r5,0x007c(r4)                   unit's X coord
 +
  0006c2ec: 90840080 lbu r4,0x0080(r4)                    unit's X coord (destination?)
 
  0006c2f0: 00000000 nop
 
  0006c2f0: 00000000 nop
  0006c2f4: 0085102b sltu r2,r4,r5
+
  0006c2f4: 0085102b sltu r2,r4,r5                       1 if destX < x
  0006c2f8: 10400003 beq r2,r0,0x0006c308
+
  0006c2f8: 10400003 beq r2,r0,0x0006c308                 branch if destination X is greater than/equal to current x
 
  0006c2fc: 00000000 nop
 
  0006c2fc: 00000000 nop
 
  0006c300: 0801b0c6 j 0x0006c318
 
  0006c300: 0801b0c6 j 0x0006c318
  0006c304: 34030003 ori r3,r0,0x0003
+
  0006c304: 34030003 ori r3,r0,0x0003                     return move west
  0006c308: 00a4102b sltu r2,r5,r4
+
 
  0006c30c: 10400002 beq r2,r0,0x0006c318
+
  0006c308: 00a4102b sltu r2,r5,r4      
  0006c310: 34030002 ori r3,r0,0x0002
+
  0006c30c: 10400002 beq r2,r0,0x0006c318                 branch if destination X is less than/equal to current X
  0006c314: 34030001 ori r3,r0,0x0001
+
  0006c310: 34030002 ori r3,r0,0x0002                     if error return move north
 +
  0006c314: 34030001 ori r3,r0,0x0001                     enable move east
 
  0006c318: 03e00008 jr r31
 
  0006c318: 03e00008 jr r31
 
  0006c31c: 00601021 addu r2,r3,r0
 
  0006c31c: 00601021 addu r2,r3,r0
 
</font>
 
</font>

Latest revision as of 02:44, 3 May 2024

0006c2bc: 9085007d lbu r5,0x007d(r4)                    unit's Y coordinate
0006c2c0: 90830081 lbu r3,0x0081(r4)                    unit's Y coordinate (destination?)
0006c2c4: 00000000 nop
0006c2c8: 00a3102b sltu r2,r5,r3                        1 if Y < destY
0006c2cc: 10400003 beq r2,r0,0x0006c2dc                 branch if destination Y is less than/equal to current Y
0006c2d0: 00000000 nop
0006c2d4: 0801b0c6 j 0x0006c318
0006c2d8: 34030002 ori r3,r0,0x0002                     return move north
0006c2dc: 0065102b sltu r2,r3,r5                        1 if destY < Y
0006c2e0: 1440000d bne r2,r0,0x0006c318                 branch if destination Y is less than current Y
0006c2e4: 00001821 addu r3,r0,r0                        return move south
0006c2e8: 9085007c lbu r5,0x007c(r4)                    unit's X coord
0006c2ec: 90840080 lbu r4,0x0080(r4)                    unit's X coord (destination?)
0006c2f0: 00000000 nop
0006c2f4: 0085102b sltu r2,r4,r5                        1 if destX < x
0006c2f8: 10400003 beq r2,r0,0x0006c308                 branch if destination X is greater than/equal to current x
0006c2fc: 00000000 nop
0006c300: 0801b0c6 j 0x0006c318
0006c304: 34030003 ori r3,r0,0x0003                     return move west
0006c308: 00a4102b sltu r2,r5,r4       
0006c30c: 10400002 beq r2,r0,0x0006c318                 branch if destination X is less than/equal to current X
0006c310: 34030002 ori r3,r0,0x0002                     if error return move north
0006c314: 34030001 ori r3,r0,0x0001                     enable move east
0006c318: 03e00008 jr r31
0006c31c: 00601021 addu r2,r3,r0