summaryrefslogtreecommitdiff
path: root/game.bmx
diff options
context:
space:
mode:
Diffstat (limited to 'game.bmx')
-rw-r--r--game.bmx15
1 files changed, 11 insertions, 4 deletions
diff --git a/game.bmx b/game.bmx
index 8c66ef8..c11fbc3 100644
--- a/game.bmx
+++ b/game.bmx
@@ -142,7 +142,13 @@ Type TGame
EndIf
EndIf
- Local percent:Int=Int(Float(captured)/Float(num)*100.0)
+ Local percent:Int
+
+ If done<>LEVEL_NOTOVER
+ percent=final_percent
+ Else
+ percent:Int=Int(Float(captured)/Float(num)*100.0)
+ EndIf
If (timer=0 Or num=captured+lost) And done=LEVEL_NOTOVER
final_percent=percent
@@ -157,10 +163,11 @@ Type TGame
GameGFX.font.DrawColoured(num-captured-lost,txtoff[0]+10,0,255,255,0)
GameGFX.font.Draw("CAPTURED",200,0)
- If done=LEVEL_NOTOVER
- GameGFX.font.DrawColoured(percent+"%",txtoff[1]+210,0,255,0,255)
+
+ If percent<level.winpercent
+ GameGFX.font.DrawColoured(percent+"%",txtoff[1]+210,0,255,50,50)
Else
- GameGFX.font.DrawColoured(final_percent+"%",txtoff[1]+210,0,255,0,255)
+ GameGFX.font.DrawColoured(percent+"%",txtoff[1]+210,0,50,255,50)
EndIf
GameGFX.font.Draw("TIMER",600,0)