diff --git a/TrustFall/TrustFall/BigMrManager.bmp b/TrustFall/TrustFall/BigMrManager.bmp
index f1bbfa8..6a97242 100644
Binary files a/TrustFall/TrustFall/BigMrManager.bmp and b/TrustFall/TrustFall/BigMrManager.bmp differ
diff --git a/TrustFall/TrustFall/TrustFall.vcxproj b/TrustFall/TrustFall/TrustFall.vcxproj
index 67da29d..ff05b35 100644
--- a/TrustFall/TrustFall/TrustFall.vcxproj
+++ b/TrustFall/TrustFall/TrustFall.vcxproj
@@ -87,6 +87,16 @@
true
true
+
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+ true
+
Level3
@@ -138,19 +148,25 @@
+
+
+
+
+
+
diff --git a/TrustFall/TrustFall/TrustFall.vcxproj.filters b/TrustFall/TrustFall/TrustFall.vcxproj.filters
index 631ad32..4c20cbd 100644
--- a/TrustFall/TrustFall/TrustFall.vcxproj.filters
+++ b/TrustFall/TrustFall/TrustFall.vcxproj.filters
@@ -54,6 +54,15 @@
Source Files\TrustFallImplement
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files\ScreensImplement
+
@@ -77,5 +86,14 @@
Header Files\TrustFall
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\Screens
+
\ No newline at end of file
diff --git a/TrustFall/TrustFall/cursor.h b/TrustFall/TrustFall/cursor.h
index 8409560..a668e6d 100644
--- a/TrustFall/TrustFall/cursor.h
+++ b/TrustFall/TrustFall/cursor.h
@@ -1,4 +1,6 @@
#pragma once
+#include
+#include
#include
template
diff --git a/TrustFall/TrustFall/game.cpp b/TrustFall/TrustFall/game.cpp
index 719563d..91b68d7 100644
--- a/TrustFall/TrustFall/game.cpp
+++ b/TrustFall/TrustFall/game.cpp
@@ -1,6 +1,7 @@
#include "game.h"
#include "start_screen.h"
#include "game_screen.h"
+#include "result_screen.h"
using std::string;
using std::map;
@@ -15,13 +16,19 @@ void Game::init() {
sprites.insert(pair("Title", al_load_bitmap("logo.bmp")));
sprites.insert(pair("Mr. Man", al_load_bitmap("MrMan.bmp")));
sprites.insert(pair("Mr. Manager", al_load_bitmap("BigMrManager.bmp")));
+ sprites.insert(pair("Mr. ManagerSad", al_load_bitmap("mrmanagersad.bmp")));
+ sprites.insert(pair("Mr. ManagerHappy", al_load_bitmap("mrmanagerhappy.bmp")));
sprites.insert(pair("KeyUp", al_load_bitmap("small_key_up.bmp")));
sprites.insert(pair("Spacebar", al_load_bitmap("spacebar.bmp")));
sprites.insert(pair("Employee", al_load_bitmap("employee.bmp")));
sprites.insert(pair("EmployeeHappy", al_load_bitmap("employee_happy.bmp")));
sprites.insert(pair("EmployeeSad", al_load_bitmap("employee_sad.bmp")));
sprites.insert(pair("Conveyor", al_load_bitmap("conveyor.bmp")));
-
+ sprites.insert(pair("KeyCtrl", al_load_bitmap("small_key_ctrl.bmp")));
+ sprites.insert(pair("KeyH", al_load_bitmap("small_key_h.bmp")));
+ sprites.insert(pair("KeyM", al_load_bitmap("small_key_m.bmp")));
+ sprites.insert(pair("KeyEsc", al_load_bitmap("small_key_esc.bmp")));
+
font = al_create_builtin_font();
}
@@ -31,8 +38,9 @@ void Game::reset() {
}
void Game::run() {
+ GameScreen game_screen(sprites);
StartScreen start_screen(sprites);
- GameScreen game_screen(sprites, 3);
+ ResultScreen result_screen(sprites, 0, 0);
while (state != Exit) {
al_clear_to_color(al_map_rgb(0, 0, 0));
switch (state) {
@@ -41,9 +49,16 @@ void Game::run() {
state = start_screen.next_state;
break;
case Gameplay:
+ game_screen.reset(3, 5, 3);
game_screen.run(font);
state = game_screen.next_state;
break;
+ case End:
+ result_screen.score = game_screen.score;
+ result_screen.difficulty = game_screen.difficulty;
+ result_screen.run(font);
+ state = result_screen.next_state;
+ break;
}
}
}
\ No newline at end of file
diff --git a/TrustFall/TrustFall/game_screen.cpp b/TrustFall/TrustFall/game_screen.cpp
index 8ecbf51..c4d2fcc 100644
--- a/TrustFall/TrustFall/game_screen.cpp
+++ b/TrustFall/TrustFall/game_screen.cpp
@@ -2,6 +2,8 @@
#include
#include
#include
+#include
+#include