From 06029887431a8af24a921210d4e8e44b7849e008 Mon Sep 17 00:00:00 2001 From: hnt_ts Date: Wed, 4 Jun 2008 21:08:47 +0000 Subject: [PATCH] New events: EVENT_DISPLAYBONUSSCREEN EVENT_DISPLAYMENU EVENT_DISPLAYMENUREST EVENT_DISPLAYLOADINGSCREEN git-svn-id: https://svn.eduke32.com/eduke32@762 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/duke3d.h | 6 +++++- polymer/eduke32/source/game.c | 1 + polymer/eduke32/source/gamedef.c | 8 ++++++++ polymer/eduke32/source/menus.c | 2 ++ polymer/eduke32/source/premap.c | 2 ++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 2ff86aabd..81aad7bb9 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -796,7 +796,11 @@ enum events { EVENT_FAKEDOMOVETHINGS, EVENT_DISPLAYROOMS, EVENT_KILLIT, - EVENT_LOADACTOR + EVENT_LOADACTOR, + EVENT_DISPLAYBONUSSCREEN, + EVENT_DISPLAYMENU, + EVENT_DISPLAYMENUREST, + EVENT_DISPLAYLOADINGSCREEN }; // store global game definitions diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 8a4ff8c92..d0b2a8d06 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -12709,6 +12709,7 @@ FRAGBONUS: } } else break; + OnEvent(EVENT_DISPLAYBONUSSCREEN, g_player[screenpeek].ps->i, screenpeek, -1); nextpage(); } } diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 8bbd4d3be..7a7cf361b 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1162,6 +1162,10 @@ static int CheckEventSync(int iEventID) case EVENT_CHEATGETFIRSTAID: case EVENT_DISPLAYCROSSHAIR: case EVENT_DISPLAYREST: + case EVENT_DISPLAYBONUSSCREEN: + case EVENT_DISPLAYMENU: + case EVENT_DISPLAYMENUREST: + case EVENT_DISPLAYLOADINGSCREEN: case EVENT_DISPLAYROOMS: case EVENT_DISPLAYSBAR: case EVENT_DISPLAYWEAPON: @@ -4886,6 +4890,10 @@ static void AddDefaultDefinitions(void) AddDefinition("EVENT_CROUCH",EVENT_CROUCH,LABEL_DEFINE); AddDefinition("EVENT_DISPLAYCROSSHAIR",EVENT_DISPLAYCROSSHAIR,LABEL_DEFINE); AddDefinition("EVENT_DISPLAYREST",EVENT_DISPLAYREST,LABEL_DEFINE); + AddDefinition("EVENT_DISPLAYBONUSSCREEN",EVENT_DISPLAYBONUSSCREEN,LABEL_DEFINE); + AddDefinition("EVENT_DISPLAYMENU",EVENT_DISPLAYMENU,LABEL_DEFINE); + AddDefinition("EVENT_DISPLAYMENUREST",EVENT_DISPLAYMENUREST,LABEL_DEFINE); + AddDefinition("EVENT_DISPLAYLOADINGSCREEN",EVENT_DISPLAYLOADINGSCREEN,LABEL_DEFINE); AddDefinition("EVENT_DISPLAYROOMS",EVENT_DISPLAYROOMS,LABEL_DEFINE); AddDefinition("EVENT_DISPLAYSBAR",EVENT_DISPLAYSBAR,LABEL_DEFINE); AddDefinition("EVENT_DISPLAYWEAPON",EVENT_DISPLAYWEAPON,LABEL_DEFINE); diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index f680f682a..d9768f342 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -612,6 +612,7 @@ void menus(void) walock[TILE_LOADSHOT] = 1; return; } + OnEvent(EVENT_DISPLAYMENU, g_player[screenpeek].ps->i, screenpeek, -1); g_player[myconnectindex].ps->gm &= (0xff-MODE_TYPE); g_player[myconnectindex].ps->fta = 0; @@ -5040,6 +5041,7 @@ VOLUME_ALL_40x: break; } + OnEvent(EVENT_DISPLAYMENUREST, g_player[screenpeek].ps->i, screenpeek, -1); if ((g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU) { diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 2be5e3fda..5866db204 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -361,6 +361,7 @@ static void dofrontscreens(char *statustext) if (statustext) gametext(160,180,statustext,0,2+8+16); + OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1); nextpage(); if (!statustext) @@ -391,6 +392,7 @@ static void dofrontscreens(char *statustext) } menutext(160,105,0,0,"LOADING..."); if (statustext) gametext(160,180,statustext,0,2+8+16); + OnEvent(EVENT_DISPLAYLOADINGSCREEN, g_player[screenpeek].ps->i, screenpeek, -1); nextpage(); } }