aboutsummaryrefslogtreecommitdiff
path: root/src/GameTick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameTick.cpp')
-rw-r--r--src/GameTick.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/GameTick.cpp b/src/GameTick.cpp
index fd9dad5..42af2a6 100644
--- a/src/GameTick.cpp
+++ b/src/GameTick.cpp
@@ -25,7 +25,6 @@
#include <algorithm>
#include <fstream>
-#include "misc.h"
#include "Game.h"
#include "Support.h"
@@ -89,19 +88,6 @@ void Game::Splat(int k)
alSourcePlay(gSourceID[headwhacksound]);
}
-void Game::saveHighScore()
-{
- if (score > highscore) {
- highscore = score;
- /* TODO */
- std::ofstream opstream("highscore.txt");
- opstream << highscore;
- opstream << "\n";
- opstream << beatgame;
- opstream.close();
- }
-}
-
void Game::updateSong()
{
if (environment == rainy_environment)
@@ -175,7 +161,6 @@ void click(Game* game, int button, int action, int mods)
}
alSourcePlay(gSourceID[losesound]);
- game->saveHighScore();
break;
}
return;
@@ -457,6 +442,7 @@ void Game::Tick()
if (timeremaining <= 0) {
score += ++mission * 50 + 100;
+ highscore = max(score, highscore);
flashamount = flashg = 1;
flashr = flashb = 0;
@@ -477,7 +463,6 @@ void Game::Tick()
setMenu(this, beatgame = true);
gameinprogress = 0;
- saveHighScore();
} else {
updateSong();
initGame(this);