Difference between revisions of "Find XYZ Position of Projectile Along Trajectory"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "< BATTLE.BIN 001af6d8: 00063200 sll r6,r6,0x08 001af6dc: 00052903 sra r5,r5,0x04 001af6e0: 00c5001a div r6,r5 001af6e4: 00003012 mflo r6 001af6e8: 8c820000 lw r2,0x0...")
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
< [[BATTLE.BIN]]
 
< [[BATTLE.BIN]]
  
  001af6d8: 00063200 sll r6,r6,0x08
+
  001af6d8: 00063200 sll r6,r6,0x08 #current position along vector * 0x100
  001af6dc: 00052903 sra r5,r5,0x04
+
  001af6dc: 00052903 sra r5,r5,0x04 #3d steps counter / 0x10
  001af6e0: 00c5001a div r6,r5
+
  001af6e0: 00c5001a div r6,r5 #current position along vector * 0x1000 / 3d steps counter (rounded to 0x10) (4096 is a familiar number.)
  001af6e4: 00003012 mflo r6
+
  001af6e4: 00003012 mflo r6 #a vector scale related to how far along the graphic has traveled over the course of the animation?
  001af6e8: 8c820000 lw r2,0x0000(r4)
+
  001af6e8: 8c820000 lw r2,0x0000(r4) #load x length of trajectory (vector, for, simplicity.)
 
  001af6ec: 00000000 nop
 
  001af6ec: 00000000 nop
  001af6f0: 00c20018 mult r6,r2
+
  001af6f0: 00c20018 mult r6,r2 #vector scalar * x vector
 
  001af6f4: 00001012 mflo r2
 
  001af6f4: 00001012 mflo r2
 
  001af6f8: 00021303 sra r2,r2,0x0c
 
  001af6f8: 00021303 sra r2,r2,0x0c
  001af6fc: ace20000 sw r2,0x0000(r7)
+
  001af6fc: ace20000 sw r2,0x0000(r7) #store new x position
  001af700: 8c820004 lw r2,0x0004(r4)
+
  001af700: 8c820004 lw r2,0x0004(r4) #load Z vector
 
  001af704: 00000000 nop
 
  001af704: 00000000 nop
  001af708: 00c20018 mult r6,r2
+
  001af708: 00c20018 mult r6,r2 #vector scalar * Z vector
 
  001af70c: 00001012 mflo r2
 
  001af70c: 00001012 mflo r2
 
  001af710: 00021303 sra r2,r2,0x0c
 
  001af710: 00021303 sra r2,r2,0x0c
  001af714: ace20004 sw r2,0x0004(r7)
+
  001af714: ace20004 sw r2,0x0004(r7) #store new Z position
  001af718: 8c820008 lw r2,0x0008(r4)
+
  001af718: 8c820008 lw r2,0x0008(r4) #load Y vector
 
  001af71c: 00000000 nop
 
  001af71c: 00000000 nop
  001af720: 00c20018 mult r6,r2
+
  001af720: 00c20018 mult r6,r2 #vector scalar * Y vector
 
  001af724: 00001012 mflo r2
 
  001af724: 00001012 mflo r2
 
  001af728: 00021303 sra r2,r2,0x0c
 
  001af728: 00021303 sra r2,r2,0x0c
 
  001af72c: 03e00008 jr r31
 
  001af72c: 03e00008 jr r31
  001af730: ace20008 sw r2,0x0008(r7)
+
  001af730: ace20008 sw r2,0x0008(r7) #store new Y vector

Latest revision as of 04:29, 5 November 2022

< BATTLE.BIN

001af6d8: 00063200 sll r6,r6,0x08			#current position along vector * 0x100
001af6dc: 00052903 sra r5,r5,0x04			#3d steps counter / 0x10
001af6e0: 00c5001a div r6,r5				#current position along vector * 0x1000 / 3d steps counter (rounded to 0x10) (4096 is a familiar number.)
001af6e4: 00003012 mflo r6				#a vector scale related to how far along the graphic has traveled over the course of the animation?
001af6e8: 8c820000 lw r2,0x0000(r4)			#load x length of trajectory (vector, for, simplicity.)
001af6ec: 00000000 nop
001af6f0: 00c20018 mult r6,r2				#vector scalar * x vector
001af6f4: 00001012 mflo r2
001af6f8: 00021303 sra r2,r2,0x0c
001af6fc: ace20000 sw r2,0x0000(r7)			#store new x position
001af700: 8c820004 lw r2,0x0004(r4)			#load Z vector
001af704: 00000000 nop
001af708: 00c20018 mult r6,r2				#vector scalar * Z vector
001af70c: 00001012 mflo r2
001af710: 00021303 sra r2,r2,0x0c
001af714: ace20004 sw r2,0x0004(r7)			#store new Z position
001af718: 8c820008 lw r2,0x0008(r4)			#load Y vector
001af71c: 00000000 nop
001af720: 00c20018 mult r6,r2				#vector scalar * Y vector
001af724: 00001012 mflo r2
001af728: 00021303 sra r2,r2,0x0c
001af72c: 03e00008 jr r31
001af730: ace20008 sw r2,0x0008(r7)			#store new Y vector