Ripped out the hashmap-based registry, the way it stores copies of objects and not references makes it incompatible for my use
This commit is contained in:
@@ -32,8 +32,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
exclib_name_exception(EXC_TYPEERROR, "Type Error");
|
||||
exclib_name_exception(EXC_KEYERROR, "Key Error");
|
||||
|
||||
registry_init();
|
||||
|
||||
SDL_SetAppMetadata("SDL3-GameTest", "0.1", "net.aklabs.sdl3-gametest");
|
||||
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK | SDL_INIT_AUDIO )) {
|
||||
@@ -66,7 +64,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
load_frame_from_image("../assets/table.jpg", &table);
|
||||
|
||||
spritesheet_new(&actorsheet, 48, 48, "../assets/Actor1.png");
|
||||
hashmap_set(registry_spritesheet, &actorsheet);
|
||||
|
||||
sprite_new(&littleguy, "little guy facing down", &actorsheet);
|
||||
littleguy.width = 48;
|
||||
@@ -83,7 +80,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
||||
player.curSprite = &littleguy;
|
||||
player.x = 0;
|
||||
player.y = 0;
|
||||
hashmap_set(registry_actor, &player);
|
||||
} CATCH(EXC_NULLPOINTER) {
|
||||
SDL_Log("Attempting to load asset: %s (%s)", EXCLIB_EXCEPTION->description, SDL_GetError());
|
||||
return SDL_APP_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user