diff --git a/source/duke3d/src/events_defs.h b/source/duke3d/src/events_defs.h index c4a5fc721..4d2ec193e 100644 --- a/source/duke3d/src/events_defs.h +++ b/source/duke3d/src/events_defs.h @@ -128,6 +128,8 @@ enum GameEvent_t { EVENT_PRECUTSCENE, EVENT_SKIPCUTSCENE, EVENT_SCREEN, + EVENT_DISPLAYROOMSEND, + EVENT_DISPLAYEND, #ifdef LUNATIC EVENT_ANIMATEALLSPRITES, #endif diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 6c5814621..6793459fe 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -1168,6 +1168,8 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio) newaspect_enable = 0; setaspect(viewingRange, yxAspect); } + + VM_OnEvent(EVENT_DISPLAYROOMSEND, g_player[screenpeek].ps->i, screenpeek); } void G_DumpDebugInfo(void) diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index 7165b8616..58299a4f0 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -724,6 +724,8 @@ const char *EventNames[MAXEVENTS] = "EVENT_PRECUTSCENE", "EVENT_SKIPCUTSCENE", "EVENT_SCREEN", + "EVENT_DISPLAYROOMSEND", + "EVENT_DISPLAYEND", #ifdef LUNATIC "EVENT_ANIMATEALLSPRITES", #endif diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 319e7c860..b1cd0ca9b 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -1293,6 +1293,8 @@ void G_DisplayRest(int32_t smoothratio) applied = 0; } } + + VM_OnEvent(EVENT_DISPLAYEND, g_player[screenpeek].ps->i, screenpeek); } void G_FadePalette(int32_t r, int32_t g, int32_t b, int32_t e)