Add cutsceneAppend/cutsceneAppendNext for mutating a running cutscene
cutsceneAppend adds items to the end of a cutscene_t's item array; cutsceneAppendNext inserts them at a given index instead (e.g. CUTSCENE_SYSTEM.currentItem + 1, to run immediately after the currently-executing item), shifting everything from that index onward to make room. Both are capacity-bounded against the caller- supplied itemsMax, matching cutsceneParseDoc's convention of never assuming ownership of the backing buffer's size. cutscene_t.items drops its const qualifier to allow this in-place mutation; cutsceneitem_t backing arrays in the test fixtures that get assigned into a mutable cutscene_t.items are no longer declared const either, since a const source would otherwise silently violate the field's new type. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "ui/focus/uifocus.h"
|
||||
#include "rpg/cutscene/cutscenesystem.h"
|
||||
|
||||
static const cutsceneitem_t CUTSCENE_TEST_INTERACT_ITEMS[] = {
|
||||
static cutsceneitem_t CUTSCENE_TEST_INTERACT_ITEMS[] = {
|
||||
{ .type = CUTSCENE_ITEM_TYPE_WAIT, .wait = 1.0f }
|
||||
};
|
||||
static const cutscene_t CUTSCENE_TEST_INTERACT = {
|
||||
|
||||
Reference in New Issue
Block a user