• 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 Brawl style 363-deg Autolink angle

rmn

Smash Rookie
Joined
Feb 15, 2016
Messages
15
Location
Alabama
Implementation of the Brawl-style autolink angle in Melee. Makes 363 degrees into a special angle which causes the knockback angle to match the attacker's direction of movement. Meteor cancelling is available if the resulting knockback angle falls within the normal Melee meteor cancel range.

Only lightly tested, so let me know if anything goes wrong

It wouldn't actually go on this type of move but the high KB illustrates the direction well.
$363 deg Brawl style autolink angle [rmn]
C207A780 0000000F
80640020 2C03016B
40A20060 C02F00CC
C04F00C8 C06F00B0
C09900B0 EC641828
C0028900 FC030040
40A0000C C0028910
EC4000B2 3C008002
60002C30 7C0903A6
4E800421 C002893C
EC200072 FC00081C
D801FFF8 8061FFFC
2C030000 40A00008
38630168 8091000C
3C004330 C8228928
60000000 00000000
# 363 deg = Brawl-style autolink angle
# inject at 8007a780
# in function that loads angle from hitbox data and saves for further calculation
# originally: lwz r3, 0x20(r4)

lwz r3, 0x20(r4)
cmpwi r3, 363
bne+ done

lfs f1, 0xCC(r15) # attacker y vel
lfs f2, 0xC8(r15) # x vel
lfs f3, 0xB0(r15) # Attacker x
lfs f4, 0xB0(r25) # Defender x
fsubs f3, f4, f3
lfs f0, -0x7700(rtoc) # 0
fcmpo cr0, f3, f0
bge+ not_reverse # override reverse hits
lfs f0, -0x76F0(rtoc) # -1
fmuls f2, f0, f2
not_reverse:
lis r0, 0x80022c30@h
ori r0, r0, 0x80022c30@l
mtctr r0
bctrl # atan2(yVel, xVel)
lfs f0, -0x76c4(rtoc) # 180/pi. Convert radians to degrees
fmuls f1, f0, f1
fctiw f0, f1
stfd f0, -8(sp)
lwz r3, -4(sp)
cmpwi r3, 0 # force angle into [0, 360]
bge+ positive_angle # (so meteor cancelling works)
addi r3, r3, 360
positive_angle:
lwz r4, 0xC(r17)

done:
lis r0, 0x4330 # restore registers we messed up
lfd f1, -0x76d8(rtoc)
 
Last edited:
Top Bottom