From a3c18bed41f98a3b775b9a13807bc09f6c233340 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 4 Nov 2018 01:37:46 +0300 Subject: [PATCH] Patched to compile & launch --- cl_dll/input_xash3d.cpp | 4 ++-- dlls/dll_int.cpp | 2 +- mainui/menu.cpp | 13 +++++++------ mainui/udll_int.cpp | 3 +-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cl_dll/input_xash3d.cpp b/cl_dll/input_xash3d.cpp index b1dc739..ecb642c 100644 --- a/cl_dll/input_xash3d.cpp +++ b/cl_dll/input_xash3d.cpp @@ -157,12 +157,12 @@ void FWGSInput::IN_Move( float frametime, usercmd_t *cmd ) } //if(ac_forwardmove || ac_sidemove) //gEngfuncs.Con_Printf("Move: %f %f %f %f\n", ac_forwardmove, ac_sidemove, rel_pitch, rel_yaw); -#if 0 if( in_mlook.state & 1 ) { + void V_StopPitchDrift( void ); V_StopPitchDrift(); } -#endif + if( CL_IsDead() ) { viewangles = dead_viewangles; // HACKHACK: see below diff --git a/dlls/dll_int.cpp b/dlls/dll_int.cpp index 3b43d60..0cf719e 100644 --- a/dlls/dll_int.cpp +++ b/dlls/dll_int.cpp @@ -198,7 +198,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } #endif // _WIN32 -void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) +extern "C" void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); gpGlobals = pGlobals; diff --git a/mainui/menu.cpp b/mainui/menu.cpp index ae0e878..b9bf834 100644 --- a/mainui/menu.cpp +++ b/mainui/menu.cpp @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "Menu.h" +#include "menu.h" enum m_state_e { @@ -136,15 +136,15 @@ void COM_FileBase ( const char *in, char *out ) int len, start, end; len = strlen( in ); - + // scan backward for '.' end = len - 1; while ( end && in[end] != '.' && in[end] != '/' && in[end] != '\\' ) end--; - + if ( in[end] != '.' ) // no '.', copy to end end = len-1; - else + else end--; // Found ',', copy to left of '.' @@ -155,7 +155,7 @@ void COM_FileBase ( const char *in, char *out ) if ( in[start] != '/' && in[start] != '\\' ) start = 0; - else + else start++; // Length of new sting @@ -1996,7 +1996,8 @@ void M_Quit_Draw (void) for( int i = 0; i < 4; i++ ) { - M_PrintWhite( 16, 68 + i*8, quitMessage[msgNumber*4 + i] ); + // center message + M_PrintWhite( 16 + 8 * 5, 68 + i*8, quitMessage[msgNumber*4 + i] ); } /*M_Print (16, 52, " \n"); M_Print (16, 60, " \n"); diff --git a/mainui/udll_int.cpp b/mainui/udll_int.cpp index ad455d0..ecfc932 100644 --- a/mainui/udll_int.cpp +++ b/mainui/udll_int.cpp @@ -14,8 +14,7 @@ GNU General Public License for more details. */ #include "menu.h" - -#define EXPORT __declspec(dllexport) +#include "exportdef.h" ui_enginefuncs_t engfuncs; ui_globalvars_t *gpGlobals;