aboutsummaryrefslogtreecommitdiff
path: root/source/App.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-05-06 19:52:12 -0700
committerrtk0c <[email protected]>2022-05-06 19:52:12 -0700
commitcde94efdd44553f3f6575ce84b44c6799e1a1425 (patch)
tree593b9f280f2e223268f8d5c73f5d1dd1aba50c36 /source/App.hpp
parent4c9f5ee706faa1435b7dc2f3b6d4753e1289c351 (diff)
Changeset: 22 Improved camera and various cleanups
Diffstat (limited to 'source/App.hpp')
-rw-r--r--source/App.hpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/App.hpp b/source/App.hpp
index 26857db..54e1fb5 100644
--- a/source/App.hpp
+++ b/source/App.hpp
@@ -17,15 +17,18 @@
using KeyCaptureCallback = std::function<bool(int, int)>;
+// TODO how should we split responsibilities between App and Editor?
class App {
+ friend class EditorInstance;
+
private:
std::deque<KeyCaptureCallback> mKeyCaptureCallbacks;
PodVector<Player*> mPlayers;
std::unique_ptr<EditorInstance> mEditor;
GameWorld mWorld;
- Camera mGameCamera;
- Camera mEditorCamera;
- Renderer mRenderer;
+ Renderer mWorldRenderer;
+ Camera mMainCamera;
+ Camera* mActiveCamera;
// NOTE: should only be true when mEditor != nullptr
bool mEditorVisible = false;
bool mGameRunning = false;
@@ -37,6 +40,10 @@ public:
EditorInstance* GetEditor() { return mEditor.get(); }
GameWorld* GetWorld() { return &mWorld; }
+ Camera* GetActiveCamera() const;
+ void BindActiveCamera(Camera* camera);
+ void UnbindActiveCamera();
+
bool IsGameRunning() const;
void SetGameRunning(bool running);