From 4601b2d2033ebdeee38e921d172f92a7d0616cac Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 15 Mar 2013 16:56:29 +0000 Subject: [PATCH] Add new LOGO_FLAGS bit 2048, preventing cutscene at E4 beginning if set. git-svn-id: https://svn.eduke32.com/eduke32@3566 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 9 --------- polymer/eduke32/source/game.h | 13 ++++++++++++- polymer/eduke32/source/lunatic/lunacon.lua | 2 +- .../eduke32/source/lunatic/test/rotfixed_actor.con | 2 ++ polymer/eduke32/source/menus.c | 2 +- polymer/eduke32/source/premap.c | 3 ++- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 65ad3aba0..84b533422 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2026,15 +2026,6 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t int32_t g_logoFlags = 255; #endif -static int32_t G_GetLogoFlags(void) -{ -#if !defined LUNATIC - return Gv_GetVarByLabel("LOGO_FLAGS",255, -1, -1); -#else - return g_logoFlags; -#endif -} - static void G_DisplayExtraScreens(void) { int32_t flags = G_GetLogoFlags(); diff --git a/polymer/eduke32/source/game.h b/polymer/eduke32/source/game.h index d9b22b3dd..71389c3b5 100644 --- a/polymer/eduke32/source/game.h +++ b/polymer/eduke32/source/game.h @@ -59,7 +59,8 @@ enum LogoFlags_t { LOGO_PLUTOPAKSPRITE = 0x00000080, LOGO_SHAREWARESCREENS = 0x00000100, LOGO_TENSCREEN = 0x00000200, - LOGO_STOPANIMSOUNDS = 0x00000400 + LOGO_STOPANIMSOUNDS = 0x00000400, + LOGO_NOE4CUTSCENE = 0x00000800, }; typedef enum basepal_ { @@ -75,6 +76,16 @@ typedef enum basepal_ { void A_DeleteSprite(int32_t s); +static inline int32_t G_GetLogoFlags(void) +{ +#if !defined LUNATIC + return Gv_GetVarByLabel("LOGO_FLAGS",255, -1, -1); +#else + extern int32_t g_logoFlags; + return g_logoFlags; +#endif +} + #ifdef LUNATIC typedef struct { vec3_t pos; diff --git a/polymer/eduke32/source/lunatic/lunacon.lua b/polymer/eduke32/source/lunatic/lunacon.lua index 1ba739598..f8a428348 100644 --- a/polymer/eduke32/source/lunatic/lunacon.lua +++ b/polymer/eduke32/source/lunatic/lunacon.lua @@ -272,7 +272,7 @@ local function new_initial_gvartab() } -- Reserved bits - gamevar.LOGO_FLAGS.rbits = bit.bnot(2047) + gamevar.LOGO_FLAGS.rbits = bit.bnot(4095) for w=0,MAX_WEAPONS-1 do for i=1,#wmembers do diff --git a/polymer/eduke32/source/lunatic/test/rotfixed_actor.con b/polymer/eduke32/source/lunatic/test/rotfixed_actor.con index 9b77a8359..a0f6d4e4e 100644 --- a/polymer/eduke32/source/lunatic/test/rotfixed_actor.con +++ b/polymer/eduke32/source/lunatic/test/rotfixed_actor.con @@ -4,3 +4,5 @@ useractor 4 58 1 NO NO 0 state killme enda + +gamevar LOGO_FLAGS 2303 0 // 255+2048, test "no ep4 cutscene" bit diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 19a8b07a4..d7d60f4dd 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2558,7 +2558,7 @@ cheat_for_port_credits2: ud.multimode = 1; - if (ud.m_volume_number == 3) + if (ud.m_volume_number == 3 && (G_GetLogoFlags() & LOGO_NOE4CUTSCENE)==0) { flushperms(); setview(0,0,xdim-1,ydim-1); diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index a58ff95de..dc1b4a90c 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1430,7 +1430,8 @@ void G_NewGame(int32_t vn,int32_t ln,int32_t sk) if (ud.m_recstat != 2 && ud.last_level >= 0 && (g_netServer || ud.multimode > 1) && (ud.coop&GAMETYPE_SCORESHEET)) G_BonusScreen(1); - if (ln == 0 && vn == 3 && (!g_netServer && ud.multimode < 2) && ud.lockout == 0) + if (ln == 0 && vn == 3 && (!g_netServer && ud.multimode < 2) && ud.lockout == 0 + && (G_GetLogoFlags() & LOGO_NOE4CUTSCENE)==0) { S_PlayMusic(&EnvMusicFilename[1][0],MAXVOLUMES*MAXLEVELS+1);