RTech: enforce naming consistency in define names

renamed PLATFORM_PAK_PATH and PLATFORM_PAK_OVERRIDE_PATH.
This commit is contained in:
Kawe Mazidjatari 2024-05-27 14:26:39 +02:00
parent adb3b66fa4
commit 6b0f3a2fdd
5 changed files with 15 additions and 15 deletions

View File

@ -80,11 +80,11 @@
// base pak directory containing paks sorted in platform specific subdirectories
#define PAK_BASE_PATH "paks\\"
#define PLATFORM_PAK_PATH PAK_BASE_PATH"Win64\\"
#define PAK_PLATFORM_PATH PAK_BASE_PATH"Win64\\"
// pak override directory; the system will looks for pak files in this directory
// first before falling back to PLATFORM_PAK_PATH
#define PLATFORM_PAK_OVERRIDE_PATH PAK_BASE_PATH"Win64_override\\"
// first before falling back to PAK_PLATFORM_PATH
#define PAK_PLATFORM_OVERRIDE_PATH PAK_BASE_PATH"Win64_override\\"
// the handle that should be returned when a pak failed to load or process
#define PAK_INVALID_HANDLE -1

View File

@ -23,7 +23,7 @@ int FS_OpenAsyncFile(const char* const filePath, const int logLevel, size_t* con
if (fileToLoad && *fileToLoad)
{
// is this a pak file and do we have an override
if (strstr(fileToLoad, PLATFORM_PAK_PATH) &&
if (strstr(fileToLoad, PAK_PLATFORM_PATH) &&
Pak_FileOverrideExists(fileToLoad, overridePath, sizeof(overridePath)))
{
fileToLoad = overridePath;

View File

@ -461,7 +461,7 @@ bool Pak_ProcessPakFile(PakFile_s* const pak)
return memoryData->patchSrcSize == 0;
char pakPatchPath[MAX_PATH] = {};
sprintf(pakPatchPath, PLATFORM_PAK_PATH"%s", pak->memoryData.fileName);
sprintf(pakPatchPath, PAK_PLATFORM_PATH"%s", pak->memoryData.fileName);
// get path of next patch rpak to load
if (pak->memoryData.patchIndices[pak->patchCount])

View File

@ -208,8 +208,8 @@ static void Pak_Decompress_f(const CCommand& args)
return;
}
CFmtStr1024 inPakFile(PLATFORM_PAK_PATH "%s", args.Arg(1));
CFmtStr1024 outPakFile(PLATFORM_PAK_OVERRIDE_PATH "%s", args.Arg(1));
CFmtStr1024 inPakFile(PAK_PLATFORM_PATH "%s", args.Arg(1));
CFmtStr1024 outPakFile(PAK_PLATFORM_OVERRIDE_PATH "%s", args.Arg(1));
if (!Pak_DecodePakFile(inPakFile.String(), outPakFile.String()))
{
@ -233,8 +233,8 @@ static void Pak_Compress_f(const CCommand& args)
return;
}
CFmtStr1024 inPakFile(PLATFORM_PAK_OVERRIDE_PATH "%s", args.Arg(1));
CFmtStr1024 outPakFile(PLATFORM_PAK_PATH "%s", args.Arg(1));
CFmtStr1024 inPakFile(PAK_PLATFORM_OVERRIDE_PATH "%s", args.Arg(1));
CFmtStr1024 outPakFile(PAK_PLATFORM_PATH "%s", args.Arg(1));
// NULL means default compress level
const int compressLevel = args.ArgC() > 2 ? atoi(args.Arg(2)) : NULL;

View File

@ -14,7 +14,7 @@
//----------------------------------------------------------------------------------
bool Pak_BasePathExists()
{
return IsDirectory(PLATFORM_PAK_PATH);
return IsDirectory(PAK_PLATFORM_PATH);
}
//----------------------------------------------------------------------------------
@ -26,7 +26,7 @@ bool Pak_CreateBasePath()
if (Pak_BasePathExists())
return true;
return CreateDirHierarchy(PLATFORM_PAK_PATH) == 0;
return CreateDirHierarchy(PAK_PLATFORM_PATH) == 0;
}
//----------------------------------------------------------------------------------
@ -34,7 +34,7 @@ bool Pak_CreateBasePath()
//----------------------------------------------------------------------------------
bool Pak_OverridePathExists()
{
return IsDirectory(PLATFORM_PAK_OVERRIDE_PATH);
return IsDirectory(PAK_PLATFORM_OVERRIDE_PATH);
}
//----------------------------------------------------------------------------------
@ -46,7 +46,7 @@ bool Pak_CreateOverridePath()
if (Pak_OverridePathExists())
return true;
return CreateDirHierarchy(PLATFORM_PAK_OVERRIDE_PATH) == 0;
return CreateDirHierarchy(PAK_PLATFORM_OVERRIDE_PATH) == 0;
}
//----------------------------------------------------------------------------------
@ -55,7 +55,7 @@ bool Pak_CreateOverridePath()
bool Pak_FileOverrideExists(const char* const pakFilePath, char* const outPath, const size_t outBufLen)
{
// check the overrides path
snprintf(outPath, outBufLen, PLATFORM_PAK_OVERRIDE_PATH"%s", V_UnqualifiedFileName(pakFilePath));
snprintf(outPath, outBufLen, PAK_PLATFORM_OVERRIDE_PATH"%s", V_UnqualifiedFileName(pakFilePath));
return FileExists(outPath);
}
@ -69,7 +69,7 @@ int Pak_FileExists(const char* const pakFilePath)
return true;
// check the platform's default path
snprintf(fullPath, sizeof(fullPath), PLATFORM_PAK_PATH"%s", pakFilePath);
snprintf(fullPath, sizeof(fullPath), PAK_PLATFORM_PATH"%s", pakFilePath);
return FileExists(fullPath);
}