diff --git a/r5dev/public/rtech/ipakfile.h b/r5dev/public/rtech/ipakfile.h index 70a3d564..aedbbb72 100644 --- a/r5dev/public/rtech/ipakfile.h +++ b/r5dev/public/rtech/ipakfile.h @@ -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 diff --git a/r5dev/rtech/async/asyncio.cpp b/r5dev/rtech/async/asyncio.cpp index 0c945233..05cc7cb8 100644 --- a/r5dev/rtech/async/asyncio.cpp +++ b/r5dev/rtech/async/asyncio.cpp @@ -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; diff --git a/r5dev/rtech/pak/pakparse.cpp b/r5dev/rtech/pak/pakparse.cpp index 9b45d991..bc81c767 100644 --- a/r5dev/rtech/pak/pakparse.cpp +++ b/r5dev/rtech/pak/pakparse.cpp @@ -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]) diff --git a/r5dev/rtech/pak/pakstate.cpp b/r5dev/rtech/pak/pakstate.cpp index 16d7aa23..0a51cd5b 100644 --- a/r5dev/rtech/pak/pakstate.cpp +++ b/r5dev/rtech/pak/pakstate.cpp @@ -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; diff --git a/r5dev/rtech/pak/paktools.cpp b/r5dev/rtech/pak/paktools.cpp index 7ed1e409..5283597d 100644 --- a/r5dev/rtech/pak/paktools.cpp +++ b/r5dev/rtech/pak/paktools.cpp @@ -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); }