diff options
author | Ian C <ianc@noddybox.co.uk> | 2005-03-06 01:40:21 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2005-03-06 01:40:21 +0000 |
commit | 6ede37a57f55a32d92432a384c7a8c73e58271f3 (patch) | |
tree | 0be61c8e7646e563e8d51824628241bdceb7cfc6 | |
parent | b8cdf805c723fd8de6f946080ecee49596e41325 (diff) |
Altered turn rate and added globals for turn and speed. Also fixed positioning so ship is always in front of the exhaust.
-rw-r--r-- | shockwave.bb | 66 |
1 files changed, 48 insertions, 18 deletions
diff --git a/shockwave.bb b/shockwave.bb index 12882d4..ce8273f 100644 --- a/shockwave.bb +++ b/shockwave.bb @@ -1,7 +1,7 @@ ; ; SHOCKWAVE (c) COPYRIGHT Ian Cowburn 2004 ; -; $Id: shockwave.bb,v 1.5 2005-03-05 03:27:05 ianc Exp $ +; $Id: shockwave.bb,v 1.6 2005-03-06 01:40:21 ianc Exp $ ; Include "gfx/font.bb" @@ -68,6 +68,8 @@ End Type ; CONSTS ; ============================================ ; +Const DEBUGMODE=False + Const MAPSIZE=256 Const FIELDSIZE=246 @@ -79,7 +81,8 @@ Const TXTSIZE=256 Const SPRTXTSIZE=128 -Const SHIPZ=150 +Const SHIPZ#=149 +Const WAVEZ#=150 Const SHIPSZ#=2 Const ASTLARGE=20 @@ -100,6 +103,11 @@ Const POWSPLIT=1 Const POWTURBOTURN=2 Const POWSHIELD=3 +Const TURN_NORMAL#=3 +Const TURN_TURBO#=5 +Const MAXSPEED_NORMAL#=1 +Const MAXSPEED_TURBO#=2 + ; ============================================ ; GLOBLS ; ============================================ @@ -194,8 +202,8 @@ Global globang=0 Global start_level=1 Global start_bonus=0 Global quit=False -Global MAX_SPEED#=1.0 -Global turn#=1.0 +Global MAX_SPEED#=MAXSPEED_NORMAL +Global turn#=TURN_NORMAL Global speed#=0 Global score=0 Global shield=0 @@ -238,8 +246,8 @@ Repeat EndIf speed=0 - MAX_SPEED#=1.0 - turn#=2.0 + MAX_SPEED#=MAXSPEED_NORMAL + turn#=TURN_NORMAL ClearText() @@ -248,7 +256,7 @@ Repeat ClearParticles() ClearSpriteText() - InitShockwave(180,SHIPZ) + InitShockwave(180,WAVEZ) InitAsteroids() score=0 @@ -356,7 +364,6 @@ Repeat HudTextCentre(200,"20000",$ffff00) AddScore(20000) ElseIf total_chain>0 - ;Stop bonus=total_chain If (shield+bonus)>MAXSHIELD @@ -389,7 +396,7 @@ Repeat If turn_count=0 CircleQSound(turnstop_sfx,1) - turn=2 + turn=TURN_NORMAL EndIf EndIf @@ -398,7 +405,7 @@ Repeat If turbo_count=0 CircleQSound(turbostop_sfx,1) - MAX_SPEED=1 + MAX_SPEED=MAXSPEED_NORMAL EndIf EndIf @@ -486,6 +493,25 @@ Repeat globang=(globang+10) Mod 360 + If DEBUGMODE + If KeyHit(200) + MAX_SPEED=MAX_SPEED+0.1 + NewCameraSpriteText(Str$(MAX_SPEED),$ff0000,0,5,EntityZ(camera)+50,-0.2,1,0.005) + EndIf + If KeyHit(208) + MAX_SPEED=MAX_SPEED-0.1 + NewCameraSpriteText(Str$(MAX_SPEED),$ff0000,0,5,EntityZ(camera)+50,-0.2,1,0.005) + EndIf + If KeyHit(65) + SubShield(shield) + NewCameraSpriteText("NOSHLD",$ff0000,0,5,EntityZ(camera)+50,-0.2,1,0.005) + EndIf + If KeyHit(66) + SubShield(-MAXSHIELD) + NewCameraSpriteText("FULLSHLD",$ff0000,0,5,EntityZ(camera)+50,-0.2,1,0.005) + EndIf + EndIf + Wend new_highscore=False @@ -921,7 +947,7 @@ Function NewAsteroid(size,x#,y#) a\size=size EntityTexture a\id,shieldtex - PositionEntity a\id,x,y,SHIPZ + PositionEntity a\id,x,y,WAVEZ a\colcnt=ASTSHIELD @@ -1018,12 +1044,12 @@ Function UpdateAsteroids() NewCameraSpriteText("TURBO NUTTER!",$ff0000,0,0,EntityZ(camera)+32,-0.4,1,0.01) CircleQSOund(turbostart_sfx,1) turbo_count=turbo_count+500 - MAX_SPEED=2 + MAX_SPEED=MAXSPEED_TURBO Else NewCameraSpriteText("TURN NUTTER!",$ff0000,0,0,EntityZ(camera)+33,-0.4,1,0.01) CircleQSound(turnstart_sfx,1) turn_count=turn_count+500 - turn=4 + turn=TURN_TURBO EndIf End Select EndIf @@ -1049,13 +1075,13 @@ Function UpdateAsteroids() If ex<-MAPSIZE Or ex>MAPSIZE s=Sgn(ex) - PositionEntity a\id,s*MAPSIZE,ey,SHIPZ + PositionEntity a\id,s*MAPSIZE,ey,WAVEZ a\dx=-a\dx EndIf If ey<-MAPSIZE Or ey>MAPSIZE s=Sgn(ey) - PositionEntity a\id,ex,s*MAPSIZE,SHIPZ + PositionEntity a\id,ex,s*MAPSIZE,WAVEZ a\dy=-a\dy EndIf EndIf @@ -1505,7 +1531,7 @@ Function Menu() ClearParticles() ClearSpriteText() - InitShockwave(180,SHIPZ) + InitShockwave(180,WAVEZ) done=False turn=0 @@ -1523,6 +1549,10 @@ Function Menu() HudTextCentre(20,"SHOCKWAVE",$ffffff) HudTextCentre(30,"(C) 2004 IAN C",$ffffff) + If DEBUGMODE + HudTextCentre(150,"**** DEBUG KEYS ENABLED ****",$ff0000) + EndIf + HudTextCentre(50,"PRESS F1 FOR LEVEL",$ffff00) HudTextCentre(60,"PRESS SPACE TO PLAY",$ffff00) HudTextCentre(80,"PRESS ESC TO QUIT",$ffff00) @@ -1603,11 +1633,11 @@ Function Menu() EndIf If turn=-1 - TurnEntity ship,0,0,2 + TurnEntity ship,0,0,TURN_NORMAL EndIf If turn=1 - TurnEntity ship,0,0,-2 + TurnEntity ship,0,0,-TURN_NORMAL EndIf If speed<MAX_SPEED |