Run one persistent cutscene for the whole main menu, not just start-game
Previously the main menu UI opened directly with no cutscene, and only pressing "Start Game" spun up a brand new cutscene (main_menu_start_game.jsonc) for the save-device check/load-slots flow. Now a single cutscene (main_menu.jsonc) starts the moment the main menu scene becomes active, sitting idle (new CUTSCENE_ITEM_TYPE_IDLE item - no existing item type blocked forever with no side effect) while the menu is shown, so it can own menu-wide state going forward. Pressing "Start Game" now jumps the already-running cutscene to a NEW_GAME marker via cutsceneGoTo instead of starting a second cutscene - this already-existing mechanism needed no engine changes. Both retry options (no device / load error) also now jump straight back to NEW_GAME instead of RESTARTing the whole cutscene, since RESTART would otherwise strand the player on the idle block. sceneMainMenuStartGame also handles the case where the cutscene already ran to completion once (e.g. backing out of the save picker and pressing Start Game again) by restarting it landing straight on NEW_GAME, avoiding a crash from jumping a marker with no cutscene running. Built and verified on Linux (boots/idles without crashing, cutscene tests pass), PSP, GameCube and Wii (Docker). Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -102,6 +102,7 @@ ITEM_TYPE = {
|
||||
'AUDIO_SET_PAN': 41,
|
||||
'AUDIO_SET_LOOP': 42,
|
||||
'AUDIO_SET': 43,
|
||||
'IDLE': 44,
|
||||
}
|
||||
|
||||
PAUSE_FLAG = {'NPC': 1 << 0, 'PLAYER': 1 << 1, 'WORLD': 1 << 2, 'BATTLE': 1 << 3}
|
||||
@@ -327,7 +328,7 @@ def encode_item(item, pool):
|
||||
marker_offset = pool.add_string(option['marker'])
|
||||
buf += struct.pack('<HH', text_offset, marker_offset)
|
||||
|
||||
elif item_type in ('MODAL_CLOSE', 'RESTART'):
|
||||
elif item_type in ('MODAL_CLOSE', 'RESTART', 'IDLE'):
|
||||
pass
|
||||
|
||||
elif item_type == 'PRINT':
|
||||
|
||||
Reference in New Issue
Block a user