diff options
author | rtk0c <[email protected]> | 2022-04-25 20:22:07 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-04-25 20:22:07 -0700 |
commit | 855da86feae1a5cc14dc2d486ccf115f484dbc2e (patch) | |
tree | 8284c6a6bdfb1a919eb1a22f466f4180a329c7f3 /source/App.hpp | |
parent | d78a55de5003dbb040f1d1c369409e63a2c806d8 (diff) |
Changeset: 16 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); |