Using latest exclib, json cleanup occurs properly now. But there's a bug in the joystick handler that causes SDL to crash malloc? So I disabled that until I can figure it out.

This commit is contained in:
2024-12-22 11:08:59 -05:00
parent 29cc3c341d
commit e860c84bd1
4 changed files with 67 additions and 49 deletions

View File

@@ -76,40 +76,34 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
"little guy",
NULL);
actorptr->state = (ACTOR_STATE_ALIVE | ACTOR_STATE_FACE_LEFT);
} EXCEPT {
} CATCH(EXC_NULLPOINTER) {
SDL_Log("Attempting to load asset: %s (%s)", EXCLIB_EXCEPTION->description, SDL_GetError());
return SDL_APP_FAILURE;
} FINALLY {
} ETRY;
/*TRY {
actorptr = heap_next_actor();
actor_initialize(actorptr, "npc");
actorptr->basechar = characterptr;
actorptr->x = 0;
actorptr->y = 0;
actorptr->state = (ACTOR_STATE_ALIVE | ACTOR_STATE_FACE_LEFT | ACTOR_STATE_MOVING_LEFT);
} CATCH(EXC_NULLPOINTER) {
SDL_Log("Attempting to setup npc: %s (%s)", EXCLIB_EXCEPTION->description, SDL_GetError());
return SDL_APP_FAILURE;
} ETRY;*/
/*
TRY {
//load_start_bgm("../assets/nutcracker.mid");
load_start_bgm("../assets/memories.mp3");
} EXCEPT {
} CATCH(EXC_NULLPOINTER) {
} CATCH_GROUP(EXC_SDL_INIT) {
} CATCH_GROUP(EXC_SDL_MUSICMIXER) {
SDL_Log("Attempting to load and play background music: %s (%s)", EXCLIB_EXCEPTION->description, SDL_GetError());
return SDL_APP_FAILURE;
} FINALLY {
} ETRY;
*/
TRY {
tilemap_load("../assets/tilemap.tmj", &gamemap);
} EXCEPT {
} DEFAULT {
SDL_Log("Exception while loading tilemap: %s (%s)", EXCLIB_EXCEPTION->description, SDL_GetError());
return SDL_APP_FAILURE;
} FINALLY {
} ETRY;
camera.x = 0;