const char *spritesheetName = json_object_get_string(sceneJsonObject, "spritesheet");
if (spritesheetName != NULL) {
- size_t imageWidth, imageHeight;
- void *imageData = bzGfxLoadAsepriteImage(arena, &imageWidth, &imageHeight, spritesheetName); // FIXME, temp arena
- bzGfxPrepareSpritesheet(arena, imageWidth, imageHeight, imageData);
+ size_t imageFrames, imageWidth, imageHeight;
+ void *imageData = bzGfxLoadAsepriteImage(arena, &imageFrames, &imageWidth, &imageHeight, spritesheetName); // FIXME, temp arena
+ bzGfxPrepareSpritesheet(arena, imageFrames, imageWidth, imageHeight, imageData);
//free(imageData);
}
const char *fontName = json_object_get_string(sceneJsonObject, "font");
- BZFont *font = bzGfxLoadFont(arena, fontName); // FIXME, temp arena??
- bzGfxPrepareFont(arena, font);
+ if (fontName != NULL) {
+ BZFont *font = bzGfxLoadFont(arena, fontName); // FIXME, temp arena??
+ bzGfxPrepareFont(arena, font);
+ }
JSON_Array *actorDefinitionsArray = json_object_get_array(sceneJsonObject, "actors");
size_t actorDefinitionsArrayCount = json_array_get_count(actorDefinitionsArray);