Hide kart-specific addons behavior behind USE_KART

This commit is contained in:
mazmazz 2018-12-16 16:07:47 -05:00
parent c3ff0b6d16
commit 6d94568f4b
4 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -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];

View File

@ -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

View File

@ -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;