From 313bbd132ded2d52bd8047bcc20c8bba0e251fd0 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 7 Mar 2005 01:33:25 +0000 Subject: Tweaked turn rates again and added FPS power up --- shockwave.bb | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/shockwave.bb b/shockwave.bb index 8250241..2362740 100644 --- a/shockwave.bb +++ b/shockwave.bb @@ -1,7 +1,7 @@ ; ; SHOCKWAVE (c) COPYRIGHT Ian Cowburn 2004 ; -; $Id: shockwave.bb,v 1.7 2005-03-06 02:18:38 ianc Exp $ +; $Id: shockwave.bb,v 1.8 2005-03-07 01:33:25 ianc Exp $ ; Include "gfx/font.bb" @@ -104,12 +104,16 @@ Const POWNONE=0 Const POWSPLIT=1 Const POWTURBOTURN=2 Const POWSHIELD=3 +Const POWFPS=4 Const TURN_NORMAL#=3 -Const TURN_TURBO#=5 +Const TURN_TURBO#=2 Const MAXSPEED_NORMAL#=1 Const MAXSPEED_TURBO#=2 +Const CAMERA_NORMAL=1 +Const CAMERA_FPS=2 + ; ============================================ ; GLOBLS ; ============================================ @@ -200,6 +204,20 @@ PositionEntity hud_spr,0,0,2 EntityTexture hud_spr,hud ScaleSprite hud_spr,1.15,0.85 +Global fps_camera=CreateCamera(ship) +Global fps_radar_spr=CreateSprite(fps_camera) +Global fps_hud_spr=CreateSprite(fps_camera) +PositionEntity fps_radar_spr,7.4,5.3,9 +EntityTexture fps_radar_spr,radar +PositionEntity fps_hud_spr,0,0,2 +EntityTexture fps_hud_spr,hud +ScaleSprite fps_hud_spr,1.85,1.45 +TurnEntity fps_camera,-70,0,0 +MoveEntity fps_camera,0,5,-15 +CameraProjMode camera,0 + +Global current_camera=camera + Global globang=0 Global start_level=1 Global start_bonus=0 @@ -218,6 +236,7 @@ Global hit_count=0 Global hit_timer=0 Global turbo_count=0 Global turn_count=0 +Global fps_count=0 Global is_bonus_level=False LoadHighScore() @@ -225,6 +244,9 @@ LoadHighScore() CreatePowerUp(POWSPLIT,99,1) CreatePowerUp(POWSHIELD,97,0) CreatePowerUp(POWTURBOTURN,95,10) +CreatePowerUp(POWFPS,98,2) + +SetCamera(CAMERA_NORMAL) Global timer=CreateTimer(100) @@ -411,6 +433,15 @@ Repeat EndIf EndIf + If fps_count>0 + fps_count=fps_count-1 + + If fps_count=0 + CircleQSound(turbostop_sfx,1) + SetCamera(CAMERA_NORMAL) + EndIf + EndIf + If KeyDown(203) TurnEntity ship,0,0,turn EndIf @@ -523,6 +554,8 @@ Repeat Wend + SetCamera(CAMERA_NORMAL) + new_highscore=False new_highlostchain=False @@ -599,6 +632,27 @@ End ; .Utils +Function SetCamera(cam) + Select cam + Case CAMERA_NORMAL + CameraProjMode camera,1 + CameraProjMode fps_camera,0 + ShowEntity hud_spr + ShowEntity radar_spr + HideEntity fps_hud_spr + HideEntity fps_radar_spr + current_camera=camera + Case CAMERA_FPS + CameraProjMode camera,0 + CameraProjMode fps_camera,1 + HideEntity hud_spr + HideEntity radar_spr + ShowEntity fps_hud_spr + ShowEntity fps_radar_spr + current_camera=fps_camera + End Select +End Function + Function SetCameraFOV(FOV#) CameraZoom camera, 1.0 / Tan(FOV#/2.0) End Function @@ -741,7 +795,7 @@ End Function Function NewCameraSpriteText(a$,col,x#,y#,z#,zi#,al#,ai#) s.SpriteText=New SpriteText s\txt=CreateTexture(SPRTXTSIZE,SPRTXTSIZE,1+2+16+32) - s\id=CreateSprite(camera) + s\id=CreateSprite(current_camera) s\a=al s\ai=ai s\zi=zi @@ -1058,11 +1112,16 @@ Function UpdateAsteroids() turbo_count=turbo_count+500 MAX_SPEED=MAXSPEED_TURBO Else - NewCameraSpriteText("TURN NUTTER!",$ff0000,0,0,EntityZ(camera)+33,-0.4,1,0.01) + NewCameraSpriteText("TURN LOSS!",$ff0000,0,0,EntityZ(camera)+33,-0.4,1,0.01) CircleQSound(turnstart_sfx,1) turn_count=turn_count+500 turn=TURN_TURBO EndIf + Case POWFPS + SetCamera(CAMERA_FPS) + NewCameraSpriteText("FPS MODE!",$ff0000,0,0,EntityZ(camera)+33,-0.4,1,0.01) + CircleQSOund(laugh_sfx,4) + fps_count=fps_count+1000 End Select EndIf EndIf -- cgit v1.2.3