Skip to content

Commit

Permalink
Labelling and applying equates to sub_11DEE (Player_RollRepel)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clownacy committed Nov 18, 2015
1 parent 70dd897 commit 4db521e
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions sonic3k.asm
Expand Up @@ -21955,7 +21955,7 @@ loc_10896:
bsr.w Sonic_Jump

loc_108A0:
bsr.w sub_11DEE
bsr.w Player_RollRepel
bsr.w sub_11508
jsr (MoveSprite2).l
bsr.w Player_AnglePos
Expand Down Expand Up @@ -22659,7 +22659,7 @@ Sonic_MdRoll:
bne.s loc_10FEA
bsr.w Sonic_Jump
loc_10FEA:
bsr.w sub_11DEE
bsr.w Player_RollRepel
bsr.w sub_11508
bsr.w Player_LevelBound
jsr (MoveSprite_TestGravity2).l
Expand Down Expand Up @@ -24139,30 +24139,32 @@ loc_11DE2:
blo.s locret_11DDA
add.w d0,ground_vel(a0)
rts
; End of function sub_11DA6
; End of function Player_SlopeResist

; ---------------------------------------------------------------------------
; Subroutine to push Sonic down a slope while he's rolling
; ---------------------------------------------------------------------------

; =============== S U B R O U T I N E =======================================


sub_11DEE:

move.b $26(a0),d0
; sub_11DEE:
Player_RollRepel:
move.b angle(a0),d0
addi.b #$60,d0
cmpi.b #$C0,d0
cmpi.b #-$40,d0
bhs.s locret_11E28
move.b $26(a0),d0
move.b angle(a0),d0
jsr (GetSineCosine).l
muls.w #$50,d0
asr.l #8,d0
tst.w $1C(a0)
tst.w ground_vel(a0)
bmi.s loc_11E1E
tst.w d0
bpl.s loc_11E18
asr.l #2,d0

loc_11E18:
add.w d0,$1C(a0)
add.w d0,ground_vel(a0)
rts
; ---------------------------------------------------------------------------

Expand All @@ -24172,11 +24174,11 @@ loc_11E1E:
asr.l #2,d0

loc_11E24:
add.w d0,$1C(a0)
add.w d0,ground_vel(a0)

locret_11E28:
rts
; End of function sub_11DEE
; End of function Player_RollRepel


; ---------------------------------------------------------------------------
Expand Down Expand Up @@ -26196,7 +26198,7 @@ loc_1346A:
bsr.w Tails_Jump

loc_13474:
bsr.w sub_11DEE
bsr.w Player_RollRepel
bsr.w sub_14D32
jsr (MoveSprite2).l
bsr.w Player_AnglePos
Expand Down Expand Up @@ -28122,7 +28124,7 @@ loc_1494C:
bsr.w Tails_Jump

loc_14956:
bsr.w sub_11DEE
bsr.w Player_RollRepel
bsr.w sub_14D32
bsr.w Tails_Check_Screen_Boundaries
jsr (MoveSprite_TestGravity2).l
Expand Down Expand Up @@ -31888,7 +31890,7 @@ Knux_Spin_Path:
bsr.w Knux_Jump

loc_170CC:
bsr.w sub_11DEE
bsr.w Player_RollRepel
bsr.w sub_1753A
bsr.w Player_LevelBound
jsr (MoveSprite_TestGravity2).l
Expand Down

0 comments on commit 4db521e

Please sign in to comment.