Nimbin[12]?SDL & Graphics / mapcreator / src/game/game_state.hpp

mapcreator git · master

SDL3 2.5D game and engine using assets, with map editor

sdl3 c++ game engine map-editor cmake · first commit 2025-10-31 · last commit 2026-09-07 (1 month ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-spieleentwicklung/map_creator

C++ 99.3%
git clone https://git.christianimmanuel.de/sdl-graphics/mapcreator.gitwget https://git.christianimmanuel.de/sdl-graphics/mapcreator/archive/mapcreator.tar.gz
src/game/game_state.hpp 623 B · 30 lines raw
#pragma once

#include <SDL3/SDL.h>
#include <SDL3/SDL_mouse.h>

#include "audio/audio.hpp"
#include "cursor/animated_cursor.hpp"

class Game;
class Input;

enum class GameState_e {
    STATE_MODIFY,
    STATE_PLAYING,
    STATE_MENU_MAIN
};

class GameState {
public:
    virtual ~GameState() = default;
    virtual bool Init(Game*) = 0;
    virtual void handle_Events(SDL_Event&, Game*) = 0;
    virtual void Update(Game*) = 0;
    virtual void Render(Game*) = 0;
    bool is_Finished() const { return finished; }
protected:
    Audio* audio = nullptr;
    AnimatedCursor* cursor = nullptr;
    bool finished = false;
};