diff --git a/cl_dll/cl_dll.h b/cl_dll/cl_dll.h index 6e1c4e69..6ba3db67 100644 --- a/cl_dll/cl_dll.h +++ b/cl_dll/cl_dll.h @@ -38,7 +38,7 @@ typedef int ( *pfnUserMsgHook )( const char *pszName, int iSize, void *pbuf ); #include "../engine/cdll_int.h" #include "../dlls/cdll_dll.h" -#ifndef __MSC_VER +#if !defined(_WIN32) #define _cdecl #endif #include "exportdef.h" diff --git a/cl_dll/ev_hldm.cpp b/cl_dll/ev_hldm.cpp index 08127aa1..f8fefad5 100644 --- a/cl_dll/ev_hldm.cpp +++ b/cl_dll/ev_hldm.cpp @@ -1410,7 +1410,9 @@ enum EGON_FIREMODE #define EGON_SOUND_RUN "weapons/egon_run3.wav" #define EGON_SOUND_STARTUP "weapons/egon_windup2.wav" +#if !defined(ARRAYSIZE) #define ARRAYSIZE(p) ( sizeof(p) /sizeof(p[0]) ) +#endif BEAM *pBeam; BEAM *pBeam2; diff --git a/dlls/h_battery.cpp b/dlls/h_battery.cpp index e4c00467..dabbc06c 100644 --- a/dlls/h_battery.cpp +++ b/dlls/h_battery.cpp @@ -118,7 +118,7 @@ void CRecharge::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE use } // if the player doesn't have the suit, or there is no juice left, make the deny noise - if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( chargerfix.value ) && ( pActivator->pev->armorvalue == MAX_NORMAL_BATTERY ) ) + if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( ( chargerfix.value ) && ( pActivator->pev->armorvalue == MAX_NORMAL_BATTERY ) ) ) { if( m_flSoundTime <= gpGlobals->time ) { diff --git a/dlls/healthkit.cpp b/dlls/healthkit.cpp index 0f8c521e..e1744479 100644 --- a/dlls/healthkit.cpp +++ b/dlls/healthkit.cpp @@ -188,7 +188,7 @@ void CWallHealth::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE u } // if the player doesn't have the suit, or there is no juice left, make the deny noise - if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( chargerfix.value ) && ( pActivator->pev->health >= pActivator->pev->max_health ) ) + if( ( m_iJuice <= 0 ) || ( !( pActivator->pev->weapons & ( 1 << WEAPON_SUIT ) ) ) || ( ( chargerfix.value ) && ( pActivator->pev->health >= pActivator->pev->max_health ) ) ) { if( m_flSoundTime <= gpGlobals->time ) { diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index e81f3252..6babe01d 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -45,9 +45,7 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt ) #if !defined _WIN32 #include #include -#define CreateDirectory(p, n) mkdir(p, 0777) -#else -#define CreateDirectory(p, n) CreateDirectoryA(p, n) +#define CreateDirectoryA(p, n) mkdir(p, 0777) #endif //========================================================= @@ -1702,9 +1700,9 @@ void CTestHull::BuildNodeGraph( void ) // make sure directories have been made GET_GAME_DIR( szNrpFilename ); strcat( szNrpFilename, "/maps" ); - CreateDirectory( szNrpFilename, NULL ); + CreateDirectoryA( szNrpFilename, NULL ); strcat( szNrpFilename, "/graphs" ); - CreateDirectory( szNrpFilename, NULL ); + CreateDirectoryA( szNrpFilename, NULL ); strcat( szNrpFilename, "/" ); strcat( szNrpFilename, STRING( gpGlobals->mapname ) ); @@ -2376,9 +2374,9 @@ int CGraph::FLoadGraph( const char *szMapName ) char szDirName[MAX_PATH]; GET_GAME_DIR( szDirName ); strcat( szDirName, "/maps" ); - CreateDirectory( szDirName, NULL ); + CreateDirectoryA( szDirName, NULL ); strcat( szDirName, "/graphs" ); - CreateDirectory( szDirName, NULL ); + CreateDirectoryA( szDirName, NULL ); strcpy( szFilename, "maps/graphs/" ); strcat( szFilename, szMapName ); @@ -2585,9 +2583,9 @@ int CGraph::FSaveGraph( const char *szMapName ) // make sure directories have been made GET_GAME_DIR( szFilename ); strcat( szFilename, "/maps" ); - CreateDirectory( szFilename, NULL ); + CreateDirectoryA( szFilename, NULL ); strcat( szFilename, "/graphs" ); - CreateDirectory( szFilename, NULL ); + CreateDirectoryA( szFilename, NULL ); strcat( szFilename, "/" ); strcat( szFilename, szMapName ); diff --git a/dlls/util.cpp b/dlls/util.cpp index c7feab31..a5160876 100644 --- a/dlls/util.cpp +++ b/dlls/util.cpp @@ -1733,8 +1733,8 @@ void CSaveRestoreBuffer::BufferRewind( int size ) extern "C" { unsigned _rotr( unsigned val, int shift ) { - register unsigned lobit; /* non-zero means lo bit set */ - register unsigned num = val; /* number to rotate */ + unsigned lobit; /* non-zero means lo bit set */ + unsigned num = val; /* number to rotate */ shift &= 0x1f; /* modulo 32 -- this will also make negative shifts work */