CON: Add EVENT_PRECUTSCENE.

Used with startcutscene. RETURN sets the frame of an ANM before it is rendered.

Patch from Fox.

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

View file

@ -323,6 +323,8 @@ int32_t Anim_Play(const char *fn)
if (!pic) if (!pic)
break; // no more pics! break; // no more pics!
VM_OnEventWithReturn(EVENT_PRECUTSCENE, -1, myconnectindex, framenum);
animvpx_render_frame(&codec); animvpx_render_frame(&codec);
VM_OnEventWithReturn(EVENT_CUTSCENE, -1, myconnectindex, framenum); VM_OnEventWithReturn(EVENT_CUTSCENE, -1, myconnectindex, framenum);
@ -466,6 +468,8 @@ int32_t Anim_Play(const char *fn)
if (totalclock < ototalclock - 1) if (totalclock < ototalclock - 1)
continue; continue;
i = VM_OnEventWithReturn(EVENT_PRECUTSCENE, -1, myconnectindex, i);
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

View file

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

View file

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