aboutsummaryrefslogtreecommitdiff
path: root/source/App.hpp
diff options
context:
space:
mode:
authorhnOsmium0001 <[email protected]>2022-05-07 17:27:01 -0700
committerhnOsmium0001 <[email protected]>2022-05-07 17:27:01 -0700
commit921f756855b9e19363cb79355d12bb8d683ffc06 (patch)
tree55b2cac14f3498e36860039b8c8c3ea698c7db82 /source/App.hpp
parent1d924459c84b9d5fbd6c08743f733abad5a03c2b (diff)
Reduce dependency between editor headers and main game headers
Diffstat (limited to 'source/App.hpp')
-rw-r--r--source/App.hpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/App.hpp b/source/App.hpp
index 54e1fb5..c73c5a1 100644
--- a/source/App.hpp
+++ b/source/App.hpp
@@ -17,14 +17,11 @@
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;
+ std::unique_ptr<IEditor> mEditor;
GameWorld mWorld;
Renderer mWorldRenderer;
Camera mMainCamera;
@@ -37,8 +34,9 @@ public:
App();
~App();
- EditorInstance* GetEditor() { return mEditor.get(); }
+ IEditor* GetEditor() { return mEditor.get(); }
GameWorld* GetWorld() { return &mWorld; }
+ Renderer* GetWorldRenderer() { return &mWorldRenderer; }
Camera* GetActiveCamera() const;
void BindActiveCamera(Camera* camera);