#include "app.h" #include "platform.h" static inline bool app_init(AppState *state, PlatformAPI platform) { platform.log("INIT"); state->lt_memory = platform.calloc(LT_MEMORY_SIZE, sizeof(u8)); state->st_memory = platform.calloc(ST_MEMORY_SIZE, sizeof(u8)); return true; } static inline void app_destroy(AppState *state, PlatformAPI platform) { (void)state; // Unused parameter. platform.log("DESTROY"); } static inline void app_reload(AppState *state, PlatformAPI platform) { (void)state; // Unused parameter. platform.log("RELOAD"); } static inline void app_unload(AppState *state, PlatformAPI platform) { (void)state; // Unused parameter. platform.log("UNLOAD"); } static inline bool app_step(AppState *state, PlatformAPI platform) { (void)state; // Unused parameter. platform.log("STEP"); platform.sleep(100000); return true; } const AppAPI APP_API = { .init = app_init, .destroy = app_destroy, .reload = app_reload, .step = app_step, .unload = app_unload, };