• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Completed Samus - Aimable Charge Shot

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:

Middle Mang

Smash Cadet
Joined
Jul 30, 2016
Messages
28
I've had this code for a while working fine but recently after unpacking the ISO to edit mario's move logic and then repacking it, it crashes my dolphin when I use charge shot for some reason. EDIT Just realized that certain gecko codes crash the game if turned off now. Do gecko codes get saved in some way, crashing if they are disabled? I was testing why my Doc mario's down B wasn't working and figured it might be the "Mario and Doc mario get jump back after Down B" (whole other issue, SpecialLw grounded counts half as the air version) but it crashes on startup when I disabled it. *sigh* ...
 
Last edited:
Top Bottom