diff options
author | rtk0c <[email protected]> | 2023-10-19 22:50:07 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2025-08-16 11:31:16 -0700 |
commit | 297232d21594b138bb368a42b5b0d085ff9ed6aa (patch) | |
tree | 075d5407e1e12a9d35cbee6e4c20ad34e0765c42 /source/30-game/App.hpp | |
parent | d5cd34ff69f7fd134d5450696f298af1a864afbc (diff) |
The great renaming: switch to "module style"
Diffstat (limited to 'source/30-game/App.hpp')
-rw-r--r-- | source/30-game/App.hpp | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/source/30-game/App.hpp b/source/30-game/App.hpp deleted file mode 100644 index c73c5a1..0000000 --- a/source/30-game/App.hpp +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - -#include "Camera.hpp" -#include "EditorCore.hpp" -#include "Player.hpp" -#include "PodVector.hpp" -#include "Renderer.hpp" -#include "World.hpp" - -#define GLFW_INCLUDE_NONE -#include <GLFW/glfw3.h> - -#include <deque> -#include <functional> -#include <memory> -#include <vector> - -using KeyCaptureCallback = std::function<bool(int, int)>; - -class App { -private: - std::deque<KeyCaptureCallback> mKeyCaptureCallbacks; - PodVector<Player*> mPlayers; - std::unique_ptr<IEditor> mEditor; - GameWorld mWorld; - Renderer mWorldRenderer; - Camera mMainCamera; - Camera* mActiveCamera; - // NOTE: should only be true when mEditor != nullptr - bool mEditorVisible = false; - bool mGameRunning = false; - -public: - App(); - ~App(); - - IEditor* GetEditor() { return mEditor.get(); } - GameWorld* GetWorld() { return &mWorld; } - Renderer* GetWorldRenderer() { return &mWorldRenderer; } - - Camera* GetActiveCamera() const; - void BindActiveCamera(Camera* camera); - void UnbindActiveCamera(); - - 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(float currentTime, float deltaTime); - - void HandleMouse(int button, int action); - void HandleMouseMotion(double xOff, double yOff); - void HandleKey(GLFWkeyboard* keyboard, int key, int action); - - void PushKeyCaptureCallback(KeyCaptureCallback callback); -}; |