Files
dusk/src/dusk/rpg/cutscene/item/ui/cutsceneuishow.h
T
YourWishesandClaude Sonnet 5 68cebce04a Remove per-item cutscene authoring macros
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]>
2026-09-14 11:20:58 -05:00

58 lines
1.4 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"
// Full-screen UI panels a cutscene can declaratively open via UI_SHOW - not
// modals/dialogs (those already have their own dedicated item types, e.g.
// MODAL/MODAL_OPTIONS_MARKERS/KEYBOARD), just whole-screen views like the
// main menu. Add a case here (and to cutsceneUIShowStart) as more screens
// need to be openable this way.
typedef enum {
UI_SCREEN_TYPE_MAIN_MENU,
} uiscreentype_t;
typedef struct {
uiscreentype_t screen;
} cutsceneuishow_t;
/**
* Starts a UI_SHOW item, opening the requested full-screen UI panel.
*
* @param item The cutscene item.
* @param data Runtime data storage.
*/
void cutsceneUIShowStart(
const cutsceneitem_t *item,
cutsceneitemdata_t *data
);
/**
* Updates a UI_SHOW item (always completes immediately).
*
* @param item The cutscene item.
* @param data Runtime data storage.
* @returns true always.
*/
bool_t cutsceneUIShowUpdate(
const cutsceneitem_t *item,
cutsceneitemdata_t *data
);
/**
* Parses a UI_SHOW 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 cutsceneUIShowLoad(
yyjson_val *itemObj,
cutsceneitem_t *item
);