diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-10-02 17:32:23 +0700 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-10-02 17:32:23 +0700 |
| commit | 4aeff0886aa61ed3834ef4826aa1a1f3e99508b1 (patch) | |
| tree | 0be178818e4ed9de7e70872c224ce73adaba8f6a /src/GameInitDispose.cpp | |
| parent | 7a4fdb3978c36e4309479806140f38669bcd3883 (diff) | |
| download | blackshades-4aeff0886aa61ed3834ef4826aa1a1f3e99508b1.tar.gz | |
Clean up unused functions and style2.4.0
Diffstat (limited to 'src/GameInitDispose.cpp')
| -rw-r--r-- | src/GameInitDispose.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp index 8c9ea72..bd8a05f 100644 --- a/src/GameInitDispose.cpp +++ b/src/GameInitDispose.cpp @@ -20,11 +20,17 @@ // You should have received a copy of the GNU General Public License // along with Black Shades. If not, see <https://www.gnu.org/licenses/>. +#include <fstream> + +#include <time.h> + #include <AL/alc.h> +#include <GL/glu.h> #include "config.h" #include "misc.h" #include "Game.h" +#include "Support.h" extern unsigned int gSourceID[37]; extern unsigned int gSampleSet[37]; @@ -88,11 +94,11 @@ Game* makeGame(Config config) game->debug = config.debug; // TODO: Read high score - ifstream ipstream2 {"highscore.txt"}; + std::ifstream ipstream2 {"highscore.txt"}; if (!ipstream2) { - ofstream opstream("highscore.txt"); - opstream << (game->highscore = 0) << endl; - opstream << (game->beatgame = 0) << endl; + std::ofstream opstream("highscore.txt"); + opstream << (game->highscore = 0) << std::endl; + opstream << (game->beatgame = 0) << std::endl; opstream.close(); } else { ipstream2 >> game->highscore; @@ -250,7 +256,7 @@ void initGame(Game* game) game->timeremaining = 50; game->difficulty= 0.8f; - ifstream ipstream {"data/customlevels.txt"}; + std::ifstream ipstream {"data/customlevels.txt"}; if (ipstream) { ipstream.ignore(256,'\n');//ignore descriptive text ipstream >> game->nummissions; |
