diff options
author | hnOsmium0001 <[email protected]> | 2022-04-25 20:22:07 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-04-25 20:22:07 -0700 |
commit | f54370de7e4214cb7813d26b1a39a8f6e42b7b56 (patch) | |
tree | 20913b4099b77af933fcd2ebb4e73f53b366ad8f /source/App.hpp | |
parent | c8ebee643f23c34ff57f69f8dfcf1903b59ea9d1 (diff) |
Initial work on rendering sprites to screen
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); |