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:
18
src/init.c
Normal file
18
src/init.c
Normal 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user