input and handler possibly fixed

This commit is contained in:
herbglitch 2022-11-11 01:15:33 -07:00
parent 31b8730a61
commit d6281e8eac
11 changed files with 84 additions and 59 deletions

View file

@ -7,12 +7,16 @@ extern "C" {
#include "arc/graphics/window.h"
#include "arc/graphics/renderer.h"
#include "arc/input/mouse.h"
#include "arc/input/keyboard.h"
#include "arc/std/handler.h"
typedef struct ARC_EngineData {
ARC_Window *window;
ARC_Renderer *renderer;
ARC_Handler *state;
ARC_Mouse *mouse;
ARC_Keyboard *keyboard;
double dt;
} ARC_EngineData;

View file

@ -5,9 +5,12 @@
extern "C" {
#endif
typedef void (* ARC_State_UpdateFn)(void *data);
typedef void (* ARC_State_RenderFn)(void *data);
typedef struct ARC_State {
void (* updateFn)();
void (* renderFn)();
ARC_State_UpdateFn updateFn;
ARC_State_RenderFn renderFn;
void *data;
} ARC_State;
void ARC_State_Update(void *data);