aboutsummaryrefslogtreecommitdiff
path: root/src/GameInitDispose.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameInitDispose.cpp')
-rw-r--r--src/GameInitDispose.cpp42
1 files changed, 16 insertions, 26 deletions
diff --git a/src/GameInitDispose.cpp b/src/GameInitDispose.cpp
index d94f6f6..e5fb13c 100644
--- a/src/GameInitDispose.cpp
+++ b/src/GameInitDispose.cpp
@@ -85,28 +85,26 @@ Game* makeGame(Config config)
psychicaimkey = GLFW_KEY_E;
psychickey = GLFW_KEY_Z;
- game->mainmenuness = config.menu;
game->customlevels = config.custom_levels;
game->debug = config.debug;
- if (!game->initialized) {
- // TODO: Read high score
- ifstream ipstream2 {"highscore.txt"};
- if (!ipstream2) {
- ofstream opstream("highscore.txt");
- opstream << (game->highscore = 0) << endl;
- opstream << (game->beatgame = 0) << endl;
- opstream.close();
- } else {
- ipstream2 >> game->highscore;
- ipstream2.ignore(256,'\n');
- ipstream2 >> game->beatgame;
- ipstream2.close();
- }
-
- game->disttest = true;
- game->cubetest = true;
+ // TODO: Read high score
+ ifstream ipstream2 {"highscore.txt"};
+ if (!ipstream2) {
+ ofstream opstream("highscore.txt");
+ opstream << (game->highscore = 0) << endl;
+ opstream << (game->beatgame = 0) << endl;
+ opstream.close();
+ } else {
+ ipstream2 >> game->highscore;
+ ipstream2.ignore(256,'\n');
+ ipstream2 >> game->beatgame;
+ ipstream2.close();
}
+
+ game->disttest = true;
+ game->cubetest = true;
+ setMenu(game, true);
return game;
}
@@ -1641,14 +1639,6 @@ void initGame(Game* game)
game->eqn[3] = 0;
glClearColor(fogcolorr,fogcolorg,fogcolorb,1);
- // Draw city one frame to fix evil menu bug
- if (!game->initialized) {
- game->mainmenu = 2;
- game->flashamount = 1;
- game->flashr = game->flashg = game->flashb = 1;
- alSourcePlay(gSourceID[soulinsound]);
- }
-
game->initialized = true;
/*
for(int i=0;i<sprites.howmanysprites;i++){