From 0c54a57c59fdce1ffc0055f57983ad090a3e18e6 Mon Sep 17 00:00:00 2001 From: Ian C Date: Fri, 21 Apr 2006 21:07:17 +0000 Subject: Updates while working away --- missile_lock.bmx | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'missile_lock.bmx') diff --git a/missile_lock.bmx b/missile_lock.bmx index 21ba804..f4a4652 100644 --- a/missile_lock.bmx +++ b/missile_lock.bmx @@ -52,7 +52,6 @@ EndIf ? Graphics 800,600,32,HERTZ -SetOrigin(400,300) HideMouse SetBlend(ALPHABLEND) @@ -69,8 +68,8 @@ Lookup.Init() GameConfig.Load() Scroller.Init() Particles.Init() - -GameState.Reset() +Backdrop.Init() +Trail.Init() Global quit:Int=False @@ -84,10 +83,23 @@ Menu() While Not quit GameState.Reset() - TFadeScreen.DoFadeOut() + While Not KeyHit(KEY_ESCAPE) + Cls + Backdrop.Draw() + Particles.Draw() + Trail.Draw() + GameState.Display() + GameState.Control() + GameState.Move() + SetRotation(GameState.ang) + DrawImage(GFX.ship,GameState.x,GameState.y) + SetRotation(0) + Flip(1) + Wend GameConfig.Save() - 'last_score=game.score + + TFadeScreen.DoFadeOut() Menu() Wend @@ -121,28 +133,26 @@ Function Menu() Local defkey:Int=0 Particles.Clear() + GameState.Reset() While Not done Cls If Rand(100)>30 - Particles.AddScaledImage(GFX.exhaust,Rand(-400,400),Rand(-400,400),0.3) + Particles.AddScaledImage(GFX.exhaust,Rand(0,800),Rand(0,600),0.3) End If - GameState.ang=(GameState.ang+2) Mod 3600 - - SetOrigin(400,300) + Backdrop.Draw() Particles.Draw() GameState.Display() Scroller.Draw() - SetOrigin(0,0) SetColor(255,255,255) DrawImage(GFX.title,0,0) If defkey>0 - If defkey=5 + If defkey=4 GFX.font.Centre("PRESS A KEY TO GO BACK TO THE MENU",380) Else GFX.font.Centre("DEFINE KEYS",350) @@ -152,16 +162,13 @@ Function Menu() Local c1:Int=128+128*(defkey=1) Local c2:Int=128+128*(defkey=2) Local c3:Int=128+128*(defkey=3) - Local c4:Int=128+128*(defkey=4) GFX.font.Draw("LEFT",250,200,c1,c1,c1) GFX.font.Draw("RIGHT",250,220,c2,c2,c2) - GFX.font.Draw("FIRE",250,240,c3,c3,c3) - GFX.font.Draw("PAUSE",250,260,c4,c4,c4) + GFX.font.Draw("PAUSE",250,240,c3,c3,c3) GFX.font.Draw(KeySym(GameConfig.kleft),500,200,c1,c1,0) GFX.font.Draw(KeySym(GameConfig.kright),500,220,c2,c2,0) - GFX.font.Draw(KeySym(GameConfig.kfire),500,240,c3,c3,0) - GFX.font.Draw(KeySym(GameConfig.kpause),500,260,c4,c4,0) + GFX.font.Draw(KeySym(GameConfig.kpause),500,240,c3,c3,0) Local k:Int=-1 @@ -183,14 +190,12 @@ Function Menu() Case 2 GameConfig.kright=k Case 3 - GameConfig.kfire=k - Case 4 GameConfig.kpause=k End Select defkey:+1 - If defkey=6 + If defkey=5 GameConfig.Save() defkey=0 FlushKeys() @@ -213,7 +218,7 @@ Function Menu() GFX.font.Centre("COPYRIGHT (C) NODDYBOX 2006",200) - GFX.font.Centre("PRESS FIRE TO PLAY",300) + GFX.font.Centre("PRESS SPACE TO PLAY",300) GFX.font.Centre("PRESS R TO REDEFINE KEYS",380) GFX.font.Centre("PRESS ESCAPE TO QUIT",400) @@ -227,12 +232,11 @@ Function Menu() EndIf EndIf - Flip + Flip(1) Wend Particles.Clear() TFadeScreen.DoFadeOut() - SetOrigin(400,300) End Function -- cgit v1.2.3