diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp index f46f406..1c1dd09 100644 --- a/source/code/BlockGame.cpp +++ b/source/code/BlockGame.cpp @@ -301,6 +301,7 @@ void BlockGame::NewGame(const BlockGameStartInfo &s) { } } + this->singlePuzzle = s.singlePuzzle; } if (s.vsMode) { vsMode = true; @@ -1901,10 +1902,6 @@ void BlockGame::PerformAction(unsigned int tick, int action, string param) { }; } -void BlockGame::setSinglePuzzle(bool singlePuzzle) { - this->singlePuzzle = singlePuzzle; -} - bool BlockGame::isSinglePuzzle() const { return singlePuzzle; } diff --git a/source/code/BlockGame.hpp b/source/code/BlockGame.hpp index 7ff730c..dbe877b 100644 --- a/source/code/BlockGame.hpp +++ b/source/code/BlockGame.hpp @@ -66,6 +66,8 @@ struct BlockGameStartInfo { bool stageClear = false; ///True if puzzle mode. level must be set too. bool puzzleMode = false; + ///Single puzzle is used for the editor only. + bool singlePuzzle = false; int level = 0; bool AI = false; bool vsMode = false; @@ -219,7 +221,6 @@ public: //void SetGameOver(); //Prints "draw" and ends the game void setDraw(); - void setSinglePuzzle(bool singlePuzzle); bool isSinglePuzzle() const; int getLevel() const; void setGarbageTarget(BlockGame* garbageTarget); diff --git a/source/code/main.cpp b/source/code/main.cpp index 29b52d3..1191050 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -1837,8 +1837,8 @@ int main(int argc, char* argv[]) { BlockGameStartInfo s; s.puzzleMode = true; s.level = singlePuzzleNr; + s.singlePuzzle = true; theGame.NewGame(s); - theGame.setSinglePuzzle(true); } SDL_RenderClear(screen); DrawIMG(backgroundImage, screen, 0, 0); @@ -1938,8 +1938,8 @@ int runGame(int gametype, int level) { BlockGameStartInfo s; s.puzzleMode = true; s.level = singlePuzzleNr; + s.singlePuzzle = true; theGame.NewGame(s); - theGame.setSinglePuzzle(true); } //game loop int done = 0;