diff options
Diffstat (limited to 'source/App.hpp')
-rw-r--r-- | source/App.hpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/source/App.hpp b/source/App.hpp index fbdbd43..26857db 100644 --- a/source/App.hpp +++ b/source/App.hpp @@ -1,8 +1,10 @@ #pragma once +#include "Camera.hpp" #include "EditorCore.hpp" #include "Player.hpp" #include "PodVector.hpp" +#include "Renderer.hpp" #include "World.hpp" #define GLFW_INCLUDE_NONE @@ -20,19 +22,32 @@ private: std::deque<KeyCaptureCallback> mKeyCaptureCallbacks; PodVector<Player*> mPlayers; std::unique_ptr<EditorInstance> mEditor; - std::unique_ptr<GameWorld> mCurrentWorld; - bool mEditorShown = true; - bool mInitialized = false; + GameWorld mWorld; + Camera mGameCamera; + Camera mEditorCamera; + Renderer mRenderer; + // NOTE: should only be true when mEditor != nullptr + bool mEditorVisible = false; + bool mGameRunning = false; public: - void Init(); - void Shutdown(); + App(); + ~App(); + + EditorInstance* GetEditor() { return mEditor.get(); } + GameWorld* GetWorld() { return &mWorld; } + + bool IsGameRunning() const; + void SetGameRunning(bool running); + + bool IsEditorVisible() const; + void SetEditorVisible(bool visible); // Do ImGui calls void Show(); // Do regular calls void Update(); - void Draw(); + void Draw(float currentTime, float deltaTime); void HandleMouse(int button, int action); void HandleMouseMotion(double xOff, double yOff); |