From 82eeb53eb198dca220de624df511565769f6fd3e Mon Sep 17 00:00:00 2001 From: ezveee Date: Thu, 16 Jan 2025 12:17:11 +0100 Subject: [PATCH] mod: added InputManager to GameInternal --- include/GameInternal.h | 2 ++ src/GameInternal.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/GameInternal.h b/include/GameInternal.h index 7cb3b1f..beba641 100644 --- a/include/GameInternal.h +++ b/include/GameInternal.h @@ -10,6 +10,7 @@ #include "Manager.h" #include "Vector2D.h" #include "Entity.h" +#include "InputManager.h" #include "RenderManager.h" typedef std::function gamefunction; @@ -43,6 +44,7 @@ public: /* static */ AssetManager* assets; /* static */ TextureManager* textureManager; /* static */ SoundManager* soundManager; + /* static */ InputManager* inputs; Manager manager; RenderManager renderManager; diff --git a/src/GameInternal.cpp b/src/GameInternal.cpp index 1e4eac3..33f4da6 100644 --- a/src/GameInternal.cpp +++ b/src/GameInternal.cpp @@ -33,7 +33,8 @@ SDL_AppResult GameInternal::init(const char* title, int xpos, int ypos, int widt GameInternal::textureManager = new TextureManager(&manager); GameInternal::soundManager = new SoundManager(); GameInternal::collisionHandler = new CollisionHandler(manager); // why does this use a referrence, but AssetManager a pointer? - + GameInternal::inputs = new InputManager(); + int flags = 0; if (fullscreen) {