CON: Add EVENT_DISPLAYEND and EVENT_DISPLAYROOMSEND.

EVENT_DISPLAYROOMSEND: Triggered right after the game world is rendered and before any sprite above the screen.
EVENT_DISPLAYEND: Triggered after the game draws everything above the screen, including menus. A counterpart to EVENT_DISPLAYSTART.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6512 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-11-29 07:29:23 +00:00
parent 50f7f6cda4
commit c9981e76af
4 changed files with 8 additions and 0 deletions

View file

@ -128,6 +128,8 @@ enum GameEvent_t {
EVENT_PRECUTSCENE, EVENT_PRECUTSCENE,
EVENT_SKIPCUTSCENE, EVENT_SKIPCUTSCENE,
EVENT_SCREEN, EVENT_SCREEN,
EVENT_DISPLAYROOMSEND,
EVENT_DISPLAYEND,
#ifdef LUNATIC #ifdef LUNATIC
EVENT_ANIMATEALLSPRITES, EVENT_ANIMATEALLSPRITES,
#endif #endif

View file

@ -1168,6 +1168,8 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
newaspect_enable = 0; newaspect_enable = 0;
setaspect(viewingRange, yxAspect); setaspect(viewingRange, yxAspect);
} }
VM_OnEvent(EVENT_DISPLAYROOMSEND, g_player[screenpeek].ps->i, screenpeek);
} }
void G_DumpDebugInfo(void) void G_DumpDebugInfo(void)

View file

@ -724,6 +724,8 @@ const char *EventNames[MAXEVENTS] =
"EVENT_PRECUTSCENE", "EVENT_PRECUTSCENE",
"EVENT_SKIPCUTSCENE", "EVENT_SKIPCUTSCENE",
"EVENT_SCREEN", "EVENT_SCREEN",
"EVENT_DISPLAYROOMSEND",
"EVENT_DISPLAYEND",
#ifdef LUNATIC #ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES", "EVENT_ANIMATEALLSPRITES",
#endif #endif

View file

@ -1293,6 +1293,8 @@ void G_DisplayRest(int32_t smoothratio)
applied = 0; 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) void G_FadePalette(int32_t r, int32_t g, int32_t b, int32_t e)