2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-16 00:28:20 +03:00

Improve header guards in engine code (and remove some useless blank lines and spaces)

This commit is contained in:
Sh1ft0x0EF 2017-02-18 15:13:20 +04:00
parent c55837e42a
commit a4e56e6305
69 changed files with 247 additions and 277 deletions

View File

@ -1,5 +1,6 @@
#ifndef __APIPROXY__
#define __APIPROXY__
#pragma once
#ifndef REHLDS_APIPROXY_H
#define REHLDS_APIPROXY_H
#include "netadr.h"
#include "Sequence.h"
@ -935,5 +936,4 @@ typedef struct validator_s
#define k_nModuleVersionCur 0x43210004
#endif // __APIPROXY__
#endif // REHLDS_APIPROXY_H

View File

@ -18,7 +18,9 @@
// 4-23-98
// JOHN: client dll interface declarations
//
#pragma once
#pragma once
#ifndef REHLDS_CDLL_INT_H
#define REHLDS_CDLL_INT_H
#ifdef __cplusplus
extern "C" {
@ -463,3 +465,4 @@ extern void NullDst(void);
}
#endif
#endif // REHLDS_CDLL_INT_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef CLIENT_H
#define CLIENT_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_CLIENT_H
#define REHLDS_CLIENT_H
#include "maintypes.h"
#include "common.h"
@ -352,4 +350,4 @@ void RegisterTutorMessageShown(int mid);
void ResetTutorMessageDecayData(void);
void SetCareerAudioState(int state);
#endif // CLIENT_H
#endif // REHLDS_CLIENT_H

View File

@ -25,7 +25,10 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_CMD_H
#define REHLDS_CMD_H
#include "maintypes.h"
#include "common.h"
@ -122,3 +125,5 @@ void Cmd_ForwardToServer(void);
qboolean Cmd_ForwardToServerUnreliable(void);
NOXREF int Cmd_CheckParm(const char *parm);
void Cmd_CmdList_f(void);
#endif // REHLDS_CMD_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef CMODEL_H
#define CMODEL_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_CMODEL_H
#define REHLDS_CMODEL_H
#include "maintypes.h"
#include "model.h"
@ -64,4 +62,4 @@ void CM_FreePAS(void);
void CM_CalcPAS(model_t *pModel);
qboolean CM_HeadnodeVisible(mnode_t *node, unsigned char *visbits, int *first_visible_leafnum);
#endif // CMODEL_H
#endif // REHLDS_CMODEL_H

View File

@ -26,18 +26,15 @@
*
*/
#ifndef COM_CUSTOM_H
#define COM_CUSTOM_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_COM_CUSTOM_H
#define REHLDS_COM_CUSTOM_H
#include "maintypes.h"
#include "custom.h"
void COM_ClearCustomizationList(customization_t *pHead, qboolean bCleanDecals);
qboolean COM_CreateCustomization(customization_t *pListHead, resource_t *pResource, int playernumber, int flags, customization_t **pCustomization, int *nLumps);
int COM_SizeofResourceList(resource_t *pList, resourceinfo_t *ri);
#endif // COM_CUSTOM_H
#endif // REHLDS_COM_CUSTOM_H

View File

@ -1,4 +1,3 @@
#pragma once
/*
*
* This program is free software; you can redistribute it and/or modify it
@ -26,6 +25,11 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_COMMON_H
#define REHLDS_COMMON_H
#include "common_rehlds.h"
#include "bspfile.h"
#include "FileSystem.h"
@ -347,3 +351,5 @@ void COM_UnMunge2(unsigned char *data, int len, int seq);
void COM_Munge3(unsigned char *data, int len, int seq);
NOXREF void COM_UnMunge3(unsigned char *data, int len, int seq);
unsigned int COM_GetApproxWavePlayLength(const char *filepath);
#endif // REHLDS_COMMON_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef CONSISTENCY_H
#define CONSISTENCY_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_CONSISTENCY_H
#define REHLDS_CONSISTENCY_H
#define MAX_CONSISTENCY_LIST 512
@ -45,4 +43,4 @@ typedef struct consistency_s
float maxs[3];
} consistency_t;
#endif // CONSISTENCY_H
#endif // REHLDS_CONSISTENCY_H

View File

@ -12,10 +12,17 @@
* without written permission from Valve LLC.
*
****/
// Customization.h
#pragma once
#ifndef REHLDS_CUSTOM_INT_H
#define REHLDS_CUSTOM_INT_H
#include "custom.h"
void COM_ClearCustomizationList( struct customization_s *pHead, qboolean bCleanDecals);
qboolean COM_CreateCustomization( struct customization_s *pListHead, struct resource_s *pResource, int playernumber, int flags, struct customization_s **pCustomization, int *nLumps );
int COM_SizeofResourceList ( struct resource_s *pList, struct resourceinfo_s *ri );
#endif // REHLDS_CUSTOM_INT_H

View File

@ -26,17 +26,14 @@
*
*/
#ifndef CVAR_H
#define CVAR_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_CVAR_H
#define REHLDS_CVAR_H
#include "maintypes.h"
#include "cvardef.h"
#include "FileSystem.h"
#define MAX_CVAR_VALUE 1024
#ifdef HOOK_ENGINE
@ -68,4 +65,4 @@ NOXREF int Cvar_CountServerVariables(void);
void Cvar_UnlinkExternals(void);
void Cvar_CmdInit(void);
#endif // CVAR_H
#endif // REHLDS_CVAR_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef DECAL_H
#define DECAL_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_DECAL_H
#define REHLDS_DECAL_H
#include "maintypes.h"
#include "model.h"
@ -100,4 +98,4 @@ qboolean Draw_CacheLoadFromCustom(char *clean, cachewad_t *wad, void *raw, int r
NOXREF int Draw_CacheIndex(cachewad_t *wad, char *path);
NOXREF int Draw_CacheFindIndex(cachewad_t *wad, char *path);
#endif // DECAL_H
#endif // REHLDS_DECAL_H

View File

@ -25,7 +25,10 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_DELTA_H
#define REHLDS_DELTA_H
#include "maintypes.h"
@ -163,3 +166,5 @@ void DELTA_PrintStats(const char *name, delta_t *p);
void DELTA_DumpStats_f(void);
void DELTA_Init(void);
void DELTA_Shutdown(void);
#endif // REHLDS_DELTA_H

View File

@ -1,4 +1,6 @@
#pragma once
#ifndef REHLDS_DELTA_JIT_H
#define REHLDS_DELTA_JIT_H
#include "maintypes.h"
@ -78,4 +80,6 @@ extern qboolean DELTAJit_IsFieldMarked(delta_t* pFields, int fieldNumber);
/* Returns original mask, before it was changed by the conditional encoder */
extern uint64 DELTAJit_GetOriginalMask(delta_t* pFields);
extern uint64 DELTAJit_GetMaskU64(delta_t* pFields);
extern uint64 DELTAJit_GetMaskU64(delta_t* pFields);
#endif // REHLDS_DELTA_JIT_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef DELTA_PACKET_H
#define DELTA_PACKET_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_DELTA_PACKET_H
#define REHLDS_DELTA_PACKET_H
#include "entity_state.h"
@ -41,4 +39,4 @@ typedef struct packet_entities_s
entity_state_t *entities;
} packet_entities_t;
#endif // DELTA_PACKET_H
#endif // REHLDS_DELTA_PACKET_H

View File

@ -1,4 +1,6 @@
#pragma once
#ifndef REHLDS_ED_STRPOOL_H
#define REHLDS_ED_STRPOOL_H
#include "osconfig.h"
#include "static_map.h"
@ -6,3 +8,5 @@
extern char* Ed_StrPool_Alloc(const char* str);
extern void Ed_StrPool_Reset();
extern void Ed_StrPool_Init();
#endif // REHLDS_ED_STRPOOL_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef EVENT_H
#define EVENT_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_EVENT_H
#define REHLDS_EVENT_H
typedef struct event_s
{
@ -40,4 +38,4 @@ typedef struct event_s
const char *pszScript;
} event_t;
#endif // EVENT_H
#endif // REHLDS_EVENT_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef FILESYSTEM__H
#define FILESYSTEM__H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_FILESYSTEM__H
#define REHLDS_FILESYSTEM__H
#include "maintypes.h"
#include "iregistry.h"
@ -66,6 +64,6 @@ void CheckLiblistForFallbackDir(const char *pGameDir, bool bLanguage, const char
int FileSystem_SetGameDirectory(const char *pDefaultDir, const char *pGameDir);
int FileSystem_AddFallbackGameDir(const char *pGameDir);
int FileSystem_Init(char *basedir, void *voidfilesystemFactory);
void FileSystem_Shutdown(void);
void FileSystem_Shutdown(void);
#endif // FILESYSTEM__H
#endif // REHLDS_FILESYSTEM__H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef _FILESYSTEM_INTERNAL_H
#define _FILESYSTEM_INTERNAL_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_FILESYSTEM_INTERNAL_H
#define REHLDS_FILESYSTEM_INTERNAL_H
#include "maintypes.h"
#include "FileSystem.h"
@ -89,5 +87,4 @@ void FS_Unlink(const char *filename);
void FS_Rename(const char *originalName, const char *newName);
void *FS_LoadLibrary(const char *dllName);
#endif // _FILESYSTEM_INTERNAL_H
#endif // REHLDS_FILESYSTEM_INTERNAL_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef FILTER_H
#define FILTER_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_FILTER_H
#define REHLDS_FILTER_H
#include "userid.h"
@ -63,4 +61,4 @@ typedef struct userfilter_s
float banTime;
} userfilter_t;
#endif // FILTER_H
#endif // REHLDS_FILTER_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef HASHPAK_H
#define HASHPAK_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_HASHPAK_H
#define REHLDS_HASHPAK_H
#include "maintypes.h"
#include "custom.h"
@ -102,4 +100,4 @@ void HPAK_CheckSize(char *pakname);
void HPAK_ValidatePak(char *fullpakname);
void HPAK_CheckIntegrity(char *pakname);
#endif // HASHPAK_H
#endif // REHLDS_HASHPAK_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef HOST_H
#define HOST_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_HOST_H
#define REHLDS_HOST_H
#include "maintypes.h"
#include "filesystem_internal.h"
@ -151,4 +149,4 @@ void Host_Version(void);
int Host_Init(quakeparms_t *parms);
void Host_Shutdown(void);
#endif // HOST_H
#endif // REHLDS_HOST_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef HOST_CMD_H
#define HOST_CMD_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_HOST_CMD_H
#define REHLDS_HOST_CMD_H
#include "maintypes.h"
#include "eiface.h"
@ -213,4 +211,4 @@ void Host_InitCommands(void);
void SV_CheckBlendingInterface(void);
void SV_CheckSaveGameCommentInterface(void);
#endif // HOST_CMD_H
#endif // REHLDS_HOST_CMD_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef IENGINE_H
#define IENGINE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_IENGINE_H
#define REHLDS_IENGINE_H
#include "maintypes.h"
@ -70,4 +68,4 @@ public:
extern IEngine *eng;
#endif // IENGINE_H
#endif // REHLDS_IENGINE_H

View File

@ -27,6 +27,8 @@
*/
#pragma once
#ifndef REHLDS_IGAME_H
#define REHLDS_IGAME_H
#include "maintypes.h"
@ -50,3 +52,5 @@ public:
virtual void SetCursorVisible(bool bState) = 0;
};
#endif // REHLDS_IGAME_H

View File

@ -26,17 +26,15 @@
*
*/
#ifndef INFO__H
#define INFO__H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_INFO_H
#define REHLDS_INFO_H
#include "maintypes.h"
// Max key/value length (with a NULL char)
#define MAX_KV_LEN 127
// Key + value + 2 x slash + NULL
#define MAX_INFO_STRING 256
@ -61,4 +59,4 @@ qboolean Info_IsValid(const char *s);
void Info_CollectFields(char *destInfo, const char *srcInfo, const char *collectedKeysOfFields);
#endif
#endif // INFO__H
#endif // REHLDS_INFO_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef INST_BASELINE_H
#define INST_BASELINE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_INST_BASELINE_H
#define REHLDS_INST_BASELINE_H
#include "entity_state.h"
@ -43,4 +41,4 @@ typedef struct extra_baselines_s
entity_state_t baseline[NUM_BASELINES];
} extra_baselines_t;
#endif // INST_BASELINE_H
#endif // REHLDS_INST_BASELINE_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef IPRATELIMIT_H
#define IPRATELIMIT_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_IPRATELIMIT_H
#define REHLDS_IPRATELIMIT_H
#include "maintypes.h"
#include "net.h"
@ -71,4 +69,4 @@ private:
//extern bool (__fastcall *pCIPRateLimit__CheckIP)(CIPRateLimit *obj, int none, netadr_t adr);
#endif // IPRATELIMIT_H
#endif // REHLDS_IPRATELIMIT_H

View File

@ -25,7 +25,10 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_IPRATELIMITWRAPPER_H
#define REHLDS_IPRATELIMITWRAPPER_H
#include "maintypes.h"
#include "net.h"
@ -39,8 +42,6 @@ extern int(*pCheckIP)(netadr_t adr);
extern class CIPRateLimit rateChecker;
int CheckIP(netadr_t adr);
#endif // REHLDS_IPRATELIMITWRAPPER_H

View File

@ -1,7 +1,11 @@
#pragma once
#ifndef REHLDS_KEYS_H
#define REHLDS_KEYS_H
typedef enum {
key_game = 0,
key_message = 1,
key_menu = 2,
} keydest_t;
#endif // REHLDS_KEYS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef L_STUDIO_H
#define L_STUDIO_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_L_STUDIO_H
#define REHLDS_L_STUDIO_H
#include "maintypes.h"
#include "studio_rehlds.h"
@ -47,7 +45,6 @@
//extern int giTextureSize;
void Mod_LoadStudioModel(model_t * mod, void * buffer);
#endif // L_STUDIO_H
#endif // REHLDS_L_STUDIO_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef MATHLIB_E_H
#define MATHLIB_E_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_MATHLIB_E_H
#define REHLDS_MATHLIB_E_H
#include "maintypes.h"
#include "model.h"
@ -40,7 +38,7 @@
// left / right
#define YAW 1
// fall over
#define ROLL 2
#define ROLL 2
#define RAD2DEG(x) ((float)(x) * (float)(180.f / M_PI))
#define DEG2RAD(x) ((float)(x) * (float)(M_PI / 180.f))
@ -49,7 +47,6 @@
#define vec3_origin (*pvec3_origin)
#endif // HOOK_ENGINE
extern vec3_t vec3_origin;
static const int nanmask = 0x7F800000;
@ -147,4 +144,4 @@ NOBODY void FloorDivMod(double numer, double denom, int *quotient, int *rem);
NOBODY int GreatestCommonDivisor(int i1, int i2);
NOBODY fixed16_t Invert24To16(fixed16_t val);
#endif // MATHLIB_E_H
#endif // REHLDS_MATHLIB_E_H

View File

@ -26,12 +26,9 @@
*
*/
#ifndef MEM__H
#define MEM__H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_MEM_H
#define REHLDS_MEM_H
void *Mem_Malloc(size_t size);
void *Mem_ZeroMalloc(size_t size);
@ -40,4 +37,4 @@ void *Mem_Calloc(int num, size_t size);
char *Mem_Strdup(const char *strSource);
void Mem_Free(void *p);
#endif // MEM__H
#endif // REHLDS_MEM_H

View File

@ -25,7 +25,10 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_MODEL_REHLDS_H
#define REHLDS_MODEL_REHLDS_H
/*
@ -116,3 +119,5 @@ void Mod_Print(void);
NOXREF void Mod_ChangeGame(void);
model_t *Mod_Handle(int modelindex);
modtype_t Mod_GetType(int modelindex);
#endif // REHLDS_MODEL_REHLDS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef MODINFO_H
#define MODINFO_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_MODINFO_H
#define REHLDS_MODINFO_H
#include "maintypes.h"
@ -57,4 +55,4 @@ typedef struct modinfo_s
qboolean clientcrccheck;
} modinfo_t;
#endif // MODINFO_H
#endif // REHLDS_MODINFO_H

View File

@ -26,18 +26,15 @@
*
*/
#ifndef GS_NET_H
#define GS_NET_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_NET_H
#define REHLDS_NET_H
#include "maintypes.h"
#include "common.h"
#include "enums.h"
#include "netadr.h"
#define PROTOCOL_VERSION 48
// MAX_CHALLENGES is made large to prevent a denial
@ -404,4 +401,4 @@ typedef struct netchan_s
#define Con_NetPrintf Con_Printf
#endif // REHLDS_FIXES
#endif // GS_NET_H
#endif // REHLDS_NET_H

View File

@ -26,17 +26,14 @@
*
*/
#ifndef NET_CHAN_H
#define NET_CHAN_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_NET_CHAN_H
#define REHLDS_NET_CHAN_H
#include "maintypes.h"
#include "cvar.h"
#include "net.h"
#ifdef HOOK_ENGINE
#define gDownloadFile (*pgDownloadFile)
@ -63,8 +60,6 @@ extern cvar_t net_chokeloopback;
extern cvar_t sv_filetransfercompression;
extern cvar_t sv_filetransfermaxsize;
void Netchan_UnlinkFragment(fragbuf_t *buf, fragbuf_t **list);
void Netchan_OutOfBand(netsrc_t sock, netadr_t adr, int length, byte *data);
void Netchan_OutOfBandPrint(netsrc_t sock, netadr_t adr, char *format, ...);
@ -101,4 +96,4 @@ void Netchan_Init(void);
NOXREF qboolean Netchan_CompressPacket(sizebuf_t *chan);
NOXREF qboolean Netchan_DecompressPacket(sizebuf_t *chan);
#endif // NET_CHAN_H
#endif // REHLDS_NET_CHAN_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef NET_WS_H
#define NET_WS_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_NET_WS_H
#define REHLDS_NET_WS_H
#include "maintypes.h"
#include "enums.h"
@ -270,4 +268,4 @@ void NET_Shutdown(void);
qboolean NET_JoinGroup(netsrc_t sock, netadr_t& addr);
qboolean NET_LeaveGroup(netsrc_t sock, netadr_t& addr);
#endif // NET_WS_H
#endif // REHLDS_NET_WS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef PMOVE_H
#define PMOVE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_PMOVE_H
#define REHLDS_PMOVE_H
#include "maintypes.h"
#include "cvar.h"
@ -62,4 +60,4 @@ qboolean PM_AddToTouched(pmtrace_t tr, vec_t *impactvelocity);
void PM_StuckTouch(int hitent, pmtrace_t *ptraceresult);
void PM_Init(playermove_t *ppm);
#endif // PMOVE_H
#endif // REHLDS_PMOVE_H

View File

@ -26,18 +26,15 @@
*
*/
#ifndef PMOVETST_H
#define PMOVETST_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_PMOVETST_H
#define REHLDS_PMOVETST_H
#include "maintypes.h"
#include "pm_defs.h"
#include "model.h"
#include "world.h"
#ifdef HOOK_ENGINE
#define g_contentsresult (*pg_contentsresult)
#define box_hull_0 (*pbox_hull_0)
@ -50,8 +47,6 @@ extern hull_t box_hull_0;
extern box_clipnodes_t box_clipnodes_0;
extern box_planes_t box_planes_0;
float PM_TraceModel(physent_t *pEnt, vec_t *start, vec_t *end, trace_t *trace);
void PM_GetModelBounds(struct model_s *mod, vec_t *mins, vec_t *maxs);
int PM_GetModelType(struct model_s *mod);
@ -74,4 +69,4 @@ struct pmtrace_s *PM_TraceLine(float *start, float *end, int flags, int usehull,
struct pmtrace_s *PM_TraceLineEx(float *start, float *end, int flags, int usehull, int(*pfnIgnore)(physent_t *));
qboolean PM_RecursiveHullCheck(hull_t *hull, int num, float p1f, float p2f, const vec_t *p1, const vec_t *p2, pmtrace_t *trace);
#endif // PMOVETST_H
#endif // REHLDS_PMOVETST_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef PR_CMDS_H
#define PR_CMDS_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_PR_CMDS_H
#define REHLDS_PR_CMDS_H
#include "maintypes.h"
#include "const.h"
@ -39,9 +37,9 @@
#include "common.h"
#include "server.h"
#define MAX_RANDOM_RANGE 0x7FFFFFFFUL
// TODO: Make enum with bits
#define AMBIENT_SOUND_STATIC 0 // medium radius attenuation
#define AMBIENT_SOUND_EVERYWHERE 1
#define AMBIENT_SOUND_SMALLRADIUS 2
@ -216,4 +214,4 @@ void QueryClientCvarValue2(const edict_t *player, const char *cvarName, int requ
int hudCheckParm(char *parm, char **ppnext);
int EngCheckParm(const char *pchCmdLineToken, char **pchNextVal);
#endif // PR_CMDS_H
#endif // REHLDS_PR_CMDS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef PR_DLLS_H
#define PR_DLLS_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_PR_DLLS_H
#define REHLDS_PR_DLLS_H
#include "maintypes.h"
#include "eiface.h"
@ -52,4 +50,4 @@ typedef void(*ENTITYINIT)(struct entvars_s *);
typedef void(*DISPATCHFUNCTION)(struct entvars_s *, void *);
typedef void(*FIELDIOFUNCTION)(SAVERESTOREDATA *, const char *, void *, TYPEDESCRIPTION *, int);
#endif // PR_DLLS_H
#endif // REHLDS_PR_DLLS_H

View File

@ -26,18 +26,15 @@
*
*/
#ifndef PR_EDICT_H
#define PR_EDICT_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_PR_EDICT_H
#define REHLDS_PR_EDICT_H
#include "maintypes.h"
#include "cvar.h"
#include "pm_defs.h"
#include "progdefs.h"
void ED_ClearEdict(edict_t *e);
edict_t *ED_Alloc(void);
void ED_Free(edict_t *ed);
@ -72,4 +69,4 @@ int AllocEngineString(const char *szValue);
void SaveSpawnParms(edict_t *pEdict);
void *GetModelPtr(edict_t *pEdict);
#endif // PR_EDICT_H
#endif // REHLDS_PR_EDICT_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SERVER_H
#define SERVER_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SERVER_H
#define REHLDS_SERVER_H
#include "maintypes.h"
@ -81,6 +79,7 @@
#define MSG_FL_ONE BIT(7) // Send to single client
#define RESOURCE_INDEX_BITS 12
#ifdef REHLDS_FIXES
#define RESOURCE_MAX_COUNT (1 << RESOURCE_INDEX_BITS)
#endif // REHLDS_FIXES
@ -805,4 +804,4 @@ int GetGameAppID(void);
qboolean IsGameSubscribed(const char *gameName);
NOXREF qboolean BIsValveGame(void);
#endif // SERVER_H
#endif // REHLDS_SERVER_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SERVER_STATIC_H
#define SERVER_STATIC_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SERVER_STATIC_H
#define REHLDS_SERVER_STATIC_H
#include "maintypes.h"
#include "netadr.h"
@ -76,4 +74,4 @@ typedef struct server_static_s
qboolean isSecure;
} server_static_t;
#endif // SERVER_STATIC_H
#endif // REHLDS_SERVER_STATIC_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SOUND_H
#define SOUND_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SOUND_H
#define REHLDS_SOUND_H
#include "quakedef.h"
@ -70,4 +68,4 @@ void Voice_Deinit();
void Voice_Idle(float frametime);
qboolean Voice_RecordStop();
#endif // SOUND_H
#endif // REHLDS_SOUND_H

View File

@ -29,6 +29,8 @@ misrepresented as being the original software.
(this is the zlib license)
*/
#pragma once
#ifndef REHLDS_SSE_MATHFUN_H
#define REHLDS_SSE_MATHFUN_H
#include <xmmintrin.h>
@ -118,3 +120,5 @@ extern v4sf exp_ps(v4sf x);
extern v4sf sin_ps(v4sf x);
extern v4sf cos_ps(v4sf x);
extern void sincos_ps(v4sf x, v4sf *s, v4sf *c);
#endif // REHLDS_SSE_MATHFUN_H

View File

@ -14,7 +14,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#pragma once
#ifndef REHLDS_STUDIO_REHLDS_H
#define REHLDS_STUDIO_REHLDS_H
#include "studio.h"
#include "model.h"
#include "r_studioint.h"
@ -105,3 +109,5 @@ void R_StudioAccumulateBoneVerts(vec_t *mins, vec_t *maxs, int *vertcount, vec_t
int R_StudioComputeBounds(unsigned char *pBuffer, float *mins, float *maxs);
int R_GetStudioBounds(const char *filename, float *mins, float *maxs);
void R_ResetSvBlending(void);
#endif // REHLDS_STUDIO_REHLDS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SV_LOG_H
#define SV_LOG_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_LOG_H
#define REHLDS_SV_LOG_H
#include "maintypes.h"
@ -55,4 +53,4 @@ void SV_AddLogAddress_f(void);
void SV_DelLogAddress_f(void);
void SV_ServerLog_f(void);
#endif // SV_LOG_H
#endif // REHLDS_SV_LOG_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SV_MOVE_H
#define SV_MOVE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_MOVE_H
#define REHLDS_SV_MOVE_H
#include "maintypes.h"
#include "server.h"
@ -59,4 +57,4 @@ NOXREF qboolean SV_ReachedGoal(edict_t *ent, vec_t *vecGoal, float flDist);
void SV_NewChaseDir2(edict_t *actor, vec_t *vecGoal, float dist);
void SV_MoveToOrigin_I(edict_t *ent, const float *pflGoal, float dist, int iStrafe);
#endif // SV_MOVE_H
#endif // REHLDS_SV_MOVE_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SV_PHYS_H
#define SV_PHYS_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_PHYS_H
#define REHLDS_SV_PHYS_H
#include "maintypes.h"
#include "model.h"
@ -85,4 +83,4 @@ void SV_Physics_Step(edict_t *ent);
void SV_Physics(void);
trace_t SV_Trace_Toss(edict_t *ent, edict_t *ignore);
#endif // SV_PHYS_H
#endif // REHLDS_SV_PHYS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SV_PMOVE_H
#define SV_PMOVE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_PMOVE_H
#define REHLDS_SV_PMOVE_H
#include "maintypes.h"
@ -38,4 +36,4 @@ void PM_SV_PlaybackEventFull(int flags, int clientindex, unsigned short eventind
void PM_SV_PlaySound(int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch);
const char *PM_SV_TraceTexture(int ground, vec_t *vstart, vec_t *vend);
#endif // SV_PMOVE_H
#endif REHLDS_SV_PMOVE_H

View File

@ -25,7 +25,10 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_SV_REMOTEACCESS_H
#define REHLDS_SV_REMOTEACCESS_H
#include "maintypes.h"
#include "IGameServerData.h"
@ -72,3 +75,5 @@ public:
extern class CServerRemoteAccess g_ServerRemoteAccess;
extern void NotifyDedicatedServerUI(const char *message);
#endif // REHLDS_SV_REMOTEACCESS_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SV_STEAM3_H
#define SV_STEAM3_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_STEAM3_H
#define REHLDS_SV_STEAM3_H
#include "maintypes.h"
#include "common.h"
@ -168,4 +166,4 @@ CSteam3Client *Steam3Client();
void Master_SetMaster_f();
void Steam_HandleIncomingPacket(byte *data, int len, int fromip, uint16 port);
#endif // SV_STEAM3_H
#endif // REHLDS_SV_STEAM3_H

View File

@ -26,15 +26,12 @@
*
*/
#ifndef SV_UPLD__H
#define SV_UPLD__H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_UPLD_H
#define REHLDS_SV_UPLD_H
#include "maintypes.h"
qboolean SV_CheckFile(sizebuf_t *msg, char *filename);
void SV_ClearResourceLists(client_t *cl);
void SV_CreateCustomizationList(client_t *pHost);
@ -49,6 +46,6 @@ void SV_RequestMissingResourcesFromClients(void);
qboolean SV_UploadComplete(client_t *cl);
void SV_BatchUploadRequest(client_t *cl);
qboolean SV_RequestMissingResources(void);
void SV_ParseResourceList(client_t *pSenderClient);
void SV_ParseResourceList(client_t *pSenderClient);
#endif // SV_UPLD__H
#endif // REHLDS_SV_UPLD_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SV_USER_H
#define SV_USER_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SV_USER_H
#define REHLDS_SV_USER_H
#include "maintypes.h"
#include "server.h"
@ -152,4 +150,4 @@ void SV_ShowServerinfo_f(void);
void SV_SendEnts_f(void);
void SV_FullUpdate_f(void);
#endif // SV_USER_H
#endif // REHLDS_SV_USER_H

View File

@ -25,7 +25,10 @@
* version.
*
*/
#pragma once
#ifndef REHLDS_SYS_DLL_H
#define REHLDS_SYS_DLL_H
#include "maintypes.h"
#include "modinfo.h"
@ -199,3 +202,5 @@ void Con_DebugLog(const char *file, const char *fmt, ...);
void Con_Printf(const char *fmt, ...);
void Con_SafePrintf(const char *fmt, ...);
void Con_DPrintf(const char *fmt, ...);
#endif // REHLDS_SYS_DLL_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef SYS_DLL2_H
#define SYS_DLL2_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_SYS_DLL2_H
#define REHLDS_SYS_DLL2_H
#include "maintypes.h"
#include "interface.h"
@ -121,4 +119,4 @@ void ClearIOStates();
// TODO: Needs rechecking
//NOXREF int BuildMapCycleListHints(char **hints);
#endif // SYS_DLL2_H
#endif // REHLDS_SYS_DLL2_H

View File

@ -27,7 +27,8 @@
*/
#pragma once
#ifndef REHLDS_SYS_ENGINE_H
#define REHLDS_SYS_ENGINE_H
#include "maintypes.h"
#include "igame.h"
@ -99,3 +100,5 @@ public:
int GetQuitting_noVirt();
void SetQuitting_noVirt(int quittype);
};
#endif // REHLDS_SYS_ENGINE_H

View File

@ -27,6 +27,8 @@
*/
#pragma once
#ifndef REHLDS_SYS_LINUXWND_H
#define REHLDS_SYS_LINUXWND_H
#include "maintypes.h"
#include "igame.h"
@ -71,3 +73,5 @@ public:
void PlayAVIAndWait_noVirt(const char *aviFile);
void SetCursorVisible_noVirt(bool bState);
};
#endif // REHLDS_SYS_LINUXWND_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef TEXTURES_H
#define TEXTURES_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_TEXTURES_H
#define REHLDS_TEXTURES_H
#include "maintypes.h"
#include "wad.h"
@ -81,4 +79,4 @@ int TEX_LoadLump(char *name, unsigned char *dest);
int FindMiptex(char *name);
void TEX_AddAnimatingTextures(void);
#endif // TEXTURES_H
#endif // REHLDS_TEXTURES_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef TMESSAGE_H
#define TMESSAGE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_TMESSAGE_H
#define REHLDS_TMESSAGE_H
#include "maintypes.h"
@ -84,4 +82,4 @@ NOXREF void TextMessageShutdown(void);
NOXREF void TextMessageInit(void);
NOXREF client_textmessage_t *TextMessageGet(const char *pName);
#endif // TMESSAGE_H
#endif // REHLDS_TMESSAGE_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef TRACEINIT_H
#define TRACEINIT_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_TRACEINIT_H
#define REHLDS_TRACEINIT_H
#include "utlvector.h"
@ -80,4 +78,4 @@ extern CInitTracker g_InitTracker;
void TraceInit(const char *i, const char *s, int listnum);
void TraceShutdown(const char *s, int listnum);
#endif // TRACEINIT_H
#endif // REHLDS_TRACEINIT_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef UNICODE_STR_TOOLS_H
#define UNICODE_STR_TOOLS_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_UNICODE_STRTOOLS_H
#define REHLDS_UNICODE_STRTOOLS_H
#include "maintypes.h"
@ -65,4 +63,4 @@ qboolean Q_StripUnprintableAndSpace(char *pch);;
qboolean V_UTF8ToUChar32(const char *pUTF8_, uchar32 *uValueOut);
int Q_UnicodeRepair(char *pUTF8);
#endif // UNICODE_STR_TOOLS_H
#endif // REHLDS_UNICODE_STRTOOLS_H

View File

@ -26,7 +26,10 @@
*
*/
#pragma once
#ifndef REHLDS_USERID_H
#define REHLDS_USERID_H
#include "userid_rehlds.h"
#endif // REHLDS_USERID_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef USERMSG_H
#define USERMSG_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_USERMSG_H
#define REHLDS_USERMSG_H
#include "maintypes.h"
#include "quakedef.h"
@ -44,4 +42,4 @@ typedef struct _UserMsg
pfnUserMsgHook pfn;
} UserMsg;
#endif // USERMSG_H
#endif // REHLDS_USERMSG_H

View File

@ -27,6 +27,8 @@
*/
#pragma once
#ifndef REHLDS_VID_NULL_H
#define REHLDS_VID_NULL_H
#include "maintypes.h"
@ -60,3 +62,5 @@ void R_InitTextures(void);
void StartLoadingProgressBar(const char *loadingType, int numProgressPoints);
void ContinueLoadingProgressBar(const char *loadingType, int progressPoint, float progressFraction);
void SetLoadingProgressBarStatusText(const char *statusText);
#endif // REHLDS_VID_NULL_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef WAD_H
#define WAD_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_WAD_H
#define REHLDS_WAD_H
#include "maintypes.h"
@ -88,4 +86,4 @@ NOXREF void *W_GetLumpNum(int wad, int num);
void W_Shutdown(void);
void SwapPic(qpic_t *pic);
#endif // WAD_H
#endif // REHLDS_WAD_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef WORLD_H
#define WORLD_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_WORLD_H
#define REHLDS_WORLD_H
#include "maintypes.h"
#include "model.h"
@ -119,4 +117,4 @@ trace_t SV_Move(const vec_t *start, const vec_t *mins, const vec_t *maxs, const
trace_t SV_Move_Point(const vec_t *start, const vec_t *end, int type, edict_t *passedict);
#endif // REHLDS_OPT_PEDANTIC
#endif // WORLD_H
#endif // REHLDS_WORLD_H

View File

@ -26,11 +26,9 @@
*
*/
#ifndef ZONE_H
#define ZONE_H
#ifdef _WIN32
#pragma once
#endif
#ifndef REHLDS_ZONE_H
#define REHLDS_ZONE_H
#include "maintypes.h"
@ -107,4 +105,4 @@ void Memory_Init(void *buf, int size);
NOXREF NOBODY void Cache_Print_Models_And_Totals(void);
NOXREF NOBODY void Cache_Print_Sounds_And_Totals(void);
#endif // ZONE_H
#endif // REHLDS_ZONE_H