UnclePunch
Smash Ace
- Joined
- Nov 9, 2014
- Messages
- 673
Code:
$Aim Charge Shot [UnclePunch]
042b5e74 60000000
042b5e88 60000000
C22B5884 0000001F
83FE0518 83FF002C
C03F0624 C05F0620
C0628BEC FC011840
41820008 4800000C
FC021840 418200CC
3DC08002 61CE2C30
7DC903A6 4E800421
FCE00890 3DC08032
61CE6240 7DC903A6
4E800421 C01E0DDC
EC000072 D01E0040
FC203890 3DC08032
61CE63D4 7DC903A6
4E800421 C01E0DDC
EC000072 D01E0044
C01E0040 C0228BEC
FC000840 41800014
887F002C 2C0300BF
40820050 48000014
887F002C 2C03003F
40820040 48000004
C1BF002C FDA06850
D1BF002C 807E0518
809F0010 38A00002
C03F0894 C04297BC
C06297B8 38C00000
3DC08006 61CE93AC
7DC903A6 4E800421
3DC0802B 61CE58B0
7DC903A6 4E800420
C03E0DD8 00000000
Code:
lwz r31,0x518(r30)
lwz r31,0x2c(r31)
lfs f1,0x624(r31)
lfs f2,0x620(r31)
lfs f3,-0x7414(rtoc)
fcmpo cr0,f1,f3
beq keepchecking
b notzero
keepchecking:
fcmpo cr0,f2,f3
beq exit
notzero:
bl r14,0x80022c30 #atan
fmr f7,f1
bl r14,0x80326240 #cos
lfs f0, 0x0DDC (r30)
fmuls f0,f0,f1
stfs f0, 0x0040 (r30)
fmr f1,f7
bl r14,0x803263d4 #sin
lfs f0, 0x0DDC (r30)
fmuls f0,f0,f1
stfs f0, 0x0044 (r30)
#checkToSwapFacing
lfs f0, 0x0040 (r30)
lfs f1,-0x7414(rtoc)
fcmpo cr0,f0,f1
blt negative
positive:
lbz r3, 0x2c (r31)
cmpwi r3,0xbf
bne tenfour
b reenter
negative:
lbz r3, 0x2c (r31)
cmpwi r3,0x3f
bne tenfour
b reenter
reenter:
lfs f13,0x2c(r31) #load facing direction into float register
fneg f13,f13 #invert
stfs f13,0x2c(r31) #store
lwz r3,0x518(r30)
lwz r4,0x10(r31) #get action state
li r5,2
lfs f1,0x894(r31) #get current AS frame number
lfs f2, -0x6844 (rtoc)
lfs f3, -0x6848 (rtoc)
li r6,0
bl r14, 0x800693ac #branch to action state (now in the other direction)
tenfour:
branch r14,0x802b58b0
exit:
lfs f1, 0x0DD8 (r30)
Last edited: