Synced with engine repo and fixed compiling

Synced with engine repo and fixed compiling

diff --git a/src/engine/API/cgame_api.h b/src/engine/API/cgame_api.h
index 6e02d71..d1a19c9 100644
--- a/src/engine/API/cgame_api.h
+++ b/src/engine/API/cgame_api.h
@@ -29,13 +29,6 @@
 #ifndef __CG_API_H__
 #define __CG_API_H__
 
-#ifndef __Q_SHARED_H__
-#include <qcommon/q_shared.h>
-#endif
-#ifndef __R_TYPES_H__
-#include <GPURenderer/r_types.h>
-#endif
-
 #define CGAME_IMPORT_API_VERSION 5
 #define CAM_PRIMARY 0
 
@@ -62,7 +55,6 @@ struct cgameImports_t
     void( *AddCommand )( StringEntry cmdName, StringEntry cmdDesc );
     void( *RemoveCommand )( StringEntry cmdName );
     void( *SendClientCommand )( StringEntry s );
-    void( *UpdateScreen )( void );
     void( *GetCurrentSnapshotNumber )( S32* snapshotNumber, S32* serverTime );
     S32( *MemoryRemaining )( void );
     bool( *loadCamera )( S32 camNum, StringEntry name );
@@ -121,6 +113,7 @@ struct cgameImports_t
     idCmdSystem* cmdSystem;
     idSystem* idsystem;
     idClientGUISystem* idGUISystem;
+    idClientScreenSystem* clientScreenSystem;
 };
 
 class idCGame
diff --git a/src/engine/API/clientScreen_api.h b/src/engine/API/clientScreen_api.h
new file mode 100644
index 0000000..b670f0b
--- /dev/null
+++ b/src/engine/API/clientScreen_api.h
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////////////
+// Copyright(C) 2020 Dusan Jocic <dusanjocic@msn.com>
+//
+// This file is part of the OpenWolf GPL Source Code.
+// OpenWolf Source Code is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// OpenWolf Source Code is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with OpenWolf Source Code. If not, see <http://www.gnu.org/licenses/>.
+//
+// -------------------------------------------------------------------------------------
+// File name:   clientScreen_api.h
+// Created:
+// Compilers:   Microsoft Visual C++ 2019, gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0
+// Description:
+// -------------------------------------------------------------------------------------
+////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef __CLIENTSCREEN_API_H__
+#define __CLIENTSCREEN_API_H__
+
+//
+// idClientScreenSystem
+//
+class idClientScreenSystem
+{
+public:
+
+    virtual void UpdateScreen( void ) = 0;
+};
+
+extern idClientScreenSystem* clientScreenSystem;
+
+#endif // !__CLIENTSCREEN_API_H__
+
diff --git a/src/engine/API/gui_api.h b/src/engine/API/gui_api.h
index b616469..9b4f7aa 100644
--- a/src/engine/API/gui_api.h
+++ b/src/engine/API/gui_api.h
@@ -29,16 +29,6 @@
 #ifndef __GUI_PUBLIC_H__
 #define __GUI_PUBLIC_H__
 
-#ifndef __Q_SHARED_H__
-#include <qcommon/q_shared.h>
-#endif
-#ifndef __R_TYPES_H__
-#include <GPURenderer/r_types.h>
-#endif
-#ifndef __CGAME_API__
-#include <API/cgame_api.h>
-#endif
-
 #define UI_API_VERSION 1
 
 typedef enum
@@ -191,7 +181,6 @@ struct guiImports_t
 {
     void( *Print )( StringEntry fmt, ... );
     void( *Error )( S32 level, StringEntry fmt, ... );
-    void( *UpdateScreen )( void );
     void( *CheckAutoUpdate )( void );
     void( *GetAutoUpdate )( void );
     S32( *Parse_LoadSourceHandle )( StringEntry filename );
@@ -227,6 +216,7 @@ struct guiImports_t
     idCGame* idcgame;
     idClientLANSystem* idLANSystem;
     idClientGUISystem* idGUISystem;
+    idClientScreenSystem* clientScreenSystem;
 };
 
 //
diff --git a/src/gameLogics/GUI/gui_api.cpp b/src/gameLogics/GUI/gui_api.cpp
index f56cedf..4e4737b 100644
--- a/src/gameLogics/GUI/gui_api.cpp
+++ b/src/gameLogics/GUI/gui_api.cpp
@@ -41,6 +41,7 @@ idSystem* idsystem;
 idCGame* idCgame;
 idClientLANSystem* idLANSystem;
 idClientGUISystem* idGUISystem;
+idClientScreenSystem* idScreenSystem;
 
 #ifdef __LINUX__
 extern "C" idUserInterfaceManager* dllEntry( guiImports_t* guiimports )
@@ -60,6 +61,7 @@ Q_EXPORT idUserInterfaceManager* dllEntry( guiImports_t* guiimports )
     idCgame = imports->idcgame;
     idLANSystem = imports->idLANSystem;
     idGUISystem = imports->idGUISystem;
+    idScreenSystem = imports->clientScreenSystem;
     
     return uiManager;
 }
@@ -266,7 +268,7 @@ void trap_R_ModelBounds( clipHandle_t model, vec3_t mins, vec3_t maxs )
 
 void trap_UpdateScreen( void )
 {
-    imports->UpdateScreen();
+    imports->clientScreenSystem->UpdateScreen();
 }
 
 S32 trap_CM_LerpTag( orientation_t* tag, clipHandle_t mod, S32 startFrame, S32 endFrame, F32 frac, StringEntry tagName )
diff --git a/src/gameLogics/GUI/gui_precompiled.h b/src/gameLogics/GUI/gui_precompiled.h
index 0e2340a..9270f54 100644
--- a/src/gameLogics/GUI/gui_precompiled.h
+++ b/src/gameLogics/GUI/gui_precompiled.h
@@ -56,6 +56,7 @@
 #include <sgame/tremulous.h>
 #include <framework/SurfaceFlags_Tech3.h>
 #include <API/cm_api.h>
+#include <API/clientScreen_api.h>
 #include <API/clientGUI_api.h>
 #include <API/clientGame_api.h>
 #include <API/clientLAN_api.h>
diff --git a/src/gameLogics/cgame/cgame_api.cpp b/src/gameLogics/cgame/cgame_api.cpp
index 3c07b66..4129ad0 100644
--- a/src/gameLogics/cgame/cgame_api.cpp
+++ b/src/gameLogics/cgame/cgame_api.cpp
@@ -41,6 +41,7 @@ idCmdBufferSystem* cmdBufferSystem;
 idCmdSystem* cmdSystem;
 idSystem* idsystem;
 idClientGUISystem* idGUISystem;
+idClientScreenSystem* idScreenSystem;
 
 #ifdef __LINUX__
 extern "C" idCGame* dllEntry( cgameImports_t* cgimports )
@@ -60,6 +61,7 @@ Q_EXPORT idCGame* dllEntry( cgameImports_t* cgimports )
     cmdSystem = imports->cmdSystem;
     idsystem = imports->idsystem;
     idGUISystem = imports->idGUISystem;
+    idScreenSystem = imports->clientScreenSystem;
     
     return cgame;
 }
@@ -186,7 +188,7 @@ void trap_SendClientCommand( StringEntry s )
 
 void trap_UpdateScreen( void )
 {
-    imports->UpdateScreen();
+    imports->clientScreenSystem->UpdateScreen();
 }
 
 void trap_CM_LoadMap( StringEntry mapname )
diff --git a/src/gameLogics/cgame/cgame_precompiled.h b/src/gameLogics/cgame/cgame_precompiled.h
index b624af3..f380b2e 100644
--- a/src/gameLogics/cgame/cgame_precompiled.h
+++ b/src/gameLogics/cgame/cgame_precompiled.h
@@ -56,6 +56,7 @@
 #include <framework/SurfaceFlags_Tech3.h>
 #include <qcommon/qfiles.h>
 #include <API/cm_api.h>
+#include <API/clientScreen_api.h>
 #include <API/clientAVI_api.h>
 #include <API/clientGame_api.h>
 #include <API/clientGUI_api.h>

GitHub
sha: 5e2f242a

© GrangerHub. All rights reserved. Tremulous © Darklegion Development. Granger by err-overflow and MoP licensed CC-BY-SA-2.5