2024-03-01 17:09:24 +08:00
|
|
|
#pragma once
|
|
|
|
|
2024-03-05 11:40:42 +08:00
|
|
|
#include "entity.h"
|
|
|
|
#include "physics.h"
|
|
|
|
#include "player.h"
|
|
|
|
#include "input.h"
|
2024-03-08 14:51:29 +08:00
|
|
|
#include "camera.h"
|
2024-03-26 12:17:21 +08:00
|
|
|
#include "particle.h"
|
2024-03-05 11:40:42 +08:00
|
|
|
#include "types.h"
|
2024-03-05 14:17:53 +08:00
|
|
|
#include "util/vector.h"
|
2024-03-01 17:09:24 +08:00
|
|
|
|
2024-03-04 15:05:21 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2024-03-01 17:09:24 +08:00
|
|
|
|
|
|
|
typedef struct _App {
|
2024-03-26 12:17:21 +08:00
|
|
|
System_Physics *physics;
|
|
|
|
System_Player *player;
|
|
|
|
System_Input *input;
|
|
|
|
System_Entity *entity;
|
|
|
|
System_Camera *camera;
|
|
|
|
System_Particle *particle;
|
2024-03-04 15:05:21 +08:00
|
|
|
|
2024-04-02 15:42:04 +08:00
|
|
|
char *switch_level;
|
|
|
|
bool wantQuit;
|
2024-03-01 17:09:24 +08:00
|
|
|
} App;
|
2024-03-04 13:41:01 +08:00
|
|
|
|
|
|
|
App *app_NewApp();
|
|
|
|
void app_DeleteApp(App *app);
|
|
|
|
|
|
|
|
void app_Advance(App *app, Duration deltaTime);
|
2024-03-04 16:13:43 +08:00
|
|
|
void app_Render(App *app);
|
2024-03-04 15:05:21 +08:00
|
|
|
|
2024-03-05 14:17:53 +08:00
|
|
|
void app_DebugText(App *app, vector_Vector *vec_string);
|
|
|
|
|
2024-04-02 15:42:04 +08:00
|
|
|
// Trigger the app to reload all entities before next frame update.
|
|
|
|
void app_QueueLoadLevel(App *app, const char *level_name);
|
|
|
|
void _app_SwitchLevel(App *app);
|
|
|
|
|
2024-03-04 15:05:21 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|