Commit 9a3a3445 authored by Srb František's avatar Srb František
Browse files

Fix Compiler warnings

fix 3 compiler warnings and a typo in highscore save prompt
parent b1c2935a
...@@ -10,7 +10,7 @@ public: ...@@ -10,7 +10,7 @@ public:
private: private:
std::string path; std::string path;
int entries_count; int entries_count;
typedef struct entry_st { struct entry_st {
std::string name; std::string name;
long time; long time;
int level_count; int level_count;
......
86 3 Any%Speedruner 86 3 Any%Speedruner
18 2 BetterBen 18 2 BetterBen
21 2 AvarageJohny 21 2 AvarageJohny
16 1 test123
2 0 quickEnder123 2 0 quickEnder123
\ No newline at end of file
...@@ -37,7 +37,7 @@ const char* fragmentShaderSource = "#version 330 core\n" ...@@ -37,7 +37,7 @@ const char* fragmentShaderSource = "#version 330 core\n"
void showHighscoreTable(long player_time,int player_level) { void showHighscoreTable(long player_time,int player_level) {
auto highscore_module = HighscoreModule("highscore.txt"); auto highscore_module = HighscoreModule("highscore.txt");
highscore_module.Show(); highscore_module.Show();
std::cout << "You finished at level " << player_time << " in " << player_level << " seconds! Enter your name: "; std::cout << "You finished at level " << player_level << " in " << player_time << " seconds! Enter your name: ";
std::string name; std::string name;
std::cin >> name; std::cin >> name;
highscore_module.Store(player_time, player_level, name); highscore_module.Store(player_time, player_level, name);
...@@ -66,6 +66,7 @@ GLFWwindow* createWindow() ...@@ -66,6 +66,7 @@ GLFWwindow* createWindow()
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) { if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
std::cout << "Failed to initialise GLAD" << std::endl; std::cout << "Failed to initialise GLAD" << std::endl;
} }
return window;
} }
unsigned int createShaderProgram() { unsigned int createShaderProgram() {
...@@ -178,7 +179,7 @@ int main() ...@@ -178,7 +179,7 @@ int main()
else { else {
// gameplay loop // gameplay loop
display.CleanWindow(); display.CleanWindow();
game_over = level.update(delta_time); game_over = level.update((float)delta_time);
level.render_scene(display); level.render_scene(display);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment