From 9ab3300b761faf706c0b298772d10b06cc85cc69 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 21 Apr 2018 11:15:55 +0300 Subject: [PATCH] Rename allow_console to developer in menu_int.h. Define NEW_ENGINE_INTERFACE. --- engine/client/cl_gameui.c | 4 ++-- engine/menu_int.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_gameui.c b/engine/client/cl_gameui.c index beeb9373..6d42fd7a 100644 --- a/engine/client/cl_gameui.c +++ b/engine/client/cl_gameui.c @@ -36,7 +36,7 @@ void UI_UpdateMenu( float realtime ) gameui.globals->frametime = host.realframetime; gameui.globals->demoplayback = cls.demoplayback; gameui.globals->demorecording = cls.demorecording; - gameui.globals->allow_console = host.allow_console; + gameui.globals->developer = host.allow_console; gameui.dllFuncs.pfnRedraw( realtime ); UI_UpdateUserinfo(); @@ -1128,7 +1128,7 @@ qboolean UI_LoadProgs( void ) UI_ConvertGameInfo( &gameui.gameInfo, SI.GameInfo ); // current gameinfo // setup globals - gameui.globals->allow_console = host.allow_console; + gameui.globals->developer = host.allow_console; // initialize game gameui.dllFuncs.pfnInit(); diff --git a/engine/menu_int.h b/engine/menu_int.h index aa0b239f..e48394ea 100644 --- a/engine/menu_int.h +++ b/engine/menu_int.h @@ -20,6 +20,10 @@ GNU General Public License for more details. #include "gameinfo.h" #include "wrect.h" +// a macro for mainui_cpp, indicating that mainui should be compiled for +// Xash3D 1.0 interface +#define NEW_ENGINE_INTERFACE + typedef int HIMAGE; // handle to a graphic // flags for PIC_Load @@ -36,7 +40,7 @@ typedef struct ui_globalvars_s int scrHeight; int maxClients; - int allow_console; + int developer; // boolean, changed from allow_console to make mainui_cpp compile for both engines int demoplayback; int demorecording; char demoname[64]; // name of currently playing demo