#pragma once #include #include "KTexture.h" #include #include #include "Constants.h" #include "KFont.h" #include "KInput.h" #include "KSettings.h" #include "Utils.h" namespace KapitanGame { class KExit; class KSolid; class KGame { public: KGame(); ~KGame(); KGame(const KGame& other) = delete; KGame(KGame&& other) noexcept = delete; KGame& operator=(const KGame& other) = delete; KGame& operator=(KGame&& other) noexcept = delete; int Run(int argc, char* args[]); private: SDL_Window* Window = nullptr; SDL_Renderer* Renderer = nullptr; std::unordered_map, std::shared_ptr, Utils::PairHash> BackgroundLayers[Constants::BG_LAYER_COUNT]; std::unordered_map, std::shared_ptr, Utils::PairHash> ForegroundLayers[Constants::FG_LAYER_COUNT]; std::unordered_map, std::shared_ptr, Utils::PairHash> Objects; std::vector> Pawns; std::vector> PlayerControllers; std::unordered_map Textures; std::unordered_map Fonts; SDL_Rect TileClips[Constants::TILE_COUNT]; KInput Input; uint32_t Time; uint32_t PreviousTime; SDL_FRect Map; std::weak_ptr Exit; KSettings Settings; bool SettingsTextTextureDirty = true; bool LoadLevel(); bool LoadMedia(); int LvlCounter = 1; bool Playing = true; uint32_t RestartTick = -1; }; }