Fixes from toaster, plus some other things

This commit is contained in:
wolfy852 2017-10-07 14:48:49 -05:00
parent f61755dd67
commit efb30f93ab
3 changed files with 7 additions and 1 deletions

View File

@ -520,7 +520,7 @@ filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *want
char exttable[NUM_EXT_TABLE][5] = {
".txt", ".cfg", // exec
".wad", ".soc", ".lua"}; // addfile
".wad", ".pk3", ".soc", ".lua"}; // addfile
char filenamebuf[MAX_WADFILES][MAX_WADPATH];

View File

@ -54,6 +54,7 @@ typedef enum
EXT_CFG,
EXT_LOADSTART,
EXT_WAD = EXT_LOADSTART,
EXT_PK3,
EXT_SOC,
EXT_LUA, // allowed even if not HAVE_BLUA so that we can yell on load attempt
NUM_EXT,

View File

@ -64,6 +64,9 @@
// And just some randomness for the exits.
#include "m_random.h"
// P_GetSkinSprite2
#include "r_things.h"
#ifdef PC_DOS
#include <stdio.h> // for snprintf
int snprintf(char *str, size_t n, const char *fmt, ...);
@ -4758,6 +4761,7 @@ 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);
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);
addonsp[NUM_EXT] = W_CachePatchName("M_FUNKN", PU_STATIC);
@ -5165,6 +5169,7 @@ static void M_HandleAddons(INT32 choice)
// else intentional fallthrough
case EXT_SOC:
case EXT_WAD:
case EXT_PK3:
COM_BufAddText(va("addfile %s%s", menupath, dirmenu[dir_on[menudepthleft]]+DIR_STRING));
addonsresponselimit = 5;
break;