Added inputSystem

This commit is contained in:
Gulum
2017-10-24 15:58:03 +02:00
parent eb5c1e4ec3
commit 70857cb258
10 changed files with 171 additions and 19 deletions

View File

@@ -2,6 +2,7 @@
#define DARKRP2D_H
#include <SDL2/SDL.h>
#include "input/InputHandler.h"
class DarkRP2D {
private:
@@ -9,6 +10,7 @@ private:
int skippedFrames = 0;
//test texture
SDL_Texture* gTexture = NULL;
InputHandler *inputHandler;
public:
static const int UPDATES_PER_SECOND = 60;
@@ -18,12 +20,12 @@ public:
SDL_Renderer* gRenderer = NULL;
DarkRP2D() {}
void create(SDL_Renderer *gRenderer);
~DarkRP2D();
void create(SDL_Renderer *gRenderer, InputHandler *inputHandler);
void loop(unsigned int deltaTime);
void update(float deltaInSec);
void render(float deltaInSec);
void resize(int width, int height);
void dispose();
};
#endif // DARKRP2D_H