From 6d94568f4b5e6e133dcea77f5af43b7b275e08db Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sun, 16 Dec 2018 16:07:47 -0500 Subject: [PATCH] Hide kart-specific addons behavior behind USE_KART --- src/doomdef.h | 3 +++ src/filesrch.c | 6 +++++- src/filesrch.h | 2 ++ src/m_menu.c | 4 ++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/doomdef.h b/src/doomdef.h index 796221c9..da5ddb5f 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -161,6 +161,9 @@ extern FILE *logstream; // Comment or uncomment this as necessary. #define USE_PATCH_DTA +// Use .kart extension addons +//#define USE_KART + // Modification options // If you want to take advantage of the Master Server's ability to force clients to update // to the latest version, fill these out. Otherwise, just comment out UPDATE_ALERT and leave diff --git a/src/filesrch.c b/src/filesrch.c index e71b39d9..0276e1c9 100644 --- a/src/filesrch.c +++ b/src/filesrch.c @@ -552,7 +552,11 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want char exttable[NUM_EXT_TABLE][7] = { // maximum extension length (currently 4) plus 3 (null terminator, stop, and length including previous two) "\5.txt", "\5.cfg", // exec - "\5.wad", "\6.kart", "\5.pk3", "\5.soc", "\5.lua"}; // addfile + "\5.wad", +#ifdef USE_KART + "\6.kart", +#endif + "\5.pk3", "\5.soc", "\5.lua"}; // addfile char filenamebuf[MAX_WADFILES][MAX_WADPATH]; diff --git a/src/filesrch.h b/src/filesrch.h index 94c43ffa..4186271b 100644 --- a/src/filesrch.h +++ b/src/filesrch.h @@ -55,7 +55,9 @@ typedef enum EXT_CFG, EXT_LOADSTART, EXT_WAD = EXT_LOADSTART, +#ifdef USE_KART EXT_KART, +#endif EXT_PK3, EXT_SOC, EXT_LUA, // allowed even if not HAVE_BLUA so that we can yell on load attempt diff --git a/src/m_menu.c b/src/m_menu.c index 5aad3589..b5161259 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3987,7 +3987,9 @@ static void M_Addons(INT32 choice) addonsp[EXT_TXT] = W_CachePatchName("M_FTXT", PU_STATIC); addonsp[EXT_CFG] = W_CachePatchName("M_FCFG", PU_STATIC); addonsp[EXT_WAD] = W_CachePatchName("M_FWAD", PU_STATIC); +#ifdef USE_KART addonsp[EXT_KART] = W_CachePatchName("M_FKART", PU_STATIC); +#endif addonsp[EXT_PK3] = W_CachePatchName("M_FPK3", PU_STATIC); addonsp[EXT_SOC] = W_CachePatchName("M_FSOC", PU_STATIC); addonsp[EXT_LUA] = W_CachePatchName("M_FLUA", PU_STATIC); @@ -4434,7 +4436,9 @@ static void M_HandleAddons(INT32 choice) // else intentional fallthrough case EXT_SOC: case EXT_WAD: +#ifdef USE_KART case EXT_KART: +#endif case EXT_PK3: COM_BufAddText(va("addfile \"%s%s\"", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING)); break;