#ifdef->#if.

This commit is contained in:
Andrey Akhmichin 2021-06-20 03:53:07 +05:00
parent fd6f48175f
commit a541a9699c
133 changed files with 247 additions and 319 deletions

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef __AMMO_H__
#if !defined(__AMMO_H__)
#define __AMMO_H__
#define MAX_WEAPON_NAME 128

View File

@ -16,7 +16,7 @@
// ammohistory.h
//
#pragma once
#ifndef AMMOHISTORY_H
#if !defined(AMMOHISTORY_H)
#define AMMOHISTORY_H
// this is the max number of items in each bucket

View File

@ -8,7 +8,7 @@
// Camera.h -- defines and such for a 3rd person camera
// NOTE: must include quakedef.h first
#pragma once
#ifndef _CAMERA_H_
#if !defined(_CAMERA_H_)
#define _CAMERA_H_
// pitch, yaw, dist

View File

@ -23,8 +23,8 @@
#include "netadr.h"
#include "parsemsg.h"
#if defined(GOLDSOURCE_SUPPORT) && (defined(_WIN32) || defined(__linux__) || defined(__APPLE__)) && (defined(__i386) || defined(_M_IX86))
#define USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
#define USE_VGUI_FOR_GOLDSOURCE_SUPPORT 1
#include "VGUI_Panel.h"
#include "VGUI_App.h"
#endif
@ -183,7 +183,7 @@ int *HUD_GetRect( void )
return extent;
}
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
class TeamFortressViewport : public vgui::Panel
{
public:
@ -238,7 +238,7 @@ so the HUD can reinitialize itself.
int DLLEXPORT HUD_VidInit( void )
{
gHUD.VidInit();
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
vgui::Panel* root=(vgui::Panel*)gEngfuncs.VGui_GetPanel();
if (root) {
gEngfuncs.Con_Printf( "Root VGUI panel exists\n" );
@ -337,7 +337,7 @@ Called by engine every frame that client .dll is loaded
void DLLEXPORT HUD_Frame( double time )
{
#ifdef USE_VGUI_FOR_GOLDSOURCE_SUPPORT
#if USE_VGUI_FOR_GOLDSOURCE_SUPPORT
if (!gViewPort)
gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect());
#else

View File

@ -26,7 +26,7 @@
// - Handling the custum HUD-update packets
//
#pragma once
#ifndef CL_DLL_H
#if !defined(CL_DLL_H)
#define CL_DLL_H
typedef unsigned char byte;
typedef unsigned short word;
@ -39,7 +39,7 @@ typedef float vec_t;
#include "../engine/cdll_int.h"
#include "../dlls/cdll_dll.h"
#if !defined(_WIN32)
#if !_WIN32
#define _cdecl
#endif
#include "exportdef.h"
@ -49,8 +49,8 @@ typedef float vec_t;
#else
#include <math.h>
#endif
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define XASH_64BIT
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
#define XASH_64BIT 1
#endif
extern cl_enginefunc_t gEngfuncs;

View File

@ -15,12 +15,12 @@
//
// cl_util.h
//
#ifndef CL_UTIL_H
#if !defined(CL_UTIL_H)
#define CL_UTIL_H
#include "exportdef.h"
#include "cvardef.h"
#ifndef TRUE
#if !defined(TRUE)
#define TRUE 1
#define FALSE 0
#endif

View File

@ -224,8 +224,8 @@ void DLLEXPORT HUD_TxferPredictionData( struct entity_state_s *ps, const struct
}
/*
//#define TEST_IT
#if defined( TEST_IT )
//#define TEST_IT 1
#if TEST_IT
cl_entity_t mymodel[9];
@ -267,8 +267,8 @@ void MoveModel( void )
}
#endif
//#define TRACE_TEST
#if defined( TRACE_TEST )
//#define TRACE_TEST 1
#if TRACE_TEST
extern int hitent;
@ -424,7 +424,7 @@ void TempEnts( void )
}
*/
#if defined( BEAM_TEST )
#if BEAM_TEST
// Note can't index beam[0] in Beam callback, so don't use that index
// Room for 1 beam ( 0 can't be used )
static cl_entity_t beams[2];
@ -508,10 +508,10 @@ void DLLEXPORT HUD_CreateEntities( void )
// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )
// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list
/*
#if defined( TEST_IT )
#if TEST_IT
MoveModel();
#endif
#if defined( TRACE_TEST )
#if TRACE_TEST
TraceModel();
#endif
*/
@ -521,7 +521,7 @@ void DLLEXPORT HUD_CreateEntities( void )
/*
TempEnts();
*/
#if defined( BEAM_TEST )
#if BEAM_TEST
Beams();
#endif
// Add in any game specific objects
@ -940,7 +940,7 @@ Indices must start at 1, not zero.
*/
cl_entity_t DLLEXPORT *HUD_GetUserEntity( int index )
{
#if defined( BEAM_TEST )
#if BEAM_TEST
// None by default, you would return a valic pointer if you create a client side
// beam and attach it to a client side entity.
if( index > 0 && index <= 1 )

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef HEALTH_H
#if !defined(HEALTH_H)
#define HEALTH_H
#define DMG_IMAGE_LIFE 2 // seconds that image is up

View File

@ -1039,7 +1039,7 @@ void _DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s
{
g_runfuncs = runfuncs;
#if defined( CLIENT_WEAPONS )
#if CLIENT_WEAPONS
if( cl_lw && cl_lw->value )
{
HUD_WeaponsPostThink( from, to, cmd, time, random_seed );

View File

@ -20,7 +20,7 @@
// CHud handles the message, calculation, and drawing the HUD
//
#pragma once
#ifndef HUD_H
#if !defined(HUD_H)
#define HUD_H
#define RGB_YELLOWISH 0x00FFA000 //255,160,0
#define RGB_REDISH 0x00FF1010 //255,160,0

View File

@ -6,7 +6,7 @@
//=============================================================================
#pragma once
#ifndef HUD_SPECTATOR_H
#if !defined(HUD_SPECTATOR_H)
#define HUD_SPECTATOR_H
#include "cl_entity.h"

View File

@ -459,7 +459,7 @@ void CAM_OutUp( void )
void CAM_ToThirdPerson( void )
{
vec3_t viewangles;
#if !defined( _DEBUG )
#if !_DEBUG
if( gEngfuncs.GetMaxClients() > 1 )
{
// no thirdperson in multiplayer.

View File

@ -10,7 +10,7 @@
#include "input_mouse.h"
#ifdef SUPPORT_GOLDSOURCE_INPUT
#if SUPPORT_GOLDSOURCE_INPUT
#include "hud.h"
#include "cl_util.h"
@ -24,10 +24,10 @@
#include "view.h"
#if !_WIN32
#define USE_SDL2
#define USE_SDL2 1
#endif
#ifdef USE_SDL2
#if USE_SDL2
#define ARRAYSIZE(p) ( sizeof(p) /sizeof(p[0]) )
#include <dlfcn.h>
#include <SDL2/SDL_mouse.h>
@ -218,7 +218,7 @@ enum _ControlList
AxisTurn
};
#if !defined(USE_SDL2) && defined(_WIN32)
#if !USE_SDL2 && _WIN32
DWORD dwAxisFlags[JOY_MAX_AXES] =
{
JOY_RETURNX,
@ -232,9 +232,9 @@ DWORD dwAxisFlags[JOY_MAX_AXES] =
DWORD dwAxisMap[ JOY_MAX_AXES ];
DWORD dwControlMap[ JOY_MAX_AXES ];
#if defined(USE_SDL2)
#if USE_SDL2
int pdwRawValue[ JOY_MAX_AXES ];
#elif defined(_WIN32)
#elif _WIN32
PDWORD pdwRawValue[ JOY_MAX_AXES ];
#endif
DWORD joy_oldbuttonstate, joy_oldpovstate;
@ -242,9 +242,9 @@ DWORD joy_oldbuttonstate, joy_oldpovstate;
int joy_id;
DWORD joy_numbuttons;
#ifdef USE_SDL2
#if USE_SDL2
SDL_GameController *s_pJoystick = NULL;
#elif defined(_WIN32)
#elif _WIN32
DWORD joy_flags;
static JOYINFOEX ji;
#endif
@ -566,7 +566,7 @@ void GoldSourceInput::IN_Shutdown (void)
}
#endif
#ifdef USE_SDL2
#if USE_SDL2
for (int j=0; j<ARRAYSIZE(sdlFunctions); ++j) {
*(sdlFunctions[j].ppfnFunc) = NULL;
}
@ -735,7 +735,7 @@ void GoldSourceInput::IN_GetMouseDelta( int *pOutX, int *pOutY)
else
#endif
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
current_pos.x = deltaX;
current_pos.y = deltaY;
@ -904,8 +904,8 @@ void GoldSourceInput::IN_MouseMove ( float frametime, usercmd_t *cmd)
dead_viewangles = viewangles; // keep them actual
/*
//#define TRACE_TEST
#if defined( TRACE_TEST )
//#define TRACE_TEST 1
#if TRACE_TEST
{
int mx, my;
void V_Move( int mx, int my );
@ -942,7 +942,7 @@ void GoldSourceInput::IN_Accumulate (void)
else
#endif
{
#ifdef USE_SDL2
#if USE_SDL2
int deltaX, deltaY;
safe_pfnSDL_GetRelativeMouseState( &deltaX, &deltaY );
mx_accum += deltaX;
@ -997,7 +997,7 @@ void IN_StartupJoystick (void)
// assume no joystick
joy_avail = 0;
#ifdef USE_SDL2
#if USE_SDL2
int nJoysticks = safe_pfnSDL_NumJoysticks();
if ( nJoysticks > 0 )
{
@ -1029,7 +1029,7 @@ void IN_StartupJoystick (void)
{
gEngfuncs.Con_DPrintf ("joystick not found -- driver not present\n\n");
}
#elif defined(_WIN32)
#elif _WIN32
int numdevs;
JOYCAPS jc;
MMRESULT mmr;
@ -1084,7 +1084,7 @@ void IN_StartupJoystick (void)
#endif
}
#ifdef USE_SDL2
#if USE_SDL2
int RawValuePointer (int axis)
{
switch (axis)
@ -1101,7 +1101,7 @@ int RawValuePointer (int axis)
}
}
#elif defined(_WIN32)
#elif _WIN32
PDWORD RawValuePointer (int axis)
{
switch (axis)
@ -1184,7 +1184,7 @@ void Joy_AdvancedUpdate_f (void)
dwControlMap[JOY_AXIS_V] = dwTemp & JOY_RELATIVE_AXIS;
}
#if !defined(USE_SDL2) && defined(_WIN32)
#if !USE_SDL2 && _WIN32
// compute the axes to collect from DirectInput
joy_flags = JOY_RETURNCENTERED | JOY_RETURNBUTTONS | JOY_RETURNPOV;
for (i = 0; i < JOY_MAX_AXES; i++)
@ -1216,7 +1216,7 @@ void GoldSourceInput::IN_Commands (void)
// loop through the joystick buttons
// key a joystick event or auxillary event for higher number buttons for each state change
#ifdef USE_SDL2
#if USE_SDL2
buttonstate = 0;
for ( i = 0; i < SDL_CONTROLLER_BUTTON_MAX; i++ )
{
@ -1230,7 +1230,7 @@ void GoldSourceInput::IN_Commands (void)
{
pdwRawValue[i] = RawValuePointer(i);
}
#elif defined(_WIN32)
#elif _WIN32
buttonstate = ji.dwButtons;
#endif
@ -1256,7 +1256,7 @@ void GoldSourceInput::IN_Commands (void)
// this avoids any potential problems related to moving from one
// direction to another without going through the center position
povstate = 0;
#if !defined(USE_SDL2) && defined(_WIN32)
#if !USE_SDL2 && _WIN32
if(ji.dwPOV != JOY_POVCENTERED)
{
if (ji.dwPOV == JOY_POVFORWARD)
@ -1294,10 +1294,10 @@ IN_ReadJoystick
*/
int IN_ReadJoystick (void)
{
#ifdef USE_SDL2
#if USE_SDL2
safe_pfnSDL_JoystickUpdate();
return 1;
#elif defined(_WIN32)
#elif _WIN32
memset (&ji, 0, sizeof(ji));
ji.dwSize = sizeof(ji);
ji.dwFlags = joy_flags;
@ -1374,9 +1374,9 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
for (i = 0; i < JOY_MAX_AXES; i++)
{
// get the floating point zero-centered, potentially-inverted data for the current axis
#ifdef USE_SDL2
#if USE_SDL2
fAxisValue = (float)pdwRawValue[i];
#elif defined(_WIN32)
#elif _WIN32
fAxisValue = (float) *pdwRawValue[i];
fAxisValue -= 32768.0;
#endif
@ -1600,7 +1600,7 @@ void GoldSourceInput::IN_Init (void)
}
#endif
#ifdef USE_SDL2
#if USE_SDL2
#if __APPLE__
#define SDL2_FULL_LIBNAME "libsdl2-2.0.0.dylib"
#else

View File

@ -10,7 +10,7 @@ cvar_t *in_joystick;
FWGSInput fwgsInput;
#ifdef SUPPORT_GOLDSOURCE_INPUT
#if SUPPORT_GOLDSOURCE_INPUT
GoldSourceInput goldSourceInput;
AbstractInput* currentInput = &goldSourceInput;
#else
@ -68,7 +68,7 @@ void IN_Shutdown( void )
void IN_Init( void )
{
#ifdef SUPPORT_GOLDSOURCE_INPUT
#if SUPPORT_GOLDSOURCE_INPUT
if (IsXashFWGS()) {
gEngfuncs.Con_Printf( "FWGS Xash3D input is in use\n" );
currentInput = &fwgsInput;

View File

@ -1,5 +1,5 @@
#pragma once
#ifndef INPUT_MOUSE_H
#if !defined(INPUT_MOUSE_H)
#define INPUT_MOUSE_H
#include "cl_dll.h"
#include "usercmd.h"
@ -45,8 +45,8 @@ protected:
};
// No need for goldsource input support on the platforms that are not supported by GoldSource.
#if defined(GOLDSOURCE_SUPPORT) && (defined(_WIN32) || defined(__linux__) || defined(__APPLE__)) && (defined(__i386) || defined(_M_IX86))
#define SUPPORT_GOLDSOURCE_INPUT
#if GOLDSOURCE_SUPPORT && (_WIN32 || __linux__ || __APPLE__) && (__i386 || _M_IX86)
#define SUPPORT_GOLDSOURCE_INPUT 1
class GoldSourceInput : public AbstractInput
{
public:

View File

@ -4,9 +4,8 @@
//
// $NoKeywords: $
//=============================================================================
#pragma once
#ifndef OVERVIEW_H
#if !defined(OVERVIEW_H)
#define OVERVIEW_H
//-----------------------------------------------------------------------------

View File

@ -16,7 +16,7 @@
// parsemsg.h
//
#pragma once
#ifndef PARSEMSG_H
#if !defined(PARSEMSG_H)
#define PARSEMSG_H
#define ASSERT( x )

View File

@ -4,20 +4,19 @@
//
// $NoKeywords: $
//=============================================================================
#pragma once
#if !defined( STUDIO_UTIL_H )
#if !defined(STUDIO_UTIL_H)
#define STUDIO_UTIL_H
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
#ifndef PITCH
#if !defined(PITCH)
// MOVEMENT INFO
// up / down
#define PITCH 0

View File

@ -7,8 +7,7 @@
* All Rights Reserved.
*
****/
#ifndef __TF_DEFS_H
#if !defined(__TF_DEFS_H)
#define __TF_DEFS_H
//===========================================================================
@ -1155,7 +1154,7 @@ float already_chosen_map;
#define TS_PRINT_LONG 2
#define TS_PRINT_LONG_TO_ALL 3
#ifndef TF_DEFS_ONLY
#if !defined(TF_DEFS_ONLY)
typedef struct
{

View File

@ -23,8 +23,8 @@ extern "C"
void DLLEXPORT HUD_DrawTransparentTriangles( void );
}
//#define TEST_IT
#if defined( TEST_IT )
//#define TEST_IT 1
#if TEST_IT
/*
=================
@ -98,7 +98,7 @@ Non-transparent triangles-- add them here
void DLLEXPORT HUD_DrawNormalTriangles( void )
{
gHUD.m_Spectator.DrawOverview();
#if defined( TEST_IT )
#if TEST_IT
// Draw_Triangles();
#endif
}
@ -112,7 +112,7 @@ Render any triangles with transparent rendermode needs here
*/
void DLLEXPORT HUD_DrawTransparentTriangles( void )
{
#if defined( TEST_IT )
#if TEST_IT
// Draw_Triangles();
#endif
}

View File

@ -26,17 +26,17 @@
#include "cl_util.h"
#include <string.h>
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
extern vec3_t vec3_origin;
// if C++ mangling differs from C symbol name
#if defined _MSC_VER || defined __WATCOMC__
#if _MSC_VER || __WATCOMC__
vec3_t vec3_origin;
#endif

View File

@ -16,7 +16,7 @@
// A subset of the extdll.h in the project HL Entity DLL
//
#pragma once
#ifndef UTIL_VECTOR_H
#if !defined(UTIL_VECTOR_H)
#define UTIL_VECTOR_H
// Misc C-runtime library headers

View File

@ -36,11 +36,11 @@ extern "C"
int iIsSpectator;
}
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
@ -1544,8 +1544,8 @@ void DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams )
}
/*
// Example of how to overlay the whole screen with red at 50 % alpha
#define SF_TEST
#if defined SF_TEST
#define SF_TEST 1
#if SF_TEST
{
screenfade_t sf;
gEngfuncs.pfnGetScreenFade( &sf );
@ -1611,8 +1611,8 @@ void V_Init( void )
cl_chasedist = gEngfuncs.pfnRegisterVariable( "cl_chasedist","112", 0 );
}
//#define TRACE_TEST
#if defined( TRACE_TEST )
//#define TRACE_TEST 1
#if TRACE_TEST
extern float in_fov;
/*

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef BEAMDEF_H
#if !defined(BEAMDEF_H)
#define BEAMDEF_H
#define FBEAM_STARTENTITY 0x00000001

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CL_ENTITY_H
#if !defined(CL_ENTITY_H)
#define CL_ENTITY_H
typedef struct efrag_s

View File

@ -4,7 +4,6 @@
//
// $NoKeywords: $
//=============================================================================
// com_model.h
#pragma once
#if !defined( COM_MODEL_H )
@ -45,7 +44,7 @@ typedef enum
} modtype_t;
// must match definition in modelgen.h
#ifndef SYNCTYPE_T
#if !defined(SYNCTYPE_T)
#define SYNCTYPE_T
typedef enum

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CON_NPRINT_H
#if !defined(CON_NPRINT_H)
#define CON_NPRINT_H
typedef struct con_nprint_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CONST_H
#if !defined(CONST_H)
#define CONST_H
//
// Constants shared by the engine and dlls
@ -742,7 +742,7 @@ typedef unsigned short word;
#undef true
#undef false
#ifndef __cplusplus
#if !__cplusplus
typedef enum { false, true } qboolean;
#else
typedef int qboolean;

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CVARDEF_H
#if !defined(CVARDEF_H)
#define CVARDEF_H
#define FCVAR_ARCHIVE (1<<0) // set to cause it to be saved to vars.rc

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DEMO_API_H
#if !defined(DEMO_API_H)
#define DEMO_API_H
typedef struct demo_api_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DLIGHT_H
#if !defined(DLIGHT_H)
#define DLIGHT_H
typedef struct dlight_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ENTITY_STATE_H
#if !defined(ENTITY_STATE_H)
#define ENTITY_STATE_H
// For entityType below

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ENTITY_TYPES_H
#if !defined(ENTITY_TYPES_H)
#define ENTITY_TYPES_H
#define ET_NORMAL 0

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EVENT_API_H
#if !defined(EVENT_API_H)
#define EVENT_API_H
#define EVENT_API_VERSION 1

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EVENT_ARGS_H
#if !defined(EVENT_ARGS_H)
#define EVENT_ARGS_H
// Event was invoked with stated origin

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EVENT_FLAGS_H
#if !defined(EVENT_FLAGS_H)
#define EVENT_FLAGS_H
// Skip local host for event send.

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef HLTV_H
#if !defined(HLTV_H)
#define HLTV_H
#define TYPE_CLIENT 0 // client is a normal HL client (default)

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef IVOICETWEAK_H
#if !defined(IVOICETWEAK_H)
#define IVOICETWEAK_H
// These provide access to the voice controls.

View File

@ -14,11 +14,11 @@
****/
// mathlib.h
#pragma once
#ifndef MATHLIB_H
#if !defined(MATHLIB_H)
#define MATHLIB_H
#ifndef __cplusplus
#if !__cplusplus
#include <math.h>
#ifdef HAVE_TGMATH_H
#if HAVE_TGMATH_H
#include <tgmath.h>
#endif // HAVE_TGMATH_H
#else // __cplusplus
@ -31,17 +31,17 @@
typedef float vec_t;
#if !defined DID_VEC3_T_DEFINE
#if !defined(DID_VEC3_T_DEFINE)
#define DID_VEC3_T_DEFINE
typedef vec_t vec3_t[3];
#endif
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
@ -52,7 +52,7 @@ extern int nanmask;
#define IS_NAN(x) (((*(int *)&x)&nanmask)==nanmask)
#ifndef VECTOR_H
#if !defined(VECTOR_H)
#define DotProduct(x,y) ((x)[0]*(y)[0]+(x)[1]*(y)[1]+(x)[2]*(y)[2])
#endif

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef NET_API_H
#if !defined(NET_API_H)
#define NET_API_H
#include "netadr.h"

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef NETADR_H
#if !defined(NETADR_H)
#define NETADR_H
typedef enum

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef PARTICLEDEF_H
#if !defined(PARTICLEDEF_H)
#define PARTICLEDEF_H
typedef enum

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef PM_TRACE_H
#if !defined(PM_TRACE_H)
#define PM_TRACE_H
typedef struct

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef QFONT_H
#if !defined(QFONT_H)
#define QFONT_H
// Font stuff

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef R_EFX_H
#if !defined(R_EFX_H)
#define R_EFX_H
// particle_t

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef R_STUDIOINT_H
#if !defined(R_STUDIOINT_H)
#define R_STUDIOINT_H
#define STUDIO_INTERFACE_VERSION 1

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef REF_PARAMS_H
#if !defined(REF_PARAMS_H)
#define REF_PARAMS_H
typedef struct ref_params_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef SCREENFADE_H
#if !defined(SCREENFADE_H)
#define SCREENFADE_H
typedef struct screenfade_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef STUDIO_EVENT_H
#if !defined(STUDIO_EVENT_H)
#define STUDIO_EVENT_H
typedef struct mstudioevent_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef TRIANGLEAPI_H
#if !defined(TRIANGLEAPI_H)
#define TRIANGLEAPI_H
typedef enum

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef USERCMD_H
#if !defined(USERCMD_H)
#define USERCMD_H
typedef struct usercmd_s

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef WADFILE_H
#if !defined(WADFILE_H)
#define WADFILE_H
/*

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef WEAPONINFO_H
#if !defined(WEAPONINFO_H)
#define WEAPONINFO_H
// Info about weapons player might have in his/her possession

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ACTIVITY_H
#if !defined(ACTIVITY_H)
#define ACTIVITY_H
typedef enum {

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ACTIVITYMAP_H
#if !defined(ACTIVITYMAP_H)
#define ACTIVITYMAP_H
#define _A( a ) { a, #a }

View File

@ -36,21 +36,21 @@ typedef unsigned char byte;
#include "studio.h"
#ifndef ACTIVITY_H
#if !defined(ACTIVITY_H)
#include "activity.h"
#endif
#include "activitymap.h"
#ifndef ANIMATION_H
#if !defined(ANIMATION_H)
#include "animation.h"
#endif
#ifndef SCRIPTEVENT_H
#if !defined(SCRIPTEVENT_H)
#include "scriptevent.h"
#endif
#ifndef ENGINECALLBACK_H
#if !defined(ENGINECALLBACK_H)
#include "enginecallback.h"
#endif

View File

@ -13,12 +13,12 @@
*
****/
#pragma once
#ifndef ANIMATION_H
#if !defined(ANIMATION_H)
#define ANIMATION_H
#define ACTIVITY_NOT_AVAILABLE -1
#ifndef MONSTEREVENT_H
#if !defined(MONSTEREVENT_H)
#include "monsterevent.h"
#endif

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef BASEMONSTER_H
#if !defined(BASEMONSTER_H)
#define BASEMONSTER_H
//

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CBASE_H
#if !defined(CBASE_H)
#define CBASE_H
/*
@ -48,7 +48,7 @@ CBaseEntity
#include "saverestore.h"
#include "schedule.h"
#ifndef MONSTEREVENT_H
#if !defined(MONSTEREVENT_H)
#include "monsterevent.h"
#endif

View File

@ -17,7 +17,7 @@
// this file is included by both the game-dll and the client-dll,
#pragma once
#ifndef CDLL_DLL_H
#if !defined(CDLL_DLL_H)
#define CDLL_DLL_H
#define MAX_WEAPONS 32 // ???

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef CLIENT_H
#if !defined(CLIENT_H)
#define CLIENT_H
extern void respawn( entvars_t *pev, BOOL fCopyCorpse );

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DECALS_H
#if !defined(DECALS_H)
#define DECALS_H
//

View File

@ -12,7 +12,7 @@
* use or distribution of this code by or to any unlicensed person is illegal.
*
****/
#ifndef DEFAULTAI_H
#if !defined(DEFAULTAI_H)
#define DEFAULTAI_H
//=========================================================

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef DOORS_H
#if !defined(DOORS_H)
#define DOORS_H
// doors

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EFFECTS_H
#if !defined(EFFECTS_H)
#define EFFECTS_H
#define SF_BEAM_STARTON 0x0001

View File

@ -12,10 +12,9 @@
* without written permission from Valve LLC.
*
****/
#ifndef ENGINECALLBACK_H
#define ENGINECALLBACK_H
#pragma once
#if !defined(ENGINECALLBACK_H)
#define ENGINECALLBACK_H
#include "event_flags.h"

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EXPLODE_H
#if !defined(EXPLODE_H)
#define EXPLODE_H
#define SF_ENVEXPLOSION_NODAMAGE ( 1 << 0 ) // when set, ENV_EXPLOSION will not actually inflict damage

View File

@ -1,7 +1,7 @@
#pragma once
#ifndef EXPORTDEF_H
#if !defined(EXPORTDEF_H)
#define EXPORTDEF_H
#if defined _WIN32 || defined __CYGWIN__
#if _WIN32 || __CYGWIN__
#if __GNUC__
#define EXPORT __attribute__ ((dllexport))
#else

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef EXTDLL_H
#if !defined(EXTDLL_H)
#define EXTDLL_H
//
@ -45,10 +45,10 @@
#include <windows.h>
#undef HSPRITE
#else // _WIN32
#ifndef FALSE
#if !defined(FALSE)
#define FALSE 0
#endif
#ifndef TRUE
#if !defined(TRUE)
#define TRUE (!FALSE)
#endif
#include <limits.h>
@ -57,7 +57,7 @@ typedef unsigned int ULONG;
typedef unsigned char BYTE;
typedef int BOOL;
#define MAX_PATH PATH_MAX
#ifndef PATH_MAX
#if !defined(PATH_MAX)
#define PATH_MAX 4096
#endif
#endif //_WIN32
@ -72,12 +72,12 @@ typedef int BOOL;
#include <math.h>
#endif
#ifndef M_PI_F
#if !defined(M_PI_F)
#define M_PI_F (float)M_PI
#endif
#if defined(__LP64__) || defined(__LLP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define XASH_64BIT
#if __LP64__ || __LLP64__ || _WIN64 || (__x86_64__ && !__ILP32__) || _M_X64 || __ia64 || _M_IA64 || __aarch64__ || __powerpc64__
#define XASH_64BIT 1
#endif
// Header file containing definition of globalvars_t and entvars_t
@ -101,10 +101,10 @@ typedef float vec_t; // needed before including progdefs.h
// Shared header between the client DLL and the game DLLs
#include "cdll_dll.h"
#ifndef Q_min
#if !defined(Q_min)
#define Q_min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef Q_max
#if !defined(Q_max)
#define Q_max(a,b) (((a) > (b)) ? (a) : (b))
#endif

View File

@ -14,7 +14,7 @@
****/
// Base class for flying monsters. This overrides the movement test & execution code from CBaseMonster
#pragma once
#ifndef FLYINGMONSTER_H
#if !defined(FLYINGMONSTER_H)
#define FLYINGMONSTER_H
class CFlyingMonster : public CBaseMonster

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef FUNC_BREAK_H
#if !defined(FUNC_BREAK_H)
#define FUNC_BREAK_H
typedef enum

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef GAME_H
#if !defined(GAME_H)
#define GAME_H
extern void GameDLLInit( void );

View File

@ -16,7 +16,7 @@
// GameRules
//=========================================================
#pragma once
#ifndef GAMERULES_H
#if !defined(GAMERULES_H)
#define GAMERULES_H
//#include "weapons.h"
//#include "items.h"

View File

@ -28,8 +28,8 @@
#include "weapons.h"
#include "player.h"
#define TEMP_FOR_SCREEN_SHOTS
#if defined(TEMP_FOR_SCREEN_SHOTS) //===================================================
#define TEMP_FOR_SCREEN_SHOTS 1
#if TEMP_FOR_SCREEN_SHOTS //===================================================
class CCycler : public CBaseMonster
{

View File

@ -16,7 +16,7 @@
// Hornets
//=========================================================
#pragma once
#ifndef HORNET_H
#if !defined(HORNET_H)
#define HORNET_H
//=========================================================
// Hornet Defines

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef ITEMS_H
#if !defined(ITEMS_H)
#define ITEMS_H
class CItem : public CBaseEntity

View File

@ -12,8 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef MAPRULES_H
#pragma once
#if !defined(MAPRULES_H)
#define MAPRULES_H
#endif //MAPRULES_H

View File

@ -12,8 +12,8 @@
* without written permission from Valve LLC.
*
****/
#ifndef MONSTEREVENT_H
#pragma once
#if !defined(MONSTEREVENT_H)
#define MONSTEREVENT_H
typedef struct

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef MONSTERS_H
#if !defined(MONSTERS_H)
#include "skill.h"
#define MONSTERS_H

View File

@ -45,7 +45,7 @@ LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt )
#if __DOS__
#include <direct.h>
#define CreateDirectoryA(p, n) mkdir(p)
#elif !defined _WIN32
#elif !_WIN32
#include <unistd.h>
#include <sys/stat.h>
#define CreateDirectoryA(p, n) mkdir(p,777)

View File

@ -16,8 +16,8 @@
// nodes.h
//=========================================================
#pragma once
#ifndef NODES_H
#define NODES_H
#if !defined(NODES_H)
#define NODES_H
//=========================================================
// DEFINE
//=========================================================
@ -106,7 +106,7 @@ typedef struct
// CGraph
//=========================================================
#define _GRAPH_VERSION_RETAIL 16 // Retail Half-Life graph version. Don't increment this
#if defined(XASH_64BIT)
#if XASH_64BIT
#define _GRAPH_VERSION (16 * 10)
#else
#define _GRAPH_VERSION (16) // !!!increment this whenever graph/node/link classes change, to obsolesce older disk files.

View File

@ -1,6 +1,6 @@
#pragma once
#ifndef NODES_32BIT_COMPAT
#if !defined(NODES_32BIT_COMPAT)
#define NODES_32BIT_COMPAT
//#include "nodes.h"

View File

@ -15,7 +15,7 @@
//=========================================================
// Plane
//=========================================================
#ifndef PLANE_H
#if !defined(PLANE_H)
#define PLANE_H
class CPlane

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef PLAYER_H
#if !defined(PLAYER_H)
#define PLAYER_H
#include "pm_materials.h"

View File

@ -14,7 +14,7 @@
****/
// Implementation in UTIL.CPP
#pragma once
#ifndef SAVERESTORE_H
#if !defined(SAVERESTORE_H)
#define SAVERESTORE_H
class CBaseEntity;

View File

@ -16,7 +16,7 @@
// Scheduling
//=========================================================
#pragma once
#ifndef SCHEDULE_H
#if !defined(SCHEDULE_H)
#define SCHEDULE_H
#define TASKSTATUS_NEW 0 // Just started

View File

@ -24,11 +24,11 @@
#include "cbase.h"
#include "monsters.h"
#ifndef ANIMATION_H
#if !defined(ANIMATION_H)
#include "animation.h"
#endif
#ifndef SAVERESTORE_H
#if !defined(SAVERESTORE_H)
#include "saverestore.h"
#endif

View File

@ -13,10 +13,10 @@
*
****/
#pragma once
#ifndef SCRIPTED_H
#if !defined(SCRIPTED_H)
#define SCRIPTED_H
#ifndef SCRIPTEVENT_H
#if !defined(SCRIPTEVENT_H)
#include "scriptevent.h"
#endif

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef SCRIPTEVENT_H
#if !defined(SCRIPTEVENT_H)
#define SCRIPTEVENT_H
#define SCRIPT_EVENT_DEAD 1000 // character is now dead

View File

@ -16,7 +16,7 @@
// skill.h - skill level concerns
//=========================================================
#pragma once
#ifndef SKILL_H
#if !defined(SKILL_H)
#define SKILL_H
struct skilldata_t

View File

@ -18,7 +18,7 @@
// lists.
//=========================================================
#pragma once
#ifndef SOUNDENT_H
#if !defined(SOUNDENT_H)
#define SOUNDENT_H
#define MAX_WORLD_SOUNDS 64 // maximum number of sounds handled by the world at one time.

View File

@ -14,7 +14,7 @@
****/
// Spectator.h
#pragma once
#ifndef SPECTATOR_H
#if !defined(SPECTATOR_H)
#define SPECTATOR_H
class CBaseSpectator : public CBaseEntity

View File

@ -8,7 +8,7 @@
// squad.h
//=========================================================
#pragma once
#ifndef SQUAD_H
#if !defined(SQUAD_H)
#define SQUAD_H
// these are special group roles that are assigned to members when the group is formed.

View File

@ -17,7 +17,7 @@
// form squads.
//=========================================================
#pragma once
#ifndef SQUADMONSTER_H
#if !defined(SQUADMONSTER_H)
#define SQUADMONSTER_H
#define SF_SQUADMONSTER_LEADER 32

View File

@ -13,10 +13,10 @@
*
****/
#pragma once
#ifndef TALKMONSTER_H
#if !defined(TALKMONSTER_H)
#define TALKMONSTER_H
#ifndef MONSTERS_H
#if !defined(MONSTERS_H)
#include "monsters.h"
#endif

View File

@ -16,7 +16,7 @@
// teamplay_gamerules.h
//
#pragma once
#ifndef TEAMPLAY_GAMERULES_H
#if !defined(TEAMPLAY_GAMERULES_H)
#define TEAMPLAY_GAMERULES_H
#define MAX_TEAMNAME_LENGTH 16

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef TRAINS_H
#if !defined(TRAINS_H)
#define TRAINS_H
// Tracktrain spawn flags

View File

@ -1729,7 +1729,7 @@ void CSaveRestoreBuffer::BufferRewind( int size )
m_pdata->size -= size;
}
#if !defined _WIN32 && !defined __WATCOMC__
#if !_WIN32 && !__WATCOMC__
extern "C" {
unsigned _rotr( unsigned val, int shift )
{

View File

@ -13,16 +13,16 @@
*
****/
#pragma once
#ifndef UTIL_H
#if !defined(UTIL_H)
#define UTIL_H
//
// Misc utility code
//
#ifndef ACTIVITY_H
#if !defined(ACTIVITY_H)
#include "activity.h"
#endif
#ifndef ENGINECALLBACK_H
#if !defined(ENGINECALLBACK_H)
#include "enginecallback.h"
#endif
@ -35,7 +35,7 @@ extern globalvars_t *gpGlobals;
// Use this instead of ALLOC_STRING on constant strings
#define STRING(offset) (const char *)(gpGlobals->pStringBase + (int)offset)
#if !defined(XASH_64BIT) || CLIENT_DLL
#if !XASH_64BIT || CLIENT_DLL
#define MAKE_STRING(str) ((int)(long int)str - (int)(long int)STRING(0))
#else
static inline int MAKE_STRING(const char *szValue)
@ -93,7 +93,7 @@ typedef int EOFFSET;
typedef int BOOL;
// In case this ever changes
#ifndef M_PI
#if !defined(M_PI)
#define M_PI 3.14159265358979323846
#endif
// Keeps clutter down a bit, when declaring external entity/global method prototypes

View File

@ -13,7 +13,7 @@
*
****/
#pragma once
#ifndef VECTOR_H
#if !defined(VECTOR_H)
#define VECTOR_H
//=========================================================

Some files were not shown because too many files have changed in this diff Show More