CON: Add EVENT_DISPLAYLEVELSTATS. Set RETURN to -1 to disable them.

git-svn-id: https://svn.eduke32.com/eduke32@5045 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-03-08 07:57:47 +00:00
parent c86bd80dd7
commit 35bee70ee6
4 changed files with 5 additions and 2 deletions

View file

@ -106,6 +106,7 @@ enum GameEvent_t {
EVENT_DISPLAYINACTIVEMENUREST,
EVENT_CUTSCENE,
EVENT_DISPLAYCURSOR,
EVENT_DISPLAYLEVELSTATS,
#ifdef LUNATIC
EVENT_ANIMATEALLSPRITES,
#endif

View file

@ -3841,7 +3841,7 @@ void G_DisplayRest(int32_t smoothratio)
G_PrintFPS();
// JBF 20040124: display level stats in screen corner
if ((ud.overhead_on != 2 && ud.levelstats) && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0)
if ((ud.overhead_on != 2 && ud.levelstats) && (g_player[myconnectindex].ps->gm&MODE_MENU) == 0 && VM_OnEvent(EVENT_DISPLAYLEVELSTATS, g_player[myconnectindex].ps->i, myconnectindex) == 0)
{
DukePlayer_t const * const myps = g_player[myconnectindex].ps;

View file

@ -671,6 +671,7 @@ const char *EventNames[MAXEVENTS] =
"EVENT_DISPLAYINACTIVEMENUREST",
"EVENT_CUTSCENE",
"EVENT_DISPLAYCURSOR",
"EVENT_DISPLAYLEVELSTATS",
#ifdef LUNATIC
"EVENT_ANIMATEALLSPRITES",
#endif

View file

@ -178,11 +178,12 @@ EVENT = {
EVENT_DISPLAYINACTIVEMENUREST = 98,
EVENT_CUTSCENE = 99,
EVENT_DISPLAYCURSOR = 100,
EVENT_DISPLAYLEVELSTATS = 101,
-- EVENT_ANIMATEALLSPRITES = previous+1, -- internal
-- KEEPINSYNC with MAXEVENTS below
}
MAXEVENTS = 101 -- KEEPINSYNC with above EVENT_* list
MAXEVENTS = 102 -- KEEPINSYNC with above EVENT_* list
-- NOTE: negated values are not exported to the ffi.C namespace or CON.
-- See TWEAK_SFLAG below.