From a59fcafb2e81f3cb40ff320b106030e8fed4bd66 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 2 Nov 2023 18:38:53 -0400 Subject: Modernized C++ a bit (and removed global highscores) --- titlestate.h | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'titlestate.h') diff --git a/titlestate.h b/titlestate.h index e989659..22c99f5 100644 --- a/titlestate.h +++ b/titlestate.h @@ -1,23 +1,46 @@ -#include - -#include "state.h" - #ifndef TITLESTATE_H #define TITLESTATE_H +#include + +#include "mazeoflife.h" +#include "sdl.h" +#include "state.h" + class TitleState : public State { public: - State* operator()(SDL_Window* window, SDL_Renderer* renderer); + explicit TitleState(Game& game); + + std::unique_ptr operator()(Game& game); + + private: + texture_ptr background_; + texture_ptr pointer_; + int selection_ = 0; }; class HowToPlayState : public State { public: - State* operator()(SDL_Window* window, SDL_Renderer* renderer); + explicit HowToPlayState(Game& game); + + std::unique_ptr operator()(Game& game); + + private: + texture_ptr background_; + texture_ptr pointer_; + int selection_ = 0; }; class HowToPlayPageTwoState : public State { public: - State* operator()(SDL_Window* window, SDL_Renderer* renderer); + explicit HowToPlayPageTwoState(Game& game); + + std::unique_ptr operator()(Game& game); + + private: + texture_ptr background_; + texture_ptr pointer_; + int selection_ = 0; }; -#endif \ No newline at end of file +#endif -- cgit 1.4.1