; ====== to do a fire shield dash Sonic_JumpAttackFire: move.b #1,($FFFFF744).w ; stop scrolling move.l #$0C000000,$10(a0) ; dash right move.b #1,($FFFFD1DC).w ; display dashing animation btst #0,$22(a0) ; are we facing right? beq.b Sonic_JAF_Return ; if so, return neg.w $10(a0) ; dash left Sonic_JAF_Return: move.w #$D5,d0 ; play fire sound jmp PlaySound ; ====== elsewhere Sonic_LevelBound: ; XREF: Obj01_MdNormal; et al tst.b ($FFFFF744).w ; is the screen locked from spindashing or fire shield dash? beq.b Sonic_LevelBound2 ; if not, branch btst #2,$22(a0) ; are we in a ball? beq.b Sonic_UnlockScreen ; if not, branch move.w $8(a0),d1 ; get x-position move.w $10(a0),d0 ; get x-speed lsr.w #8,d0 ext.w d0 move.w ($FFFFF700).w,d2 ; get camera x-position sub.w d0,d2 move.w d2,d3 addi.w #$10,d2 ; get camera left addi.w #$130,d3 ; get camera right cmp.w d2,d1 ; is Sonic to the left of the camera left? blt.b Sonic_UnlockScreen ; if so, branch cmp.w d3,d1 ; is Sonic to the right of the camera right? bgt.b Sonic_UnlockScreen ; if so, branch move.w $10(a0),d0 ; get x-speed bpl.b Sonic_NI1 neg.w d0 Sonic_NI1: move.w $12(a0),d1 ; get y-speed bpl.b Sonic_NI2 neg.w d1 Sonic_NI2: cmp.w d0,d1 ; is Sonic's angle above 45 degrees? ble.b Sonic_LevelBound2 ; if not, branch Sonic_UnlockScreen: move.b #0,($FFFFF744).w ; unlock the screen Sonic_LevelBound2: