Skip to content

Commit

Permalink
Bonus display
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabrizio-Caruso committed Aug 26, 2020
1 parent f725ab1 commit eb57cf3
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/games/bomber/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int main(void)

SET_TEXT_COLOR(COLOR_WHITE);
PRINTD(0,0,5,score);
while((y<YSize-building_height[x+1]) && y<YSize-2)
while((y<YSize-building_height[x+1]) && y<YSize-1)
{

if(!remaining_buildings)
Expand Down Expand Up @@ -195,7 +195,7 @@ int main(void)
--remaining_buildings;
if(!remaining_buildings)
{
bonus = 20*(YSize-y)+level*50;
bonus = 10*(YSize-y)+level*30;
}
SET_TEXT_COLOR(COLOR_WHITE);
PRINTD(0,0,5,score);
Expand All @@ -220,15 +220,20 @@ int main(void)
drawPlane();
SLEEP(2);
WAIT_PRESS();
if(y==YSize-2)
if(!remaining_buildings)
{
CLEAR_SCREEN();
PRINT(4,2,_XL_N _XL_E _XL_X _XL_T _XL_SPACE _XL_L _XL_E _XL_V _XL_E _XL_L);
PRINT(1,2,_XL_L _XL_E _XL_V _XL_E _XL_L _XL_SPACE _XL_C _XL_O _XL_M _XL_P _XL_L _XL_E _XL_T _XL_E _XL_T _XL_E _XL_D);
SLEEP(1);
++level;
score+=bonus;
PRINT(4,4,_XL_B _XL_O _XL_N _XL_U _XL_S);
PRINTD(10,4,5,bonus);
PRINT(1,4,_XL_B _XL_O _XL_N _XL_U _XL_S);
for(x=10;x<=bonus;x+=10)
{
PRINTD(7,4,5,x);
SHOOT_SOUND();
DO_SLOW_DOWN(SLOW_DOWN);
}
SLEEP(1);
}
else
Expand Down

0 comments on commit eb57cf3

Please sign in to comment.