CON: Add EVENT_SKIPCUTSCENE.

Used with startcutscene. RETURN is set to 1 when any key is pressed, and is used to control when a cutscene ends.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6507 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-11-29 07:29:07 +00:00
parent 1377afe414
commit dbd8b72d10
3 changed files with 4 additions and 2 deletions

View file

@ -370,7 +370,7 @@ int32_t Anim_Play(const char *fn)
{ {
G_HandleAsync(); G_HandleAsync();
if (I_CheckAllInput()) if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, -1, myconnectindex, I_CheckAllInput()))
{ {
running = 0; running = 0;
break; break;
@ -473,7 +473,7 @@ int32_t Anim_Play(const char *fn)
waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i); waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i);
invalidatetile(TILE_ANIM, 0, 1 << 4); // JBF 20031228 invalidatetile(TILE_ANIM, 0, 1 << 4); // JBF 20031228
if (I_CheckAllInput()) if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, -1, myconnectindex, I_CheckAllInput()))
{ {
running = 0; running = 0;
goto end_anim_restore_gl; goto end_anim_restore_gl;

View file

@ -126,6 +126,7 @@ enum GameEvent_t {
EVENT_PRELOADGAME, EVENT_PRELOADGAME,
EVENT_POSTSAVEGAME, EVENT_POSTSAVEGAME,
EVENT_PRECUTSCENE, EVENT_PRECUTSCENE,
EVENT_SKIPCUTSCENE,
#ifdef LUNATIC #ifdef LUNATIC
EVENT_ANIMATEALLSPRITES, EVENT_ANIMATEALLSPRITES,
#endif #endif

View file

@ -720,6 +720,7 @@ const char *EventNames[MAXEVENTS] =
"EVENT_PRELOADGAME", "EVENT_PRELOADGAME",
"EVENT_POSTSAVEGAME", "EVENT_POSTSAVEGAME",
"EVENT_PRECUTSCENE", "EVENT_PRECUTSCENE",
"EVENT_SKIPCUTSCENE",
#ifdef LUNATIC #ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES", "EVENT_ANIMATEALLSPRITES",
#endif #endif