Sunset the dedicated cutscene asset loader and the item pool
Cutscenes now load through the generic ASSET_LOADER_TYPE_JSON loader and parse straight into fixed static buffers via new cutsceneParseDoc/ cutsceneParseItem/cutsceneCountItems helpers (cutscene.c), removing the bespoke ASSET_LOADER_TYPE_CUTSCENE pipeline entirely. Only one cutscene (plus one INSERT target) is ever resident, so each resolve locks, steals the parsed doc, unlocks, and force-reaps immediately - fixing a stale-cache-reuse bug where revisiting a cutscene name after a different one could return data from the shared buffer's previous occupant. ENTITY_WALK_TO and MAP_AREA_WAIT now store their waypoints/area ids in fixed-size arrays inline on their own item struct instead of a shared bump-allocated pool, so pool/poolOffset are gone from every item type's Load callback. cutscene_t.dataSize (and the CUTSCENE(...) macro's SIZE parameter) is removed along with it - it sized entries out of that same now-deleted pool and had no other reader. NPC #4's battletest cutscene and the main menu's cutscene now resolve their target by name on interact instead of eagerly at init, so a resolved-once pointer is never held past the point its backing buffer can be reused for something else. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -17,8 +17,7 @@ static const cutsceneitem_t CUTSCENE_TEST_INTERACT_ITEMS[] = {
|
||||
static const cutscene_t CUTSCENE_TEST_INTERACT = {
|
||||
.items = CUTSCENE_TEST_INTERACT_ITEMS,
|
||||
.itemCount = 1,
|
||||
.pause = CUTSCENE_PAUSE_NONE,
|
||||
.dataSize = 0
|
||||
.pause = CUTSCENE_PAUSE_NONE
|
||||
};
|
||||
|
||||
static entity_t *player;
|
||||
|
||||
Reference in New Issue
Block a user