Difference between revisions of "Teleport distortion anim"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with "<font face='Courier New'> 00089638: 03e00008 jr r31 0008963c: 00000000 nop 00089640: 27bdffe0 addiu r29,r29,0xffe0 00089644: afb10014 sw r17,0x0014(r29) 00089648: 00808...")
 
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<font face='Courier New'>
+
Not actually used. looks funky, and befitting of a teleport animation, but ultimately unfitting given the art style.
   
+
 
 +
 
 +
  if 0x87 in misc data is 0x0 (impossible to branch to anyway. skipped by hardcoding.)
 
  00089638: 03e00008 jr r31
 
  00089638: 03e00008 jr r31
 
  0008963c: 00000000 nop
 
  0008963c: 00000000 nop
 +
 +
if 0x87 in misc data is 0x1:
 
  00089640: 27bdffe0 addiu r29,r29,0xffe0
 
  00089640: 27bdffe0 addiu r29,r29,0xffe0
 
  00089644: afb10014 sw r17,0x0014(r29)
 
  00089644: afb10014 sw r17,0x0014(r29)
  00089648: 00808821 addu r17,r4,r0
+
  00089648: 00808821 addu r17,r4,r0 r17 = Misc unit data pointer
 
  0008964c: afbf0018 sw r31,0x0018(r29)
 
  0008964c: afbf0018 sw r31,0x0018(r29)
 
  00089650: afb00010 sw r16,0x0010(r29)
 
  00089650: afb00010 sw r16,0x0010(r29)
  00089654: 8e230088 lw r3,0x0088(r17)
+
  00089654: 8e230088 lw r3,0x0088(r17) load distort-input (cleared by anim. instruction ffc1)
 
  00089658: 34040001 ori r4,r0,0x0001
 
  00089658: 34040001 ori r4,r0,0x0001
  0008965c: 10640010 beq r3,r4,0x000896a0
+
  0008965c: 10640010 beq r3,r4,0x000896a0 branch if equals 1
 
  00089660: 28620002 slti r2,r3,0x0002
 
  00089660: 28620002 slti r2,r3,0x0002
  00089664: 10400005 beq r2,r0,0x0008967c
+
  00089664: 10400005 beq r2,r0,0x0008967c branch if greater than or equal to 2
 
  00089668: 00000000 nop
 
  00089668: 00000000 nop
  0008966c: 10600008 beq r3,r0,0x00089690
+
  0008966c: 10600008 beq r3,r0,0x00089690 branch if 0
 
  00089670: 00000000 nop
 
  00089670: 00000000 nop
  00089674: 080225cc j 0x00089730
+
  00089674: 080225cc j 0x00089730 branch otherwise (there's a crippling error in the processing of math.)
 
  00089678: 00000000 nop
 
  00089678: 00000000 nop
 +
 +
if => 2
 
  0008967c: 34020002 ori r2,r0,0x0002
 
  0008967c: 34020002 ori r2,r0,0x0002
  00089680: 10620025 beq r3,r2,0x00089718
+
  00089680: 10620025 beq r3,r2,0x00089718 branch if equals 2
 
  00089684: 34031000 ori r3,r0,0x1000
 
  00089684: 34031000 ori r3,r0,0x1000
  00089688: 080225cc j 0x00089730
+
  00089688: 080225cc j 0x00089730 if > 2 don't do anything
 
  0008968c: 00000000 nop
 
  0008968c: 00000000 nop
 +
 +
if = 0
 
  00089690: 34020300 ori r2,r0,0x0300
 
  00089690: 34020300 ori r2,r0,0x0300
  00089694: ae240088 sw r4,0x0088(r17)
+
  00089694: ae240088 sw r4,0x0088(r17) store distortion argument as 1
  00089698: ae22008c sw r2,0x008c(r17)
+
  00089698: ae22008c sw r2,0x008c(r17) store 0x0300 (angle to...?)
  0008969c: ae200090 sw r0,0x0090(r17)
+
  0008969c: ae200090 sw r0,0x0090(r17) store 0x0000
  000896a0: 8e24008c lw r4,0x008c(r17)
+
 +
if = 0 or = 1
 +
  000896a0: 8e24008c lw r4,0x008c(r17) load angle for sine
 
  000896a4: 8e300090 lw r16,0x0090(r17)
 
  000896a4: 8e300090 lw r16,0x0090(r17)
  000896a8: 0c006ed7 jal 0x0001bb5c
+
  000896a8: 0c006ed7 jal 0x0001bb5c [[Call Sin function]]
 
  000896ac: 00000000 nop
 
  000896ac: 00000000 nop
  000896b0: 8e230204 lw r3,0x0204(r17)
+
  000896b0: 8e230204 lw r3,0x0204(r17) Sprite display section pointer
 
  000896b4: 02002021 addu r4,r16,r0
 
  000896b4: 02002021 addu r4,r16,r0
  000896b8: 0c006ed7 jal 0x0001bb5c
+
  000896b8: 0c006ed7 jal 0x0001bb5c [[Call Sin function]]
  000896bc: a4620008 sh r2,0x0008(r3)
+
  000896bc: a4620008 sh r2,0x0008(r3) Store sin(0x8c) to graphic X stretch
  000896c0: 00021fc2 srl r3,r2,0x1f
+
  000896c0: 00021fc2 srl r3,r2,0x1f accounting for negative values
  000896c4: 00431821 addu r3,r2,r3
+
  000896c4: 00431821 addu r3,r2,r3 sin(0x90)
  000896c8: 00031843 sra r3,r3,0x01
+
  000896c8: 00031843 sra r3,r3,0x01 sin(0x90)/2
  000896cc: 00431021 addu r2,r2,r3
+
  000896cc: 00431021 addu r2,r2,r3 sin(0x90)*1.5
 
  000896d0: 8e230204 lw r3,0x0204(r17)
 
  000896d0: 8e230204 lw r3,0x0204(r17)
  000896d4: 24421000 addiu r2,r2,0x1000
+
  000896d4: 24421000 addiu r2,r2,0x1000 sin(0x90)*1.5 + 0x1000
  000896d8: a462000a sh r2,0x000a(r3)
+
  000896d8: a462000a sh r2,0x000a(r3) Store sin(0x90) to graphic Y stretch
  000896dc: 8e24008c lw r4,0x008c(r17)
+
  000896dc: 8e24008c lw r4,0x008c(r17) angle?
 
  000896e0: 34020800 ori r2,r0,0x0800
 
  000896e0: 34020800 ori r2,r0,0x0800
 
  000896e4: 30830fff andi r3,r4,0x0fff
 
  000896e4: 30830fff andi r3,r4,0x0fff
  000896e8: 10620006 beq r3,r2,0x00089704
+
  000896e8: 10620006 beq r3,r2,0x00089704 branch if angle is 0x800
 
  000896ec: 24830020 addiu r3,r4,0x0020
 
  000896ec: 24830020 addiu r3,r4,0x0020
 
  000896f0: 8e220090 lw r2,0x0090(r17)
 
  000896f0: 8e220090 lw r2,0x0090(r17)
  000896f4: ae23008c sw r3,0x008c(r17)
+
  000896f4: ae23008c sw r3,0x008c(r17) store X distort angle + 0x20 back
 
  000896f8: 24420033 addiu r2,r2,0x0033
 
  000896f8: 24420033 addiu r2,r2,0x0033
 
  000896fc: 080225cc j 0x00089730
 
  000896fc: 080225cc j 0x00089730
  00089700: ae220090 sw r2,0x0090(r17)
+
  00089700: ae220090 sw r2,0x0090(r17) store Y distort angle + 0x33 back
  00089704: 8e220088 lw r2,0x0088(r17)
+
 +
  00089704: 8e220088 lw r2,0x0088(r17) load distortion argument
 
  00089708: 00000000 nop
 
  00089708: 00000000 nop
  0008970c: 24420001 addiu r2,r2,0x0001
+
  0008970c: 24420001 addiu r2,r2,0x0001 increase by 1
 
  00089710: 080225cc j 0x00089730
 
  00089710: 080225cc j 0x00089730
  00089714: ae220088 sw r2,0x0088(r17)
+
  00089714: ae220088 sw r2,0x0088(r17) store distortion arg.
 +
 +
if = 2
 
  00089718: 8e220204 lw r2,0x0204(r17)
 
  00089718: 8e220204 lw r2,0x0204(r17)
  0008971c: a2200087 sb r0,0x0087(r17)
+
  0008971c: a2200087 sb r0,0x0087(r17) clear 0x0087 (allows animation to continue)
  00089720: a4430008 sh r3,0x0008(r2)
+
  00089720: a4430008 sh r3,0x0008(r2) store X distort is 0x1000 (reset)
 
  00089724: 8e220204 lw r2,0x0204(r17)
 
  00089724: 8e220204 lw r2,0x0204(r17)
 
  00089728: 00000000 nop
 
  00089728: 00000000 nop
  0008972c: a443000a sh r3,0x000a(r2)
+
  0008972c: a443000a sh r3,0x000a(r2) store Y distort is 0x1000 (reset)
 +
 +
return:
 
  00089730: 8fbf0018 lw r31,0x0018(r29)
 
  00089730: 8fbf0018 lw r31,0x0018(r29)
 
  00089734: 8fb10014 lw r17,0x0014(r29)
 
  00089734: 8fb10014 lw r17,0x0014(r29)
Line 69: Line 84:
 
  00089740: 03e00008 jr r31
 
  00089740: 03e00008 jr r31
 
  00089744: 00000000 nop
 
  00089744: 00000000 nop
</font>
 

Latest revision as of 09:42, 10 October 2022

Not actually used. looks funky, and befitting of a teleport animation, but ultimately unfitting given the art style.


if 0x87 in misc data is 0x0 (impossible to branch to anyway. skipped by hardcoding.)
00089638: 03e00008 jr r31
0008963c: 00000000 nop

if 0x87 in misc data is 0x1:
00089640: 27bdffe0 addiu r29,r29,0xffe0
00089644: afb10014 sw r17,0x0014(r29)
00089648: 00808821 addu r17,r4,r0			r17 = Misc unit data pointer
0008964c: afbf0018 sw r31,0x0018(r29)
00089650: afb00010 sw r16,0x0010(r29)
00089654: 8e230088 lw r3,0x0088(r17)			load distort-input (cleared by anim. instruction ffc1)
00089658: 34040001 ori r4,r0,0x0001
0008965c: 10640010 beq r3,r4,0x000896a0		branch if equals 1
00089660: 28620002 slti r2,r3,0x0002
00089664: 10400005 beq r2,r0,0x0008967c		branch if greater than or equal to 2
00089668: 00000000 nop
0008966c: 10600008 beq r3,r0,0x00089690		branch if 0
00089670: 00000000 nop
00089674: 080225cc j 0x00089730			branch otherwise (there's a crippling error in the processing of math.)
00089678: 00000000 nop

if => 2
0008967c: 34020002 ori r2,r0,0x0002
00089680: 10620025 beq r3,r2,0x00089718		branch if equals 2
00089684: 34031000 ori r3,r0,0x1000
00089688: 080225cc j 0x00089730			if > 2 don't do anything
0008968c: 00000000 nop

if = 0
00089690: 34020300 ori r2,r0,0x0300
00089694: ae240088 sw r4,0x0088(r17)			store distortion argument as 1
00089698: ae22008c sw r2,0x008c(r17)			store 0x0300 (angle to...?)
0008969c: ae200090 sw r0,0x0090(r17)			store 0x0000

if = 0 or = 1
000896a0: 8e24008c lw r4,0x008c(r17)			load angle for sine
000896a4: 8e300090 lw r16,0x0090(r17)
000896a8: 0c006ed7 jal 0x0001bb5c			Call Sin function 
000896ac: 00000000 nop
000896b0: 8e230204 lw r3,0x0204(r17)			Sprite display section pointer
000896b4: 02002021 addu r4,r16,r0
000896b8: 0c006ed7 jal 0x0001bb5c			Call Sin function 
000896bc: a4620008 sh r2,0x0008(r3)			Store sin(0x8c) to graphic X stretch
000896c0: 00021fc2 srl r3,r2,0x1f			accounting for negative values
000896c4: 00431821 addu r3,r2,r3			sin(0x90)
000896c8: 00031843 sra r3,r3,0x01			sin(0x90)/2
000896cc: 00431021 addu r2,r2,r3			sin(0x90)*1.5
000896d0: 8e230204 lw r3,0x0204(r17)
000896d4: 24421000 addiu r2,r2,0x1000			sin(0x90)*1.5 + 0x1000
000896d8: a462000a sh r2,0x000a(r3)			Store sin(0x90) to graphic Y stretch
000896dc: 8e24008c lw r4,0x008c(r17)			angle?
000896e0: 34020800 ori r2,r0,0x0800
000896e4: 30830fff andi r3,r4,0x0fff
000896e8: 10620006 beq r3,r2,0x00089704		branch if angle is 0x800
000896ec: 24830020 addiu r3,r4,0x0020
000896f0: 8e220090 lw r2,0x0090(r17)
000896f4: ae23008c sw r3,0x008c(r17)			store X distort angle + 0x20 back
000896f8: 24420033 addiu r2,r2,0x0033
000896fc: 080225cc j 0x00089730
00089700: ae220090 sw r2,0x0090(r17)			store Y distort angle + 0x33 back

00089704: 8e220088 lw r2,0x0088(r17)			load distortion argument
00089708: 00000000 nop
0008970c: 24420001 addiu r2,r2,0x0001			increase by 1
00089710: 080225cc j 0x00089730
00089714: ae220088 sw r2,0x0088(r17)			store distortion arg.

if = 2
00089718: 8e220204 lw r2,0x0204(r17)
0008971c: a2200087 sb r0,0x0087(r17)			clear 0x0087 (allows animation to continue)
00089720: a4430008 sh r3,0x0008(r2)			store X distort is 0x1000 (reset)
00089724: 8e220204 lw r2,0x0204(r17)
00089728: 00000000 nop
0008972c: a443000a sh r3,0x000a(r2)			store Y distort is 0x1000 (reset)

return:
00089730: 8fbf0018 lw r31,0x0018(r29)
00089734: 8fb10014 lw r17,0x0014(r29)
00089738: 8fb00010 lw r16,0x0010(r29)
0008973c: 27bd0020 addiu r29,r29,0x0020
00089740: 03e00008 jr r31
00089744: 00000000 nop