diff options
| author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-09-14 23:58:50 +0700 |
|---|---|---|
| committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-09-14 23:58:50 +0700 |
| commit | 0e9c124d6ee480e20be07f955dd0ffe486091a1e (patch) | |
| tree | a87d21c55315183a38581200464ff73ae56e3867 /src/GameInitDispose.cpp | |
| parent | 9505ee252e2670aa40a2c3db7e9101940099f2b2 (diff) | |
| download | blackshades-0e9c124d6ee480e20be07f955dd0ffe486091a1e.tar.gz | |
Force menu and hardware cursor
Diffstat (limited to 'src/GameInitDispose.cpp')
| -rw-r--r-- | src/GameInitDispose.cpp | 42 |
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++){ |
