From a4e56e63057b479afaa7176bbe14e3ea40c38363 Mon Sep 17 00:00:00 2001 From: Sh1ft0x0EF Date: Sat, 18 Feb 2017 15:13:20 +0400 Subject: [PATCH] Improve header guards in engine code (and remove some useless blank lines and spaces) --- rehlds/engine/APIProxy.h | 8 ++++---- rehlds/engine/cdll_int.h | 5 ++++- rehlds/engine/client.h | 8 +++----- rehlds/engine/cmd.h | 5 +++++ rehlds/engine/cmodel.h | 8 +++----- rehlds/engine/com_custom.h | 9 +++------ rehlds/engine/common.h | 8 +++++++- rehlds/engine/consistency.h | 8 +++----- rehlds/engine/custom_int.h | 7 +++++++ rehlds/engine/cvar.h | 9 +++------ rehlds/engine/decal.h | 8 +++----- rehlds/engine/delta.h | 5 +++++ rehlds/engine/delta_jit.h | 6 +++++- rehlds/engine/delta_packet.h | 8 +++----- rehlds/engine/ed_strpool.h | 4 ++++ rehlds/engine/event.h | 8 +++----- rehlds/engine/filesystem_.h | 10 ++++------ rehlds/engine/filesystem_internal.h | 9 +++------ rehlds/engine/filter.h | 8 +++----- rehlds/engine/hashpak.h | 8 +++----- rehlds/engine/host.h | 8 +++----- rehlds/engine/host_cmd.h | 8 +++----- rehlds/engine/iengine.h | 8 +++----- rehlds/engine/igame.h | 4 ++++ rehlds/engine/info.h | 10 ++++------ rehlds/engine/inst_baseline.h | 8 +++----- rehlds/engine/ipratelimit.h | 8 +++----- rehlds/engine/ipratelimitWrapper.h | 7 ++++--- rehlds/engine/keys.h | 4 ++++ rehlds/engine/l_studio.h | 9 +++------ rehlds/engine/mathlib_e.h | 11 ++++------- rehlds/engine/mem.h | 9 +++------ rehlds/engine/model_rehlds.h | 5 +++++ rehlds/engine/modinfo.h | 8 +++----- rehlds/engine/net.h | 9 +++------ rehlds/engine/net_chan.h | 11 +++-------- rehlds/engine/net_ws.h | 8 +++----- rehlds/engine/pmove.h | 8 +++----- rehlds/engine/pmovetst.h | 11 +++-------- rehlds/engine/pr_cmds.h | 10 ++++------ rehlds/engine/pr_dlls.h | 8 +++----- rehlds/engine/pr_edict.h | 9 +++------ rehlds/engine/server.h | 9 ++++----- rehlds/engine/server_static.h | 8 +++----- rehlds/engine/sound.h | 8 +++----- rehlds/engine/sse_mathfun.h | 4 ++++ rehlds/engine/studio_rehlds.h | 6 ++++++ rehlds/engine/sv_log.h | 8 +++----- rehlds/engine/sv_move.h | 8 +++----- rehlds/engine/sv_phys.h | 8 +++----- rehlds/engine/sv_pmove.h | 8 +++----- rehlds/engine/sv_remoteaccess.h | 5 +++++ rehlds/engine/sv_steam3.h | 8 +++----- rehlds/engine/sv_upld.h | 11 ++++------- rehlds/engine/sv_user.h | 8 +++----- rehlds/engine/sys_dll.h | 5 +++++ rehlds/engine/sys_dll2.h | 8 +++----- rehlds/engine/sys_engine.h | 5 ++++- rehlds/engine/sys_linuxwnd.h | 4 ++++ rehlds/engine/textures.h | 8 +++----- rehlds/engine/tmessage.h | 8 +++----- rehlds/engine/traceinit.h | 8 +++----- rehlds/engine/unicode_strtools.h | 8 +++----- rehlds/engine/userid.h | 5 ++++- rehlds/engine/usermsg.h | 8 +++----- rehlds/engine/vid_null.h | 4 ++++ rehlds/engine/wad.h | 8 +++----- rehlds/engine/world.h | 8 +++----- rehlds/engine/zone.h | 8 +++----- 69 files changed, 247 insertions(+), 277 deletions(-) diff --git a/rehlds/engine/APIProxy.h b/rehlds/engine/APIProxy.h index 15c4c26..7f39123 100644 --- a/rehlds/engine/APIProxy.h +++ b/rehlds/engine/APIProxy.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/cdll_int.h b/rehlds/engine/cdll_int.h index ac37e79..5f4a339 100644 --- a/rehlds/engine/cdll_int.h +++ b/rehlds/engine/cdll_int.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/client.h b/rehlds/engine/client.h index 2c7ea63..6dee000 100644 --- a/rehlds/engine/client.h +++ b/rehlds/engine/client.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/cmd.h b/rehlds/engine/cmd.h index c685544..dd4e174 100644 --- a/rehlds/engine/cmd.h +++ b/rehlds/engine/cmd.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/cmodel.h b/rehlds/engine/cmodel.h index a81852f..530b47a 100644 --- a/rehlds/engine/cmodel.h +++ b/rehlds/engine/cmodel.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/com_custom.h b/rehlds/engine/com_custom.h index 6bbb4db..5d3c500 100644 --- a/rehlds/engine/com_custom.h +++ b/rehlds/engine/com_custom.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/common.h b/rehlds/engine/common.h index 6c30045..97a5882 100644 --- a/rehlds/engine/common.h +++ b/rehlds/engine/common.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/consistency.h b/rehlds/engine/consistency.h index 2854563..6a345cc 100644 --- a/rehlds/engine/consistency.h +++ b/rehlds/engine/consistency.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/custom_int.h b/rehlds/engine/custom_int.h index 44fa5d3..c13c50e 100644 --- a/rehlds/engine/custom_int.h +++ b/rehlds/engine/custom_int.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/cvar.h b/rehlds/engine/cvar.h index 3e97800..d4ad415 100644 --- a/rehlds/engine/cvar.h +++ b/rehlds/engine/cvar.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/decal.h b/rehlds/engine/decal.h index c91bafc..ba40cba 100644 --- a/rehlds/engine/decal.h +++ b/rehlds/engine/decal.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/delta.h b/rehlds/engine/delta.h index 953530e..87bee2e 100644 --- a/rehlds/engine/delta.h +++ b/rehlds/engine/delta.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/delta_jit.h b/rehlds/engine/delta_jit.h index c885259..24079fc 100644 --- a/rehlds/engine/delta_jit.h +++ b/rehlds/engine/delta_jit.h @@ -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); \ No newline at end of file +extern uint64 DELTAJit_GetMaskU64(delta_t* pFields); + +#endif // REHLDS_DELTA_JIT_H \ No newline at end of file diff --git a/rehlds/engine/delta_packet.h b/rehlds/engine/delta_packet.h index 48e4dfd..b24a289 100644 --- a/rehlds/engine/delta_packet.h +++ b/rehlds/engine/delta_packet.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/ed_strpool.h b/rehlds/engine/ed_strpool.h index 969f834..7f2ee4e 100644 --- a/rehlds/engine/ed_strpool.h +++ b/rehlds/engine/ed_strpool.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/event.h b/rehlds/engine/event.h index 0f72237..cd842e9 100644 --- a/rehlds/engine/event.h +++ b/rehlds/engine/event.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/filesystem_.h b/rehlds/engine/filesystem_.h index d548bda..d18436f 100644 --- a/rehlds/engine/filesystem_.h +++ b/rehlds/engine/filesystem_.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/filesystem_internal.h b/rehlds/engine/filesystem_internal.h index f74bf0b..9692f43 100644 --- a/rehlds/engine/filesystem_internal.h +++ b/rehlds/engine/filesystem_internal.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/filter.h b/rehlds/engine/filter.h index 326825d..4406ee3 100644 --- a/rehlds/engine/filter.h +++ b/rehlds/engine/filter.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/hashpak.h b/rehlds/engine/hashpak.h index 1aa7d6d..207e1b5 100644 --- a/rehlds/engine/hashpak.h +++ b/rehlds/engine/hashpak.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/host.h b/rehlds/engine/host.h index 9081532..9306352 100644 --- a/rehlds/engine/host.h +++ b/rehlds/engine/host.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/host_cmd.h b/rehlds/engine/host_cmd.h index c877307..125917c 100644 --- a/rehlds/engine/host_cmd.h +++ b/rehlds/engine/host_cmd.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/iengine.h b/rehlds/engine/iengine.h index 2867770..fbbbc55 100644 --- a/rehlds/engine/iengine.h +++ b/rehlds/engine/iengine.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/igame.h b/rehlds/engine/igame.h index a415fd7..1e9e420 100644 --- a/rehlds/engine/igame.h +++ b/rehlds/engine/igame.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/info.h b/rehlds/engine/info.h index e2d39db..2956844 100644 --- a/rehlds/engine/info.h +++ b/rehlds/engine/info.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/inst_baseline.h b/rehlds/engine/inst_baseline.h index 3f4ea66..d454b30 100644 --- a/rehlds/engine/inst_baseline.h +++ b/rehlds/engine/inst_baseline.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/ipratelimit.h b/rehlds/engine/ipratelimit.h index 7267337..ff5d751 100644 --- a/rehlds/engine/ipratelimit.h +++ b/rehlds/engine/ipratelimit.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/ipratelimitWrapper.h b/rehlds/engine/ipratelimitWrapper.h index 065d6d2..877ca3c 100644 --- a/rehlds/engine/ipratelimitWrapper.h +++ b/rehlds/engine/ipratelimitWrapper.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/keys.h b/rehlds/engine/keys.h index 0c53a2d..f547520 100644 --- a/rehlds/engine/keys.h +++ b/rehlds/engine/keys.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/l_studio.h b/rehlds/engine/l_studio.h index cdf35a1..bcec2dc 100644 --- a/rehlds/engine/l_studio.h +++ b/rehlds/engine/l_studio.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/mathlib_e.h b/rehlds/engine/mathlib_e.h index 87978e5..4b6dd2a 100644 --- a/rehlds/engine/mathlib_e.h +++ b/rehlds/engine/mathlib_e.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/mem.h b/rehlds/engine/mem.h index 65b40a9..49d0dd0 100644 --- a/rehlds/engine/mem.h +++ b/rehlds/engine/mem.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/model_rehlds.h b/rehlds/engine/model_rehlds.h index 57e17c5..b5ea2be 100644 --- a/rehlds/engine/model_rehlds.h +++ b/rehlds/engine/model_rehlds.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/modinfo.h b/rehlds/engine/modinfo.h index 78da996..62a0274 100644 --- a/rehlds/engine/modinfo.h +++ b/rehlds/engine/modinfo.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/net.h b/rehlds/engine/net.h index 3b5d14d..8a36693 100644 --- a/rehlds/engine/net.h +++ b/rehlds/engine/net.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/net_chan.h b/rehlds/engine/net_chan.h index 74911ea..1d16270 100644 --- a/rehlds/engine/net_chan.h +++ b/rehlds/engine/net_chan.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/net_ws.h b/rehlds/engine/net_ws.h index 0ed75df..f0d2e79 100644 --- a/rehlds/engine/net_ws.h +++ b/rehlds/engine/net_ws.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/pmove.h b/rehlds/engine/pmove.h index 84b5c7f..9d67f98 100644 --- a/rehlds/engine/pmove.h +++ b/rehlds/engine/pmove.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/pmovetst.h b/rehlds/engine/pmovetst.h index e48df8e..50341e3 100644 --- a/rehlds/engine/pmovetst.h +++ b/rehlds/engine/pmovetst.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/pr_cmds.h b/rehlds/engine/pr_cmds.h index 620561f..c0b40c8 100644 --- a/rehlds/engine/pr_cmds.h +++ b/rehlds/engine/pr_cmds.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/pr_dlls.h b/rehlds/engine/pr_dlls.h index 2cc7b4d..1caaf24 100644 --- a/rehlds/engine/pr_dlls.h +++ b/rehlds/engine/pr_dlls.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/pr_edict.h b/rehlds/engine/pr_edict.h index e610394..c9a9eec 100644 --- a/rehlds/engine/pr_edict.h +++ b/rehlds/engine/pr_edict.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/server.h b/rehlds/engine/server.h index e02c3e7..e558f5a 100644 --- a/rehlds/engine/server.h +++ b/rehlds/engine/server.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/server_static.h b/rehlds/engine/server_static.h index 6ff4663..70fbf1e 100644 --- a/rehlds/engine/server_static.h +++ b/rehlds/engine/server_static.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sound.h b/rehlds/engine/sound.h index 3ec319e..deb785f 100644 --- a/rehlds/engine/sound.h +++ b/rehlds/engine/sound.h @@ -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 \ No newline at end of file +#endif // REHLDS_SOUND_H \ No newline at end of file diff --git a/rehlds/engine/sse_mathfun.h b/rehlds/engine/sse_mathfun.h index 24fd11c..c7d33dd 100644 --- a/rehlds/engine/sse_mathfun.h +++ b/rehlds/engine/sse_mathfun.h @@ -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 @@ -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 \ No newline at end of file diff --git a/rehlds/engine/studio_rehlds.h b/rehlds/engine/studio_rehlds.h index a52ee38..fa02b38 100644 --- a/rehlds/engine/studio_rehlds.h +++ b/rehlds/engine/studio_rehlds.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_log.h b/rehlds/engine/sv_log.h index 1acd8b1..501d9b6 100644 --- a/rehlds/engine/sv_log.h +++ b/rehlds/engine/sv_log.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_move.h b/rehlds/engine/sv_move.h index e510c35..58dea7a 100644 --- a/rehlds/engine/sv_move.h +++ b/rehlds/engine/sv_move.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_phys.h b/rehlds/engine/sv_phys.h index ee7f203..85e0a15 100644 --- a/rehlds/engine/sv_phys.h +++ b/rehlds/engine/sv_phys.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_pmove.h b/rehlds/engine/sv_pmove.h index be94e99..fd243ce 100644 --- a/rehlds/engine/sv_pmove.h +++ b/rehlds/engine/sv_pmove.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_remoteaccess.h b/rehlds/engine/sv_remoteaccess.h index 1926742..9cf27e0 100644 --- a/rehlds/engine/sv_remoteaccess.h +++ b/rehlds/engine/sv_remoteaccess.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_steam3.h b/rehlds/engine/sv_steam3.h index dbd3e18..47a0f7e 100644 --- a/rehlds/engine/sv_steam3.h +++ b/rehlds/engine/sv_steam3.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_upld.h b/rehlds/engine/sv_upld.h index 7436449..5d5d146 100644 --- a/rehlds/engine/sv_upld.h +++ b/rehlds/engine/sv_upld.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sv_user.h b/rehlds/engine/sv_user.h index eee361f..c890fc6 100644 --- a/rehlds/engine/sv_user.h +++ b/rehlds/engine/sv_user.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sys_dll.h b/rehlds/engine/sys_dll.h index ca009ae..67c8ae0 100644 --- a/rehlds/engine/sys_dll.h +++ b/rehlds/engine/sys_dll.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sys_dll2.h b/rehlds/engine/sys_dll2.h index ff10e92..8c9de5e 100644 --- a/rehlds/engine/sys_dll2.h +++ b/rehlds/engine/sys_dll2.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sys_engine.h b/rehlds/engine/sys_engine.h index eb1ea44..8b8e581 100644 --- a/rehlds/engine/sys_engine.h +++ b/rehlds/engine/sys_engine.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/sys_linuxwnd.h b/rehlds/engine/sys_linuxwnd.h index 2b719b1..785a5b3 100644 --- a/rehlds/engine/sys_linuxwnd.h +++ b/rehlds/engine/sys_linuxwnd.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/textures.h b/rehlds/engine/textures.h index 0a50492..90981da 100644 --- a/rehlds/engine/textures.h +++ b/rehlds/engine/textures.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/tmessage.h b/rehlds/engine/tmessage.h index 6d69cd8..563fd9f 100644 --- a/rehlds/engine/tmessage.h +++ b/rehlds/engine/tmessage.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/traceinit.h b/rehlds/engine/traceinit.h index 2bdfc4c..18175b6 100644 --- a/rehlds/engine/traceinit.h +++ b/rehlds/engine/traceinit.h @@ -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 diff --git a/rehlds/engine/unicode_strtools.h b/rehlds/engine/unicode_strtools.h index cc51577..060b756 100644 --- a/rehlds/engine/unicode_strtools.h +++ b/rehlds/engine/unicode_strtools.h @@ -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 diff --git a/rehlds/engine/userid.h b/rehlds/engine/userid.h index 884537c..34b5baa 100644 --- a/rehlds/engine/userid.h +++ b/rehlds/engine/userid.h @@ -26,7 +26,10 @@ * */ - #pragma once +#ifndef REHLDS_USERID_H +#define REHLDS_USERID_H #include "userid_rehlds.h" + +#endif // REHLDS_USERID_H \ No newline at end of file diff --git a/rehlds/engine/usermsg.h b/rehlds/engine/usermsg.h index bccc31a..d2531d6 100644 --- a/rehlds/engine/usermsg.h +++ b/rehlds/engine/usermsg.h @@ -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 diff --git a/rehlds/engine/vid_null.h b/rehlds/engine/vid_null.h index 5b17592..e4d2bec 100644 --- a/rehlds/engine/vid_null.h +++ b/rehlds/engine/vid_null.h @@ -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 diff --git a/rehlds/engine/wad.h b/rehlds/engine/wad.h index 9b86c78..e4843a2 100644 --- a/rehlds/engine/wad.h +++ b/rehlds/engine/wad.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/world.h b/rehlds/engine/world.h index 8d67ac2..1d38566 100644 --- a/rehlds/engine/world.h +++ b/rehlds/engine/world.h @@ -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 \ No newline at end of file diff --git a/rehlds/engine/zone.h b/rehlds/engine/zone.h index 1c8695b..bda2f9b 100644 --- a/rehlds/engine/zone.h +++ b/rehlds/engine/zone.h @@ -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