• 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 Peach - FSmash Angles Determine FSmash Type

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Code:
$Peach - FSmash Angles Determine FSmash Type [UnclePunch]
*Nuetral = Racket
*Up = Pan
*Down = Golf Club
C211C208 00000014
3821FFF0 D3E10000
7FE3FB78 3D80800D
618CF1C8 7D8903A6
4E800421 2C030000
41820020 7FE3FB78
3D808007 618CD99C
7D8903A6 4E800421
FFE00890 4800001C
7FE3FB78 3D808007
618CD964 7D8903A6
4E800421 FFE00890
808DAEB4 C00400B8
FC1F0040 40810010
387F0000 3880015E
48000024 806DAEB4
C00300C4 FC1F0040
40800010 387F0000
3880015D 48000008
3880015F C3E10000
38210010 00000000
Code:
.macro branchl reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtctr \reg
bctrl
.endm

.set player,30
.set playerdata,31


#Backup f31 real quick
subi    sp,sp,0x10
stfs    f31,0x0(sp)

#Check Which Stick
mr    r3,playerdata
branchl    r12,0x800df1c8            #Check If CStick Moved
cmpwi    r3,0x0
beq    AnalogStick

#Get Abs Analog Angle
CStick:
mr    r3,playerdata
branchl    r12,0x8007d99c
fmr    f31,f1
b    UpwardAngle

#Get Abs Analog Angle
AnalogStick:
mr    r3,playerdata
branchl    r12,0x8007d964
fmr    f31,f1

UpwardAngle:
  lwz r4, -20812(r13)
  lfs f0, 184(r4)
  fcmpo cr0, f31, f0
  ble- DownwardAngle
  addi r3, playerdata, 0x0
  li r4, 0x15E
  b Exit
 
DownwardAngle:
  lwz r3, -20812(r13)
  lfs f0, 196(r3)
  fcmpo cr0, f31, f0
  bge- ForwardAngle
  addi r3, playerdata, 0x0
  li r4, 0x15D
  b Exit

ForwardAngle:
  li r4, 0x15F

Exit:
lfs    f31,0x0(sp)
addi    sp,sp,0x10
 
Top Bottom