From 235f128136c7c23a64fa5f0424edf05879b8ee9b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 28 Jan 2021 18:51:30 +0000 Subject: Input stack and logical split of camera controller --- application/manualCameraController.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 application/manualCameraController.h (limited to 'application/manualCameraController.h') diff --git a/application/manualCameraController.h b/application/manualCameraController.h new file mode 100644 index 0000000..112ec5c --- /dev/null +++ b/application/manualCameraController.h @@ -0,0 +1,25 @@ +#ifndef MANUAL_CAMERA_CONTROLLER_H +#define MANUAL_CAMERA_CONTROLLER_H + +#include "game/worldobject.h" +#include "inputHandler.h" +#include +#include +#include + +class Camera; +class Shader; + +class ManualCameraController : public CameraController, public InputHandler { +public: + bool handleInput(SDL_Event & e) override; + + void tick(TickDuration) override { } + + void updateCamera(Camera * camera, Shader * shader) const override; + +private: + bool ctrl {false}, mrb {false}; + mutable std::optional motion; +}; +#endif -- cgit v1.2.3