summaryrefslogtreecommitdiff
path: root/missile_lock.bmx
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2006-06-03 10:52:37 +0000
committerIan C <ianc@noddybox.co.uk>2006-06-03 10:52:37 +0000
commit6f5a1164f31d4e5594f5a6ce8de328f3b0608fd8 (patch)
treef00fccd0320a7adff758ff90c759ea5971e1331e /missile_lock.bmx
parent1c900457e45e70e12a04b2c5b909e0bd9a9d8a3e (diff)
Initial completed version
Diffstat (limited to 'missile_lock.bmx')
-rw-r--r--missile_lock.bmx44
1 files changed, 42 insertions, 2 deletions
diff --git a/missile_lock.bmx b/missile_lock.bmx
index b2b7bea..0bcd87e 100644
--- a/missile_lock.bmx
+++ b/missile_lock.bmx
@@ -36,6 +36,7 @@ Import "gametypes.bmx"
'Import "game.bmx"
Import "particle.bmx"
'Import "help.bmx"
+Import "sound.bmx"
' ===================================
' Initialise
@@ -63,6 +64,7 @@ SetAlpha(1.0)
' ===================================
'
GFX.Init() ' MUST be first
+SFX.Init()
GameConfig.Load()
Scroller.Init()
@@ -82,6 +84,8 @@ Global quit:Int=False
'
Menu()
+FlushKeys()
+
While Not quit
GameState.Reset()
'GameState.SetLevel(10)
@@ -90,8 +94,20 @@ While Not quit
While Not GameState.game_over
+ Local alert_timer:Int=200
+
+ SFX.Alert()
+
While Not GameState.game_over And Not MissileSet.AllDestroyed()
Cls()
+
+ If alert_timer
+ alert_timer:-1
+ If alert_timer Mod 60 < 30
+ GFX.font.Centre("RED ALERT!",300,255,0,0)
+ EndIf
+ EndIf
+
ResetCollisions()
Backdrop.Draw()
@@ -151,11 +167,23 @@ While Not quit
Local bonus=100*GameState.level
Local added:Int=0
Local timer:Int=Max(HERTZ*5,bonus/10+HERTZ*3)
+ Local bt:Int=0
+
+ If GameState.gonads
+ GameState.AddScore(9999+(GameState.level-1)*10000)
+ EndIf
If Not GameState.hit
GameState.AddScore(500*GameState.level)
EndIf
+ If GameState.bonus_timer
+ bonus:+GameState.bonus_timer
+ bt=GameState.bonus_timer
+ EndIf
+
+ GameState.bonus_timer=0
+
While timer And Not KeyHit(KEY_ESCAPE)
Cls()
ResetCollisions()
@@ -184,8 +212,20 @@ While Not quit
GFX.font.Centre("BONUS " + Number.Format(added) + "!!!",400,255,255,0)
+ If bt
+ GFX.font.Centre("TIMER BONUS " + bt + "!!!",420,255,255,0)
+ EndIf
+
+ Local y:Int=440
+
If Not GameState.hit
- GFX.font.Centre("PERFECT BONUS " + (500*GameState.level) + "!!!",420,255,255,0)
+ GFX.font.Centre("PERFECT BONUS " + (500*GameState.level) + "!!!",y,255,255,0)
+ y:+20
+ EndIf
+
+ If GameState.gonads
+ GFX.font.Centre("SECRET GONADS OF STEEL BONUS " + (9999+(GameState.level-1)*10000) + "!!!",y,255,255,0)
+ y:+20
EndIf
If added<bonus
@@ -375,7 +415,7 @@ Function Menu()
GFX.font.Centre("THANKS TO",300)
Thanks.Draw(326)
- GFX.font.Centre("PRESS THRUST TO PLAY",400)
+ GFX.font.Centre("PRESS " + KeySym(GameConfig.kthrust).ToUpper() + " TO PLAY",400)
GFX.font.Centre("PRESS R TO REDEFINE KEYS",480)
GFX.font.Centre("PRESS ESCAPE TO QUIT",500)