Break out the game demo into multiple source and include files, add a bunch of missing assets, conform to the new subsystems interface from libakgl

This commit is contained in:
2026-05-25 21:30:47 -04:00
parent f7e61cf59b
commit df4d532d82
23 changed files with 873 additions and 406 deletions

18
src/init.c Normal file
View File

@@ -0,0 +1,18 @@
#include <akgltest.h>
akerr_ErrorContext AKERR_NOIGNORE *akgltest_load_assets()
{
PREPARE_ERROR(e);
for ( int i = 0; i < numsprites ; i++) {
strcpy((char *)&dirnamebuf, spritepaths[i]);
SDL_Log("Loading sprite %s (%d of %d)....", (char *)&dirnamebuf, i, numsprites);
PASS(e, akgl_sprite_load_json((char *)&dirnamebuf));
}
for ( int i = 0; i < numchars ; i++ ) {
strcpy((char *)&dirnamebuf, characterpaths[i]);
SDL_Log("Loading character %s (%d of %d)....", (char *)&dirnamebuf, i, numchars);
PASS(e, akgl_character_load_json((char *)&dirnamebuf));
}
SUCCEED_RETURN(e);
}