diff --git a/source/duke3d/src/anim.cpp b/source/duke3d/src/anim.cpp index 26f0af39f..849e88203 100644 --- a/source/duke3d/src/anim.cpp +++ b/source/duke3d/src/anim.cpp @@ -323,6 +323,8 @@ int32_t Anim_Play(const char *fn) if (!pic) break; // no more pics! + VM_OnEventWithReturn(EVENT_PRECUTSCENE, -1, myconnectindex, framenum); + animvpx_render_frame(&codec); VM_OnEventWithReturn(EVENT_CUTSCENE, -1, myconnectindex, framenum); @@ -466,6 +468,8 @@ int32_t Anim_Play(const char *fn) if (totalclock < ototalclock - 1) continue; + i = VM_OnEventWithReturn(EVENT_PRECUTSCENE, -1, myconnectindex, i); + waloff[TILE_ANIM] = (intptr_t)ANIM_DrawFrame(i); invalidatetile(TILE_ANIM, 0, 1 << 4); // JBF 20031228 diff --git a/source/duke3d/src/events_defs.h b/source/duke3d/src/events_defs.h index e5bcc5e4b..e341318d6 100644 --- a/source/duke3d/src/events_defs.h +++ b/source/duke3d/src/events_defs.h @@ -125,6 +125,7 @@ enum GameEvent_t { EVENT_DISPLAYOVERHEADMAPTEXT, EVENT_PRELOADGAME, EVENT_POSTSAVEGAME, + EVENT_PRECUTSCENE, #ifdef LUNATIC EVENT_ANIMATEALLSPRITES, #endif diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index baf4c06c3..55fa84ce5 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -719,6 +719,7 @@ const char *EventNames[MAXEVENTS] = "EVENT_DISPLAYOVERHEADMAPTEXT", "EVENT_PRELOADGAME", "EVENT_POSTSAVEGAME", + "EVENT_PRECUTSCENE", #ifdef LUNATIC "EVENT_ANIMATEALLSPRITES", #endif