From 977bbaedb88d438e871a1e24e40902dfb6afd495 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Fri, 7 Jan 2022 16:12:29 +0100 Subject: display next level --- meta/maps/stage_1_1.bfm | 3 +++ meta/maps/stage_1_start.bfm | 2 +- src/main.cpp | 3 +++ src/wp_assaultrifle.cpp | 2 +- src/wp_shotty.cpp | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 meta/maps/stage_1_1.bfm diff --git a/meta/maps/stage_1_1.bfm b/meta/maps/stage_1_1.bfm new file mode 100644 index 0000000..8d699ec --- /dev/null +++ b/meta/maps/stage_1_1.bfm @@ -0,0 +1,3 @@ +BOSS 0 0 +ENEMIES 15 20 +NEXT stage_1_boss.bfm diff --git a/meta/maps/stage_1_start.bfm b/meta/maps/stage_1_start.bfm index b5ae8e0..ca380e2 100644 --- a/meta/maps/stage_1_start.bfm +++ b/meta/maps/stage_1_start.bfm @@ -1,3 +1,3 @@ BOSS 0 0 ENEMIES 10 20 -NEXT stage_1_boss.bfm +NEXT stage_1_1.bfm diff --git a/src/main.cpp b/src/main.cpp index 8456928..5e4eb4e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -91,6 +91,9 @@ int main(void) { case (NEXT): { ClearBackground(COOLPURPLE); + DrawCircle(SCREENWIDTH / 2, SCREENHEIGHT / 2, 200, BLACK); + DrawText("STAGE CLEARED\nNEXT LEVEL :\n", (SCREENWIDTH / 2) - 200, (SCREENHEIGHT / 2) - 50, 40, WHITE); + DrawText(game->getNext().c_str(), (SCREENWIDTH / 2) - 100, (SCREENHEIGHT / 2) + 50, 40, WHITE); break ; } case (ENDING): diff --git a/src/wp_assaultrifle.cpp b/src/wp_assaultrifle.cpp index 6b9a2c7..1ed9e19 100644 --- a/src/wp_assaultrifle.cpp +++ b/src/wp_assaultrifle.cpp @@ -46,8 +46,8 @@ int wp_assaultrifle::bang(std::vector * enemies, Entity * player) { en->direction.x = (playerDirection.x / 2); en->direction.y = (playerDirection.y / 2); + player->victims += 1; } - player->victims += 1; player->fury += 1; break ; } diff --git a/src/wp_shotty.cpp b/src/wp_shotty.cpp index ae978f4..c84e516 100644 --- a/src/wp_shotty.cpp +++ b/src/wp_shotty.cpp @@ -49,8 +49,8 @@ int wp_shotty::bang(std::vector * enemies, Entity * player) { en->direction.x = (playerDirection.x / 2); en->direction.y = (playerDirection.y / 2); + player->victims += 1; } - player->victims += 1; player->fury += 1; } } -- cgit v1.2.3