2022-10-29 00:22:23 -06:00
|
|
|
#ifndef ARC_ENGINE_H_
|
|
|
|
|
#define ARC_ENGINE_H_
|
|
|
|
|
|
2022-10-29 16:08:41 -06:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-10-29 00:22:23 -06:00
|
|
|
#include "arc/graphics/window.h"
|
|
|
|
|
#include "arc/graphics/renderer.h"
|
2022-11-11 01:15:33 -07:00
|
|
|
#include "arc/input/mouse.h"
|
|
|
|
|
#include "arc/input/keyboard.h"
|
2022-10-29 17:07:51 -06:00
|
|
|
#include "arc/std/handler.h"
|
2022-12-13 15:50:24 -07:00
|
|
|
#include "arc/math/point.h"
|
2022-10-29 00:22:23 -06:00
|
|
|
|
|
|
|
|
typedef struct ARC_EngineData {
|
|
|
|
|
ARC_Window *window;
|
|
|
|
|
ARC_Renderer *renderer;
|
2022-10-29 17:07:51 -06:00
|
|
|
ARC_Handler *state;
|
2022-11-11 01:15:33 -07:00
|
|
|
ARC_Mouse *mouse;
|
|
|
|
|
ARC_Keyboard *keyboard;
|
2022-11-07 02:23:53 -07:00
|
|
|
|
|
|
|
|
double dt;
|
2022-11-29 14:50:20 -07:00
|
|
|
uint32_t running;
|
2022-12-13 15:50:24 -07:00
|
|
|
ARC_Point windowSize;
|
2022-10-29 00:22:23 -06:00
|
|
|
} ARC_EngineData;
|
|
|
|
|
|
|
|
|
|
//NOTE: most work below is temp, and will change once I figure out a better way to write this header
|
|
|
|
|
|
2022-12-20 00:50:55 -07:00
|
|
|
void ARC_EngineData_Create(ARC_EngineData **data, ARC_Handler_CleanDataFn cleanfn, ARC_Point windowSize);
|
2022-12-16 01:09:01 -07:00
|
|
|
|
2022-10-29 00:22:23 -06:00
|
|
|
void ARC_EngineData_Destroy(ARC_EngineData *data);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief runs ARC_Engine
|
|
|
|
|
*
|
|
|
|
|
* @param data engine data that will be used
|
|
|
|
|
* data must be created before this function
|
|
|
|
|
* and must be destroyed after this function
|
|
|
|
|
*/
|
|
|
|
|
void ARC_Engine_Run(ARC_EngineData *data);
|
|
|
|
|
|
2022-10-29 16:08:41 -06:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-10-29 00:22:23 -06:00
|
|
|
#endif // !ARC_ENGINE_H_
|