diff --git a/rehlds/engine/common.cpp b/rehlds/engine/common.cpp index addcd7e..b23c814 100644 --- a/rehlds/engine/common.cpp +++ b/rehlds/engine/common.cpp @@ -142,6 +142,7 @@ void COM_HexConvert(const char *pszInput, int nInputLength, unsigned char *pOutp NOXREF char *COM_BinPrintf(unsigned char *buf, int nLen) { + NOXREFCHECK; static char szReturn[4096]; unsigned char c; char szChunk[10]; @@ -2107,6 +2108,7 @@ void COM_CopyFileChunk(FileHandle_t dst, FileHandle_t src, int nSize) NOXREF unsigned char *COM_LoadFileLimit(char *path, int pos, int cbmax, int *pcbread, FileHandle_t *phFile) { + NOXREFCHECK; FileHandle_t hFile; unsigned char *buf; char base[32]; diff --git a/rehlds/engine/crc.cpp b/rehlds/engine/crc.cpp index df4a810..e1e6119 100644 --- a/rehlds/engine/crc.cpp +++ b/rehlds/engine/crc.cpp @@ -152,6 +152,7 @@ byte COM_BlockSequenceCRCByte(byte *base, int length, int sequence) NOXREF BOOL CRC_File(CRC32_t *crcvalue, char *pszFileName) { + NOXREFCHECK; FileHandle_t fp; byte chunk[1024]; int nBytesRead; diff --git a/rehlds/engine/decals.cpp b/rehlds/engine/decals.cpp index 308fab0..ce468eb 100644 --- a/rehlds/engine/decals.cpp +++ b/rehlds/engine/decals.cpp @@ -293,6 +293,7 @@ void Draw_FreeWad(cachewad_t *pWad) NOXREF void Draw_DecalSetName(int decal, char *name) { + NOXREFCHECK; //Used Host_Frame -> CL_ReadPackets -> CL_ProcessFile -> CL_PrecacheResources -> Draw_DecalSetName if (decal >= MAX_DECALS) return; @@ -304,6 +305,7 @@ NOXREF void Draw_DecalSetName(int decal, char *name) NOXREF int Draw_DecalIndex(int id) { + NOXREFCHECK; //Used hw -> CL_Restore char tmp[32]; char *pName; @@ -347,6 +349,7 @@ const char *Draw_DecalName(int number) NOXREF texture_t *Draw_DecalTexture(int index) { + NOXREFCHECK; texture_t *retval; customization_t *pCust; @@ -388,6 +391,7 @@ int Draw_CacheByIndex(cachewad_t *wad, int nIndex, int playernum) NOXREF int Draw_DecalIndexFromName(char *name) { + NOXREFCHECK; char tmpName[16]; Q_strncpy(tmpName, name, sizeof(tmpName) - 1); tmpName[sizeof(tmpName) - 1] = 0; @@ -600,6 +604,7 @@ qboolean CustomDecal_Init(struct cachewad_s *wad, void *raw, int nFileSize, int NOXREF void *Draw_CacheGet(cachewad_t *wad, int index) { + NOXREFCHECK; int i; void *dat; char *path; @@ -670,6 +675,7 @@ void *Draw_CustomCacheGet(cachewad_t *wad, void *raw, int rawsize, int index) NOXREF qboolean Draw_CacheReload(cachewad_t *wad, int i, lumpinfo_t *pLump, cachepic_t *pic, char *clean, char *path) { + NOXREFCHECK; int len; byte *buf; FileHandle_t hFile; @@ -807,6 +813,7 @@ qboolean Draw_CacheLoadFromCustom(char *clean, cachewad_t *wad, void *raw, int r NOXREF int Draw_CacheIndex(cachewad_t *wad, char *path) { + NOXREFCHECK; int i; cachepic_t *pic; for (i = 0, pic = wad->cache; i < wad->cacheCount; i++, pic++) @@ -828,6 +835,7 @@ NOXREF int Draw_CacheIndex(cachewad_t *wad, char *path) NOXREF int Draw_CacheFindIndex(cachewad_t *wad, char *path) { + NOXREFCHECK; cachepic_t *pic = wad->cache; for (int i = 0; i < wad->cacheCount; i++, pic++) { diff --git a/rehlds/engine/filesystem_internal.cpp b/rehlds/engine/filesystem_internal.cpp index c589ed9..a7754c6 100644 --- a/rehlds/engine/filesystem_internal.cpp +++ b/rehlds/engine/filesystem_internal.cpp @@ -30,10 +30,8 @@ IFileSystem *g_pFileSystem; -NOXREF void FS_RemoveAllSearchPaths(void) +void FS_RemoveAllSearchPaths(void) { - //NOXREFCHECK; // We call it - g_pFileSystem->RemoveAllSearchPaths(); } diff --git a/rehlds/engine/filesystem_internal.h b/rehlds/engine/filesystem_internal.h index 684cda5..f74bf0b 100644 --- a/rehlds/engine/filesystem_internal.h +++ b/rehlds/engine/filesystem_internal.h @@ -43,7 +43,7 @@ extern IFileSystem *g_pFileSystem; -NOXREF void FS_RemoveAllSearchPaths(void); +void FS_RemoveAllSearchPaths(void); void FS_AddSearchPath(const char *pPath, const char *pathID); NOXREF int FS_RemoveSearchPath(const char *pPath); void FS_RemoveFile(const char *pRelativePath, const char *pathID); diff --git a/rehlds/engine/host.cpp b/rehlds/engine/host.cpp index c42eb7a..2523070 100644 --- a/rehlds/engine/host.cpp +++ b/rehlds/engine/host.cpp @@ -96,6 +96,7 @@ cvar_t suitvolume; NOXREF void Host_EndGame(const char *message, ...) { + NOXREFCHECK; int oldn; va_list argptr; char string[1024]; @@ -197,6 +198,7 @@ void Host_InitLocal(void) NOXREF void Info_WriteVars(FileHandle_t fp) { + NOXREFCHECK; cvar_t *pcvar; char *s; char pkey[512]; diff --git a/rehlds/engine/host_cmd.cpp b/rehlds/engine/host_cmd.cpp index 8d01a62..9ac9e67 100644 --- a/rehlds/engine/host_cmd.cpp +++ b/rehlds/engine/host_cmd.cpp @@ -2433,6 +2433,7 @@ void Host_FullInfo_f(void) NOXREF void Host_KillVoice_f(void) { + NOXREFCHECK; Voice_Deinit(); } @@ -2809,6 +2810,7 @@ void Host_Stopdemo_f(void) NOXREF void Host_EndSection(const char *pszSection) { + NOXREFCHECK; giActive = DLL_PAUSED; giSubState = 1; giStateInfo = 1; diff --git a/rehlds/engine/model.cpp b/rehlds/engine/model.cpp index 21753c3..31fe4ce 100644 --- a/rehlds/engine/model.cpp +++ b/rehlds/engine/model.cpp @@ -180,6 +180,7 @@ model_t *Mod_FindName(qboolean trackCRC, const char *name) NOXREF qboolean Mod_ValidateCRC(const char *name, CRC32_t crc) { + NOXREFCHECK; model_t *mod; mod_known_info_t *p; @@ -196,6 +197,7 @@ NOXREF qboolean Mod_ValidateCRC(const char *name, CRC32_t crc) NOXREF void Mod_NeedCRC(const char *name, qboolean needCRC) { + NOXREFCHECK; model_t *mod; mod_known_info_t *p; @@ -356,6 +358,7 @@ model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean trackCRC) NOXREF void Mod_MarkClient(model_t *pModel) { + NOXREFCHECK; pModel->needload = (NL_NEEDS_LOADED | NL_UNREFERENCED); } @@ -1835,6 +1838,7 @@ void Mod_LoadSpriteModel(model_t *mod, void *buffer) NOXREF void Mod_UnloadSpriteTextures(model_t *pModel) { + NOXREFCHECK; if (!pModel) return; @@ -1874,6 +1878,7 @@ void Mod_Print(void) NOXREF void Mod_ChangeGame(void) { + NOXREFCHECK; int i; model_t *mod; mod_known_info_t *p; diff --git a/rehlds/engine/net_chan.cpp b/rehlds/engine/net_chan.cpp index efafa33..701cae0 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -1701,6 +1701,7 @@ qboolean Netchan_CopyFileFragments(netchan_t *chan) NOXREF qboolean Netchan_IsSending(netchan_t *chan) { + NOXREFCHECK; int i; for (i = 0; i < MAX_STREAMS; i++) { @@ -1712,6 +1713,7 @@ NOXREF qboolean Netchan_IsSending(netchan_t *chan) NOXREF qboolean Netchan_IsReceiving(netchan_t *chan) { + NOXREFCHECK; int i; for (i = 0; i < MAX_STREAMS; i++) { @@ -1733,6 +1735,7 @@ qboolean Netchan_IncomingReady(netchan_t *chan) NOXREF void Netchan_UpdateProgress(netchan_t *chan) { + NOXREFCHECK; fragbuf_t *p; int c = 0; int total = 0; @@ -1821,10 +1824,12 @@ void Netchan_Init(void) NOXREF qboolean Netchan_CompressPacket(sizebuf_t *chan) { + NOXREFCHECK; return FALSE; } NOXREF qboolean Netchan_DecompressPacket(sizebuf_t *chan) { + NOXREFCHECK; return FALSE; } diff --git a/rehlds/engine/pr_cmds.cpp b/rehlds/engine/pr_cmds.cpp index 4997b17..95f2089 100644 --- a/rehlds/engine/pr_cmds.cpp +++ b/rehlds/engine/pr_cmds.cpp @@ -2720,6 +2720,7 @@ void EXT_FUNC PF_GetPlayerStats(const edict_t *pClient, int *ping, int *packet_l NOXREF void QueryClientCvarValueCmd(void) { + NOXREFCHECK; if (Cmd_Argc() <= 1) { Con_Printf("%s \n", Cmd_Argv(0)); @@ -2742,6 +2743,7 @@ NOXREF void QueryClientCvarValueCmd(void) NOXREF void QueryClientCvarValueCmd2(void) { + NOXREFCHECK; int i; client_t *cl; int requestID; diff --git a/rehlds/engine/r_studio.cpp b/rehlds/engine/r_studio.cpp index 27ba9c4..c7255b2 100644 --- a/rehlds/engine/r_studio.cpp +++ b/rehlds/engine/r_studio.cpp @@ -128,6 +128,7 @@ r_studiocache_t *R_CheckStudioCache(model_t *pModel, float frame, int sequence, NOXREF void R_AddToStudioCache(float frame, int sequence, const vec_t *angles, const vec_t *origin, const vec_t *size, const unsigned char *controller, const unsigned char *pblending, model_t *pModel, hull_t *pHulls, int numhulls) { + NOXREFCHECK; r_studiocache_t *p; if (numhulls + nCurrentHull >= 128) R_FlushStudioCache(); @@ -685,6 +686,7 @@ int SV_HitgroupForStudioHull(int index) NOXREF void R_InitStudioCache(void) { + NOXREFCHECK; Q_memset(rgStudioCache, 0, sizeof(rgStudioCache)); r_cachecurrent = 0; @@ -694,6 +696,7 @@ NOXREF void R_InitStudioCache(void) NOXREF void R_FlushStudioCache(void) { + NOXREFCHECK; R_InitStudioCache(); } diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 47100fb..df43173 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -2700,6 +2700,7 @@ int SV_GetFakeClientCount(void) NOXREF qboolean SV_GetModInfo(char *pszInfo, char *pszDL, int *version, int *size, qboolean *svonly, qboolean *cldll, char *pszHLVersion) { + NOXREFCHECK; if (gmodinfo.bIsMod) { Q_strcpy(pszInfo, gmodinfo.szInfo); @@ -2727,11 +2728,13 @@ NOXREF qboolean SV_GetModInfo(char *pszInfo, char *pszDL, int *version, int *siz NOXREF qboolean RequireValidChallenge(netadr_t* /*adr*/) { + NOXREFCHECK; return sv_enableoldqueries.value == 0.0f; } NOXREF qboolean ValidInfoChallenge(netadr_t *adr, const char *nugget) { + NOXREFCHECK; if (nugget && g_psv.active && g_psvs.maxclients > 1) { if (RequireValidChallenge(adr)) @@ -2743,6 +2746,7 @@ NOXREF qboolean ValidInfoChallenge(netadr_t *adr, const char *nugget) NOXREF int GetChallengeNr(netadr_t *adr) { + NOXREFCHECK; int oldest = 0; int oldestTime = 0x7FFFFFFFu; int i; @@ -2770,6 +2774,7 @@ NOXREF int GetChallengeNr(netadr_t *adr) NOXREF qboolean CheckChallengeNr(netadr_t *adr, int nChallengeValue) { + NOXREFCHECK; int i; if (nChallengeValue == -1 || adr == NULL) return FALSE; @@ -2791,6 +2796,7 @@ NOXREF qboolean CheckChallengeNr(netadr_t *adr, int nChallengeValue) NOXREF void ReplyServerChallenge(netadr_t *adr) { + NOXREFCHECK; char buffer[16]; sizebuf_t buf; @@ -2808,6 +2814,7 @@ NOXREF void ReplyServerChallenge(netadr_t *adr) NOXREF qboolean ValidChallenge(netadr_t *adr, int challengeNr) { + NOXREFCHECK; if (!g_psv.active) return FALSE; @@ -2823,6 +2830,7 @@ NOXREF qboolean ValidChallenge(netadr_t *adr, int challengeNr) NOXREF void SVC_InfoString(void) { + NOXREFCHECK; int i; int count = 0; int proxy = 0; @@ -2936,6 +2944,7 @@ NOXREF void SVC_InfoString(void) NOXREF void SVC_Info(qboolean bDetailed) { + NOXREFCHECK; int i; int count = 0; sizebuf_t buf; @@ -3048,6 +3057,7 @@ typedef struct entcount_s NOXREF void SVC_PlayerInfo(void) { + NOXREFCHECK; int i; int count = 0; client_t *client; @@ -3096,6 +3106,7 @@ NOXREF void SVC_PlayerInfo(void) NOXREF void SVC_RuleInfo(void) { + NOXREFCHECK; int nNumRules; cvar_t *var; sizebuf_t buf; @@ -4438,6 +4449,7 @@ qboolean SV_ShouldUpdatePing(client_t *client) NOXREF qboolean SV_HasEventsInQueue(client_t *client) { + NOXREFCHECK; int i; event_state_t *es; event_info_t *ei; @@ -5523,6 +5535,7 @@ void SV_BuildReconnect(sizebuf_t *msg) NOXREF void SV_ReconnectAllClients(void) { + NOXREFCHECK; int i; char message[34]; Q_snprintf(message, sizeof(message), "Server updating Security Module.\n"); @@ -7991,6 +8004,7 @@ qboolean IsGameSubscribed(const char *gameName) NOXREF qboolean BIsValveGame(void) { + NOXREFCHECK; for (int i = 0; i < ARRAYSIZE(g_GameToAppIDMap); i++) { if (!Q_stricmp(g_GameToAppIDMap[i].pGameDir, com_gamedir)) diff --git a/rehlds/engine/sv_move.cpp b/rehlds/engine/sv_move.cpp index c4646cf..6426745 100644 --- a/rehlds/engine/sv_move.cpp +++ b/rehlds/engine/sv_move.cpp @@ -343,6 +343,7 @@ void SV_FixCheckBottom(edict_t *ent) NOXREF void SV_NewChaseDir(edict_t *actor, edict_t *enemy, float dist) { + NOXREFCHECK; float deltax; float deltay; float d[3]; @@ -420,6 +421,7 @@ NOXREF void SV_NewChaseDir(edict_t *actor, edict_t *enemy, float dist) NOXREF qboolean SV_CloseEnough(edict_t *ent, edict_t *goal, float dist) { + NOXREFCHECK; int i; for (i = 0; i < 3; i++) { @@ -433,6 +435,7 @@ NOXREF qboolean SV_CloseEnough(edict_t *ent, edict_t *goal, float dist) NOXREF qboolean SV_ReachedGoal(edict_t *ent, vec_t *vecGoal, float flDist) { + NOXREFCHECK; int i; for (i = 0; i < 3; i++) { diff --git a/rehlds/engine/sv_phys.cpp b/rehlds/engine/sv_phys.cpp index f0e5897..3382f7f 100644 --- a/rehlds/engine/sv_phys.cpp +++ b/rehlds/engine/sv_phys.cpp @@ -56,6 +56,7 @@ cvar_t sv_stopspeed; NOXREF void SV_CheckAllEnts(void) { + NOXREFCHECK; int e; edict_t *check; @@ -377,6 +378,7 @@ void SV_AddGravity(edict_t *ent) NOXREF void SV_AddCorrectGravity(edict_t *ent) { + NOXREFCHECK; float ent_gravity = 1.0f; if (ent->v.gravity != 0.0f) ent_gravity = ent->v.gravity; @@ -390,6 +392,7 @@ NOXREF void SV_AddCorrectGravity(edict_t *ent) NOXREF void SV_FixupGravityVelocity(edict_t *ent) { + NOXREFCHECK; float ent_gravity = 1.0f; if (ent->v.gravity != 0.0f) ent_gravity = ent->v.gravity; diff --git a/rehlds/engine/sys_dll.cpp b/rehlds/engine/sys_dll.cpp index 0615f1d..329ed09 100644 --- a/rehlds/engine/sys_dll.cpp +++ b/rehlds/engine/sys_dll.cpp @@ -292,6 +292,7 @@ NOINLINE void Sys_FPUCW_Pop_Prec64() { NOXREF void Sys_PageIn(void *ptr, int size) { + NOXREFCHECK; } // TODO: investigate filesystem_stdio problem (multiple enumeration of files). @@ -391,6 +392,7 @@ NOBODY int glob_match(char *pattern, char *text); NOXREF void Sys_MakeCodeWriteable(uint32 startaddr, uint32 length) { + NOXREFCHECK; #ifdef _WIN32 if (!VirtualProtect((LPVOID)startaddr, length, PAGE_EXECUTE_READWRITE, (PDWORD)&length)) Sys_Error("Protection change failed."); @@ -417,6 +419,7 @@ NOBODY void Sys_Init(void); NOXREF void Sys_Sleep(int msec) { + NOXREFCHECK; #ifdef _WIN32 Sleep(msec); #else @@ -501,6 +504,7 @@ void NORETURN Sys_Error(const char *error, ...) NOXREF void Sys_Warning(const char *pszWarning, ...) { + NOXREFCHECK; va_list argptr; char text[1024]; @@ -1172,6 +1176,7 @@ void EXT_FUNC AlertMessage(ALERT_TYPE atype, const char *szFmt, ...) NOXREF void Sys_SplitPath(const char *path, char *drive, char *dir, char *fname, char *ext) { + NOXREFCHECK; #ifdef _WIN32 _splitpath(path, drive, dir, fname, ext); #else // _WIN32 diff --git a/rehlds/engine/sys_dll.h b/rehlds/engine/sys_dll.h index f4fddb9..7940694 100644 --- a/rehlds/engine/sys_dll.h +++ b/rehlds/engine/sys_dll.h @@ -37,8 +37,12 @@ #include "cdll_int.h" +#define CONST_INTEGER_AS_STRING(x) #x //Wraps the integer in quotes, allowing us to form constant strings with it +#define __HACK_LINE_AS_STRING__(x) CONST_INTEGER_AS_STRING(x) //__LINE__ can only be converted to an actual number by going through this, otherwise the output is literally "__LINE__" +#define __LINE__AS_STRING __HACK_LINE_AS_STRING__(__LINE__) //Gives you the line number in constant string form + #ifdef _WIN32 -#define NOXREFCHECK __asm { push [ebp + 4] } Sys_Error(__FUNCTION__ " NOXREF, but called from 0x%.08x") +#define NOXREFCHECK __asm { push [ebp + 4] } Sys_Error("[NOXREFCHECK]:" __FUNCTION__ " (" __FILE__ ":"__LINE__AS_STRING") NOXREF, but called from 0x%.08x") #else #define NOXREFCHECK int *a = 0; *a = 0 #endif diff --git a/rehlds/engine/sys_dll2.cpp b/rehlds/engine/sys_dll2.cpp index d7c5fcd..5427499 100644 --- a/rehlds/engine/sys_dll2.cpp +++ b/rehlds/engine/sys_dll2.cpp @@ -78,11 +78,13 @@ const char *GetCurrentSteamAppName(void) NOXREF void SetRateRegistrySetting(const char *pchRate) { + NOXREFCHECK; registry->WriteString("rate", pchRate); } NOXREF const char *GetRateRegistrySetting(const char *pchDef) { + NOXREFCHECK; return registry->ReadString("rate", pchDef); } @@ -134,6 +136,7 @@ void Sys_GetCDKey(char *pszCDKey, int *nLength, int *bDedicated) NOXREF void Legacy_ErrorMessage(int nLevel, const char *pszErrorMessage) { + NOXREFCHECK; } void Legacy_Sys_Printf(char *fmt, ...) @@ -151,10 +154,12 @@ void Legacy_Sys_Printf(char *fmt, ...) NOXREF void Legacy_MP3subsys_Suspend_Audio(void) { + NOXREFCHECK; } NOXREF void Legacy_MP3subsys_Resume_Audio(void) { + NOXREFCHECK; } void Sys_SetupLegacyAPIs(void) @@ -166,8 +171,9 @@ void Sys_SetupLegacyAPIs(void) Launcher_ConsolePrintf = Legacy_Sys_Printf; } -NOXREF int Sys_IsWin95(void) +NOXREF qboolean Sys_IsWin95(void) { + NOXREFCHECK; #ifdef _WIN32 return g_bIsWin95; #else @@ -176,8 +182,9 @@ NOXREF int Sys_IsWin95(void) #endif // _WIN32 } -NOXREF int Sys_IsWin98(void) +NOXREF qboolean Sys_IsWin98(void) { + NOXREFCHECK; #ifdef _WIN32 return g_bIsWin98; #else @@ -189,13 +196,13 @@ NOXREF int Sys_IsWin98(void) #ifdef _WIN32 #pragma warning( push ) #pragma warning( disable : 4996 ) -NOXREF void Sys_CheckOSVersion(void) +void Sys_CheckOSVersion(void) { - struct _OSVERSIONINFOA verInfo; - + + OSVERSIONINFOA verInfo; Q_memset(&verInfo, 0, sizeof(verInfo)); verInfo.dwOSVersionInfoSize = sizeof(verInfo); - if (!GetVersionExA(&verInfo)) + if (!GetVersionEx(&verInfo)) Sys_Error("Couldn't get OS info"); g_WinNTOrHigher = verInfo.dwMajorVersion >= 4; @@ -204,11 +211,11 @@ NOXREF void Sys_CheckOSVersion(void) if (verInfo.dwMinorVersion) { if (verInfo.dwMinorVersion < 90) - g_bIsWin98 = 1; + g_bIsWin98 = TRUE; } else { - g_bIsWin95 = 1; + g_bIsWin95 = TRUE; } } } @@ -320,6 +327,7 @@ void Sys_InitArgv(char *lpCmdLine) NOXREF void Sys_ShutdownArgv(void) { + NOXREFCHECK; } void Sys_InitMemory(void) @@ -398,6 +406,7 @@ void Sys_InitLauncherInterface(void) NOXREF void Sys_ShutdownLauncherInterface(void) { + NOXREFCHECK; } void Sys_InitAuthentication(void) @@ -407,6 +416,7 @@ void Sys_InitAuthentication(void) NOXREF void Sys_ShutdownAuthentication(void) { + NOXREFCHECK; } void Sys_ShowProgressTicks(char *specialProgressMsg) @@ -588,6 +598,7 @@ InterfaceReg g_CreateCEngineAPI = InterfaceReg(CreateCEngineAPI, "VENGINE_LAUNCH /* NOXREF int BuildMapCycleListHints(char **hints) { + NOXREFCHECK; char szMap[262]; unsigned int length; char *pFileList; diff --git a/rehlds/engine/sys_dll2.h b/rehlds/engine/sys_dll2.h index 229bc87..ff10e92 100644 --- a/rehlds/engine/sys_dll2.h +++ b/rehlds/engine/sys_dll2.h @@ -96,11 +96,11 @@ void Legacy_Sys_Printf(char *fmt, ...); NOXREF void Legacy_MP3subsys_Suspend_Audio(); NOXREF void Legacy_MP3subsys_Resume_Audio(); void Sys_SetupLegacyAPIs(); -NOXREF int Sys_IsWin95(); -NOXREF int Sys_IsWin98(); +NOXREF qboolean Sys_IsWin95(); +NOXREF qboolean Sys_IsWin98(); #ifdef _WIN32 -NOXREF void Sys_CheckOSVersion(); +void Sys_CheckOSVersion(); #endif NOXREF void Sys_Init(); diff --git a/rehlds/engine/tmessage.cpp b/rehlds/engine/tmessage.cpp index 28044e2..118956d 100644 --- a/rehlds/engine/tmessage.cpp +++ b/rehlds/engine/tmessage.cpp @@ -147,6 +147,7 @@ int IsWhiteSpace(char space) NOXREF const char *SkipSpace(const char *pText) { + NOXREFCHECK; if (pText) { int pos = 0; @@ -160,6 +161,7 @@ NOXREF const char *SkipSpace(const char *pText) NOXREF const char *SkipText(const char *pText) { + NOXREFCHECK; if (pText) { int pos = 0; @@ -172,6 +174,7 @@ NOXREF const char *SkipText(const char *pText) NOXREF int ParseFloats(const char *pText, float *pFloat, int count) { + NOXREFCHECK; const char *pTemp = pText; int index = 0; @@ -226,6 +229,7 @@ void TrimSpace(const char *source, char *dest) NOXREF int IsToken(const char *pText, const char *pTokenName) { + NOXREFCHECK; if (!pText || !pTokenName) return 0; @@ -237,6 +241,7 @@ NOXREF int IsToken(const char *pText, const char *pTokenName) NOXREF int ParseDirective(const char *pText) { + NOXREFCHECK; if (pText && pText[0] == '$') { float tempFloat[8]; @@ -312,6 +317,7 @@ NOXREF int ParseDirective(const char *pText) NOXREF void TextMessageParse(unsigned char *pMemFile, int fileSize) { + NOXREFCHECK; char buf[512]; char trim[512]; char *pCurrentText; @@ -438,6 +444,7 @@ NOXREF void TextMessageParse(unsigned char *pMemFile, int fileSize) NOXREF void TextMessageShutdown(void) { + NOXREFCHECK; if (gMessageTable) { Mem_Free(gMessageTable); @@ -447,6 +454,7 @@ NOXREF void TextMessageShutdown(void) NOXREF void TextMessageInit(void) { + NOXREFCHECK; int fileSize; unsigned char *pMemFile; @@ -464,6 +472,7 @@ NOXREF void TextMessageInit(void) NOXREF client_textmessage_t *TextMessageGet(const char *pName) { + NOXREFCHECK; int i; #ifndef SWDS diff --git a/rehlds/engine/wad.cpp b/rehlds/engine/wad.cpp index 3e9af9f..edf8597 100644 --- a/rehlds/engine/wad.cpp +++ b/rehlds/engine/wad.cpp @@ -127,6 +127,7 @@ void *W_GetLumpName(int wad, char *name) NOXREF void *W_GetLumpNum(int wad, int num) { + NOXREFCHECK; lumpinfo_t *lump; if (num < 0 || num > wads[wad].wad_numlumps) Sys_Error("W_GetLumpNum: bad number: %i", num); diff --git a/rehlds/engine/world.cpp b/rehlds/engine/world.cpp index 0ee80ee..e369b37 100644 --- a/rehlds/engine/world.cpp +++ b/rehlds/engine/world.cpp @@ -60,6 +60,7 @@ void InsertLinkBefore(link_t *l, link_t *before) NOXREF void InsertLinkAfter(link_t *l, link_t *after) { + NOXREFCHECK; l->prev = after; l->next = after->next; @@ -101,6 +102,7 @@ hull_t *SV_HullForBox(const vec_t *mins, const vec_t *maxs) NOXREF hull_t *SV_HullForBeam(const vec_t *start, const vec_t *end, const vec_t *size) { + NOXREFCHECK; vec3_t tmp = { 0, 0, 0 }; beam_planes[0].normal[0] = end[0] - start[0]; diff --git a/rehlds/engine/zone.cpp b/rehlds/engine/zone.cpp index 1f1f7cb..c01c1d0 100644 --- a/rehlds/engine/zone.cpp +++ b/rehlds/engine/zone.cpp @@ -1082,6 +1082,7 @@ void Memory_Init(void *buf, int size) NOXREF void Cache_Print_Models_And_Totals(void) { + NOXREFCHECK; char buf[50]; cache_system_t *cd; cache_system_t *sortarray[512]; @@ -1121,6 +1122,7 @@ NOXREF void Cache_Print_Models_And_Totals(void) NOXREF void Cache_Print_Sounds_And_Totals(void) { + NOXREFCHECK; char buf[50]; cache_system_t *cd; cache_system_t *sortarray[1024]; diff --git a/rehlds/hookers/6132_hooker.cpp b/rehlds/hookers/6132_hooker.cpp index 853a309..3d55d23 100644 --- a/rehlds/hookers/6132_hooker.cpp +++ b/rehlds/hookers/6132_hooker.cpp @@ -831,7 +831,7 @@ FunctionHook g_FunctionHooks[] = //{ 0x01DA09C0, "_Z11Sys_IsWin95v", (size_t)&Sys_IsWin95 }, // NOXREF //{ 0x01DA09D0, "_Z11Sys_IsWin98v", (size_t)&Sys_IsWin98 }, // NOXREF #ifdef _WIN32 - //{ 0x, "_Z18Sys_CheckOSVersionv", (size_t)&Sys_CheckOSVersion }, // NOXREF + { 0x01DA09E0, "_Z18Sys_CheckOSVersionv", (size_t)&Sys_CheckOSVersion }, #endif //{ 0x, "Sys_Init", (size_t)&Sys_Init }, // NOXREF //{ 0x, "Sys_Shutdown", (size_t)&Sys_Shutdown }, // NOXREF