diff options
-rw-r--r-- | Default.ppinch | bin | 1740 -> 1727 bytes | |||
-rw-r--r-- | designer.bmx | 5 | ||||
-rw-r--r-- | game.bmx | 31 | ||||
-rw-r--r-- | main.bmx | 7 | ||||
-rw-r--r-- | menu.bmx | 4 |
5 files changed, 34 insertions, 13 deletions
diff --git a/Default.ppinch b/Default.ppinch Binary files differindex 8cff31f..bed0408 100644 --- a/Default.ppinch +++ b/Default.ppinch diff --git a/designer.bmx b/designer.bmx index e5ded2c..a45034d 100644 --- a/designer.bmx +++ b/designer.bmx @@ -692,10 +692,11 @@ End Function Function TestCallback(w:TWidget) Designer.SaveLevel() Local g:TGame=TGame.Create(Designer.level) + Local res:Int=TGame.LEVEL_NOTOVER - While Not KeyHit(KEY_ESCAPE) + While res<>TGame.LEVEL_FINISHED And res<>TGame.LEVEL_CANCELLED Cls - g.Play() + res=g.Play() SetColor(255,255,255) DrawImage(GameGFX.pointer,MouseX(),MouseY()) FlushMem @@ -15,6 +15,8 @@ Type TGame Const LEVEL_NOTOVER:Int= 0 Const LEVEL_WON:Int= 1 Const LEVEL_LOST:Int= 2 + Const LEVEL_FINISHED:Int= 3 + Const LEVEL_CANCELLED:Int= 4 Field level:TLevel Field mass:TList @@ -121,19 +123,20 @@ Type TGame GameGFX.font.CentreColoured("Need "+level.winpercent+"% to clear",y,col/2,col,col) y:+yi + + Local n:Int=Int(level.placemass) + + If level.invmass + n=-n + EndIf If level.maxmass>1 - GameGFX.font.CentreColoured("You can place only "+level.maxmass+" masses of " + Int(level.placemass) + " Newtons",y,col/2,col,col) + GameGFX.font.CentreColoured("You can place "+level.maxmass+" masses of " + n + " Newtons",y,col/2,col,col) Else - GameGFX.font.CentreColoured("You can place only 1 mass of " + Int(level.placemass) + " Newtons",y,col/2,col,col) + GameGFX.font.CentreColoured("You can place 1 mass of " + n + " Newtons",y,col/2,col,col) EndIf y:+yi - If level.invmass - GameGFX.font.CentreColoured("PLACED MASSES ARE INVERTED!",y,col,col/2,col/2) - y:+yi - EndIf - If level.placefriend GameGFX.font.CentreColoured("PLACED MASSES ARE COLLECTORS!",y,col,col/2,col/2) y:+yi @@ -275,6 +278,10 @@ Type TGame playing=True EndIf EndIf + + If KeyHit(KEY_ESCAPE) + done=LEVEL_CANCELLED + EndIf Case LEVEL_WON If final_percent=100 SetScale(4,4) @@ -291,14 +298,24 @@ Type TGame SetAlpha(0.7) GameGFX.font.CentreColoured("LEVEL COMPLETED!",GraphicsHeight()/2+20,255,255,0) GameGFX.font.CentreColoured("You got the pass mark with "+pass_time+" left on the clock",GraphicsHeight()/2+40,255,255,0) + GameGFX.font.Centre("Press the Left Mouse Button",GraphicsHeight()/2+80) SetScale(1,1) SetAlpha(1) + + If MouseHit(1) + done=LEVEL_FINISHED + EndIf Case LEVEL_LOST SetScale(2,2) SetAlpha(0.7) GameGFX.font.CentreColoured("LEVEL FAILED!",GraphicsHeight()/2+20,255,64,64) + GameGFX.font.Centre("Press the Left Mouse Button",GraphicsHeight()/2+60) SetScale(1,1) SetAlpha(1) + + If MouseHit(1) + done=LEVEL_FINISHED + EndIf EndSelect Return done @@ -192,14 +192,17 @@ Function Menu() Select sel Case MENU_PLAY done=True + FlushKeys() + Case MENU_SCORES + FlushKeys() Case MENU_LOAD - LevelDesigner() FlushKeys() Case MENU_EDIT LevelDesigner() FlushKeys() Case MENU_TOY done=True + FlushKeys() Case MENU_QUIT done=True quit=True @@ -215,7 +218,7 @@ Function Menu() SetScale(2,2) GameGFX.font.CentreColoured("PARTICLE PINCH",0,255,255,0) - GameGFX.font.CentreColoured("Start Level",530,255,0,255) + GameGFX.font.CentreColoured("Start Level",530,0,255,255) GameGFX.font.Centre(levelset.Get(selected_level).name,545) SetScale(1,1) @@ -47,7 +47,7 @@ Type TMenu For Local opt:TMenuOpt=EachIn list If opt.InBox(mx,my) - SetColor(255,255,200) + SetColor(255,255,255) If KeyDown(KEY_MOUSELEFT) mbdown=True @@ -61,7 +61,7 @@ Type TMenu mbdown=False EndIf Else - SetColor(200,200,200) + SetColor(164,164,164) DrawImage(opt.i,opt.x,opt.y) EndIf Next |