From c6a7ed096f5af7eade3bea82a80fb34bc62e3cee Mon Sep 17 00:00:00 2001 From: Evan Ramos Date: Mon, 20 Nov 2023 20:58:22 -0600 Subject: [PATCH] Blood: Add workaround for Cryptic Passage art naming in Fresh Supply data Fixes existing installs and the GOG version. --- source/blood/src/blood.cpp | 9 +++++++-- source/blood/src/common.cpp | 2 +- source/blood/src/common_game.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 053eeadf44..4d337782fa 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -1658,8 +1658,13 @@ int app_main(int argc, char const * const * argv) G_LoadGroups(!bNoAutoLoad && !gSetup.noautoload); - //if (!g_useCwd) - // G_CleanupSearchPaths(); + if (!g_useCwd) + { + G_CleanupSearchPaths(); + + if (strcmp(pINISelected->zName, "CRYPTIC.INI")) + removesearchpaths_withuser(SEARCHPATH_CRYPTIC); + } LOG_F(INFO, "Initializing OSD..."); diff --git a/source/blood/src/common.cpp b/source/blood/src/common.cpp index ad6186fc68..9838bf2f65 100644 --- a/source/blood/src/common.cpp +++ b/source/blood/src/common.cpp @@ -296,7 +296,7 @@ static int32_t Blood_Add_FS(char * const buf, size_t const size, size_t const ch buf[charsWritten] = '\0'; int32_t const addedmain = addsearchpath(buf); Bsnprintf(buf + charsWritten, size - charsWritten, "/addons/Cryptic Passage"); - addsearchpath(buf); + addsearchpath_user(buf, SEARCHPATH_CRYPTIC); return addedmain; } #endif diff --git a/source/blood/src/common_game.h b/source/blood/src/common_game.h index cc0e1e2e0a..a07ca7705e 100644 --- a/source/blood/src/common_game.h +++ b/source/blood/src/common_game.h @@ -548,6 +548,7 @@ enum BLOOD_GLOBALFLAGS { enum searchpathtypes_t { SEARCHPATH_REMOVE = 1<<0, + SEARCHPATH_CRYPTIC = 1<<1, }; extern char *g_grpNamePtr;