diff --git a/src/main.cpp b/src/main.cpp index eb9927c..e7c79b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,6 +20,8 @@ int main() { std::shared_ptr currentState = states["main_menu"]; + currentState->init(); + bool running = true; while (running) { SDL_Event event; diff --git a/src/states/InGameState.h b/src/states/InGameState.h index b5a9bed..4f0516d 100644 --- a/src/states/InGameState.h +++ b/src/states/InGameState.h @@ -1,3 +1,6 @@ +#ifndef INGAME_STATE_H +#define INGAME_STATE_H + #include "../entities/Opponent.h" #include "GameState.h" #include @@ -38,4 +41,6 @@ public: void renderItem(SDL_Renderer* renderer, Item i) const; void renderOpponent(SDL_Renderer* renderer, SDL_Texture* opponentTexture, Opponent o) const; -}; \ No newline at end of file +}; + +#endif \ No newline at end of file diff --git a/src/states/MainMenuState.cpp b/src/states/MainMenuState.cpp index 859fd90..42c0c0e 100644 --- a/src/states/MainMenuState.cpp +++ b/src/states/MainMenuState.cpp @@ -1,6 +1,14 @@ #include "MainMenuState.h" #include +void MainMenuState::update() { + // Handle updates like animations if necessary +} + +void MainMenuState::init() { + std::cout << "Main menu state initialized\n"; +} + void MainMenuState::handleEvents(SDL_Event& event) { if (event.type == SDL_KEYDOWN) { switch (event.key.keysym.sym) { diff --git a/src/states/MainMenuState.h b/src/states/MainMenuState.h index d11caa4..76238e0 100644 --- a/src/states/MainMenuState.h +++ b/src/states/MainMenuState.h @@ -1,3 +1,6 @@ +#ifndef MAIN_MNU_STATE_H +#define MAIN_MNU_STATE_H + #include "GameState.h" #include #include @@ -9,3 +12,5 @@ public: void update() override; void render(SDL_Renderer* renderer) override; }; + +#endif \ No newline at end of file