Game rebuilds against latest libsdl3game

This commit is contained in:
2026-05-04 00:18:55 -04:00
parent 2028065b84
commit e95b907ba9
7 changed files with 14 additions and 15 deletions

View File

@@ -5,7 +5,6 @@
#include <SDL3_image/SDL_image.h>
#include <SDL3_mixer/SDL_mixer.h>
#include <sdlerror.h>
#include <sdl3game/assets.h>
#include <sdl3game/iterator.h>
#include <sdl3game/tilemap.h>
@@ -31,7 +30,7 @@ char *spritepaths[] = {
char dirnamebuf[1024];
ErrorContext ERROR_NOIGNORE *user_breakpoint(actor *obj, SDL_Event *event)
akerr_ErrorContext AKERR_NOIGNORE *user_breakpoint(actor *obj, SDL_Event *event)
{
PREPARE_ERROR(errctx);
SDL_Log("User breakpoint hit");
@@ -45,7 +44,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
*appstate = (void *)&game.state;
PREPARE_ERROR(errctx);
ATTEMPT {
FAIL_ZERO_BREAK(errctx, appstate, ERR_NULLPOINTER, "NULL appstate pointer");
FAIL_ZERO_BREAK(errctx, appstate, AKERR_NULLPOINTER, "NULL appstate pointer");
strcpy((char *)&game.name, "sdl3-gametest");
strcpy((char *)&game.version, "0.0.1");
@@ -67,7 +66,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
REGISTRY_CHARACTER,
"little guy",
NULL);
FAIL_ZERO_BREAK(errctx, actorptr->basechar, ERR_REGISTRY, "Can't load character 'little guy' from the registry");
FAIL_ZERO_BREAK(errctx, actorptr->basechar, AKERR_REGISTRY, "Can't load character 'little guy' from the registry");
actorptr->movement_controls_face = false;
actorptr->state = (ACTOR_STATE_ALIVE | ACTOR_STATE_FACE_LEFT);
actorptr->x = 320;
@@ -134,8 +133,8 @@ SDL_AppResult SDL_AppEvent(void *appstate, SDL_Event *event)
PREPARE_ERROR(errctx);
ATTEMPT {
FAIL_ZERO_BREAK(errctx, appstate, ERR_NULLPOINTER, "NULL appstate pointer");
FAIL_ZERO_BREAK(errctx, event, ERR_NULLPOINTER, "NULL event pointer");
FAIL_ZERO_BREAK(errctx, appstate, AKERR_NULLPOINTER, "NULL appstate pointer");
FAIL_ZERO_BREAK(errctx, event, AKERR_NULLPOINTER, "NULL event pointer");
CATCH(errctx, controller_handle_event(appstate, event));
if (event->type == SDL_EVENT_QUIT) {