diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-07-26 15:27:30 +0700 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-07-26 15:27:30 +0700 |
| commit | 180d58634bd0fd742b60fb2dc907fa836bcc4894 (patch) | |
| tree | c0b74fafc03ff5ef10781438d8a1aa61f41baf5c /src | |
| parent | 02cacabff7c8301412faaaeccdbf67cd2bbc38c0 (diff) | |
| download | blackshades-180d58634bd0fd742b60fb2dc907fa836bcc4894.tar.gz | |
Move Highscore out
Diffstat (limited to 'src')
| -rw-r--r-- | src/GameInitDispose.cpp | 8 | ||||
| -rw-r--r-- | src/GameLoop.cpp | 2 | ||||
| -rw-r--r-- | src/Sprites.h | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp index b791f74..92a9f89 100644 --- a/src/GameInitDispose.cpp +++ b/src/GameInitDispose.cpp @@ -2205,11 +2205,11 @@ int Game::InitGL(void) } // TODO: Read high score - ifstream ipstream2("Data/Highscore"); + ifstream ipstream2("highscore.txt"); if(!ipstream2) { - highscore=0; - beatgame=0; - ofstream opstream("Data/Highscore"); + highscore = 0; + beatgame = 0; + ofstream opstream("highscore.txt"); opstream << highscore; opstream << "\n"; opstream << beatgame; diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp index ab8d545..2fa7fc1 100644 --- a/src/GameLoop.cpp +++ b/src/GameLoop.cpp @@ -309,7 +309,7 @@ void Game::EventLoop() if (score > highscore) { highscore=score; /* TODO */ - ofstream opstream("Data/Highscore"); + ofstream opstream("highscore.txt"); opstream << highscore; opstream << "\n"; opstream << beatgame; diff --git a/src/Sprites.h b/src/Sprites.h index 155258b..5b2b0f9 100644 --- a/src/Sprites.h +++ b/src/Sprites.h @@ -96,5 +96,4 @@ public: void LoadRainTexture(char *fileName); ~Sprites(); }; - #endif // BLACKSHADES_SPRITES_H |
