Every CUTSCENE_XXX(...) shorthand (CUTSCENE_WAIT, CUTSCENE_TEXT, CUTSCENE_ENTITY_WALK_TO, etc.) existed to build a cutsceneitem_t literal in C; real cutscenes are now authored exclusively as .jsonc files, and the only other users were test fixtures. Deletes all ~55 of these macros (and the shared CUTSCENE_ITEM(...) helper they built on) along with their doc comments, leaving each item's struct/enum/Start/Update/ Load declarations untouched. test_battle.c, test_cutscenecontrol.c, test_cutscenemaparea.c, test_cutscenesystem.c and test_entityinteract.c now build their cutsceneitem_t fixtures as plain struct literals instead. Co-Authored-By: Claude Sonnet 5 <[email protected]>
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "rpg/cutscene/item/cutsceneitembase.h"
|
|
|
|
typedef struct {
|
|
const char_t *name;
|
|
} cutscenemarker_t;
|
|
|
|
/**
|
|
* Starts a marker item. A marker does nothing on its own - it exists
|
|
* purely as a named position for cutsceneGoTo to jump to.
|
|
*
|
|
* @param item The cutscene item.
|
|
* @param data Runtime data storage.
|
|
*/
|
|
void cutsceneMarkerStart(
|
|
const cutsceneitem_t *item,
|
|
cutsceneitemdata_t *data
|
|
);
|
|
|
|
/**
|
|
* Updates a marker item (always completes immediately).
|
|
*
|
|
* @param item The cutscene item.
|
|
* @param data Runtime data storage.
|
|
* @returns true always.
|
|
*/
|
|
bool_t cutsceneMarkerUpdate(
|
|
const cutsceneitem_t *item,
|
|
cutsceneitemdata_t *data
|
|
);
|
|
|
|
/**
|
|
* Parses a MARKER cutscene item's JSON fields into item.
|
|
*
|
|
* @param itemObj The item's JSON object.
|
|
* @param item Destination item, already zeroed by the caller.
|
|
* @return Error code indicating success or failure of the parse.
|
|
*/
|
|
errorret_t cutsceneMarkerLoad(
|
|
yyjson_val *itemObj,
|
|
cutsceneitem_t *item
|
|
);
|