mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 10:13:42 +00:00
mod: added InputManager call to GameInternal
This commit is contained in:
parent
8e7d9f2edf
commit
9c3185c6d8
@ -44,7 +44,7 @@ public:
|
||||
/* static */ AssetManager* assets;
|
||||
/* static */ TextureManager* textureManager;
|
||||
/* static */ SoundManager* soundManager;
|
||||
/* static */ InputManager* inputs;
|
||||
/* static */ InputManager* inputManager;
|
||||
|
||||
Manager manager;
|
||||
RenderManager renderManager;
|
||||
|
||||
@ -33,7 +33,7 @@ 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();
|
||||
GameInternal::inputManager = new InputManager();
|
||||
|
||||
int flags = 0;
|
||||
if (fullscreen)
|
||||
@ -123,6 +123,8 @@ void GameInternal::update(Uint64 frameTime)
|
||||
uint_fast16_t diffTime = frameTime - this->lastFrameTime;
|
||||
manager.update(diffTime);
|
||||
|
||||
inputManager->processEvents(); // TODO: find out if location is correct
|
||||
|
||||
this->gameInstance->update(diffTime); // TODO: this might have to be split up into two update functions, before and after manager...
|
||||
|
||||
this->lastFrameTime = frameTime;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user