f***ed up and needed to rework packages

This commit is contained in:
herbglitch 2024-05-20 03:46:04 -06:00
parent f4592ae8d0
commit b43ab1702f
73 changed files with 194 additions and 2045 deletions

View file

@ -7,37 +7,51 @@ extern "C" {
#include "arc/graphics/window.h"
#include "arc/graphics/renderer.h"
#include "arc/input/input.h"
#include "arc/input/mouse.h"
#include "arc/input/keyboard.h"
#include "arc/std/handler.h"
#include "arc/math/point.h"
#include "arc/std/bool.h"
#include "arc/std/handler.h"
typedef struct ARC_EngineData {
ARC_Window *window;
ARC_Renderer *renderer;
ARC_Handler *state;
ARC_Input *input;
ARC_Mouse *mouse;
ARC_Keyboard *keyboard;
double dt;
uint32_t running;
ARC_Bool running;
ARC_Point windowSize;
} ARC_EngineData;
//NOTE: most work below is temp, and will change once I figure out a better way to write this header
void ARC_EngineData_Create(ARC_EngineData **data, ARC_Handler_CleanDataFn cleanfn, ARC_Point windowSize);
/**
* @breif creates an ARC_EngineData type to be used when running an ARC_Engine
*
* @param data the ARC_EngineData to create
* @param cleanFn the state cleanup function
* @param windowSIze the size of window to create passed as an ARC_Point
*/
void ARC_EngineData_Create(ARC_EngineData **data, ARC_Handler_CleanDataFn cleanFn, ARC_Point windowSize);
/**
* @breif destroys an ARC_EngineData type
*
* @param data the ARC_EngineData to destroy
*/
void ARC_EngineData_Destroy(ARC_EngineData *data);
/**
* @brief runs ARC_Engine
* @brief runs ARC_Engine with an uncapped framerate
*
* @note data must be created before this function
* @note data should be destroyed after this function
*
* @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);
void ARC_Engine_RunUncapped(ARC_EngineData *data);
#ifdef __cplusplus
}