Merge remote-tracking branch 'origin/master' into vulkan2
This commit is contained in:
commit
73efe707ac
119 changed files with 1085 additions and 54 deletions
|
|
@ -132,9 +132,7 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
|
|||
do
|
||||
{
|
||||
sc.MustGetString();
|
||||
if(sc.Compare("NoTextcolor")) iwad->flags |= GI_NOTEXTCOLOR;
|
||||
else if (sc.Compare("NoBigFont")) iwad->flags |= GI_IGNOREBIGFONTLUMP;
|
||||
else if(sc.Compare("Poly1")) iwad->flags |= GI_COMPATPOLY1;
|
||||
if(sc.Compare("Poly1")) iwad->flags |= GI_COMPATPOLY1;
|
||||
else if(sc.Compare("Poly2")) iwad->flags |= GI_COMPATPOLY2;
|
||||
else if(sc.Compare("Shareware")) iwad->flags |= GI_SHAREWARE;
|
||||
else if(sc.Compare("Teaser2")) iwad->flags |= GI_TEASER2;
|
||||
|
|
|
|||
|
|
@ -2388,7 +2388,7 @@ void D_DoomMain (void)
|
|||
}
|
||||
|
||||
if (!batchrun) Printf ("W_Init: Init WADfiles.\n");
|
||||
Wads.InitMultipleFiles (allwads);
|
||||
Wads.InitMultipleFiles (allwads, iwad_info->DeleteLumps);
|
||||
allwads.Clear();
|
||||
allwads.ShrinkToFit();
|
||||
SetMapxxFlag();
|
||||
|
|
|
|||
|
|
@ -489,12 +489,6 @@ int userinfo_t::PlayerClassChanged(const char *classname)
|
|||
return classnum;
|
||||
}
|
||||
|
||||
int userinfo_t::PlayerClassNumChanged(int classnum)
|
||||
{
|
||||
*static_cast<FIntCVar *>((*this)[NAME_PlayerClass]) = classnum;
|
||||
return classnum;
|
||||
}
|
||||
|
||||
int userinfo_t::ColorSetChanged(int setnum)
|
||||
{
|
||||
*static_cast<FIntCVar *>((*this)[NAME_ColorSet]) = setnum;
|
||||
|
|
|
|||
|
|
@ -264,8 +264,7 @@ struct userinfo_t : TMap<FName,FBaseCVar *>
|
|||
int SkinNumChanged(int skinnum);
|
||||
int GenderChanged(const char *gendername);
|
||||
int PlayerClassChanged(const char *classname);
|
||||
int PlayerClassNumChanged(int classnum);
|
||||
uint32_t ColorChanged(const char *colorname);
|
||||
uint32_t ColorChanged(const char *colorname);
|
||||
uint32_t ColorChanged(uint32_t colorval);
|
||||
int ColorSetChanged(int setnum);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1169,15 +1169,6 @@ void V_InitFontColors ()
|
|||
|
||||
while ((lump = Wads.FindLump ("TEXTCOLO", &lastlump)) != -1)
|
||||
{
|
||||
if (gameinfo.flags & GI_NOTEXTCOLOR)
|
||||
{
|
||||
// Chex3 contains a bad TEXTCOLO lump, probably to force all text to be green.
|
||||
// This renders the Gray, Gold, Red and Yellow color range inoperable, some of
|
||||
// which are used by the menu. So we have no choice but to skip this lump so that
|
||||
// all colors work properly.
|
||||
// The text colors should be the end user's choice anyway.
|
||||
if (Wads.GetLumpFile(lump) == Wads.GetIwadNum()) continue;
|
||||
}
|
||||
FScanner sc(lump);
|
||||
while (sc.GetString())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2059,6 +2059,8 @@ void FMapInfoParser::ParseEpisodeInfo ()
|
|||
ParseAssign();
|
||||
sc.MustGetString ();
|
||||
pic = sc.String;
|
||||
// If no name has been specified, synthesize a string table reference with the same name as the patch.
|
||||
if (name.IsEmpty()) name.Format("$%s", sc.String);
|
||||
}
|
||||
else if (sc.Compare ("remove"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@ enum
|
|||
GI_COMPATSTAIRS = 0x00000020, // same for stairbuilding
|
||||
GI_COMPATPOLY1 = 0x00000040, // Hexen's MAP36 needs old polyobject drawing
|
||||
GI_COMPATPOLY2 = 0x00000080, // so does HEXDD's MAP47
|
||||
GI_NOTEXTCOLOR = 0x00000100, // Chex Quest 3 would have everything green
|
||||
GI_IGNORETITLEPATCHES = 0x00000200, // Ignore the map name graphics when not runnning in English language
|
||||
GI_IGNOREBIGFONTLUMP = 0x00000400, // Needed for Chex Quest 3, so that the extended internal font can be used instead.
|
||||
};
|
||||
|
||||
#include "gametype.h"
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ void FWadCollection::DeleteAll ()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FWadCollection::InitMultipleFiles (TArray<FString> &filenames)
|
||||
void FWadCollection::InitMultipleFiles (TArray<FString> &filenames, const TArray<FString> &deletelumps)
|
||||
{
|
||||
int numfiles;
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ void FWadCollection::InitMultipleFiles (TArray<FString> &filenames)
|
|||
I_FatalError ("W_InitMultipleFiles: no files found");
|
||||
}
|
||||
RenameNerve();
|
||||
RenameSprites();
|
||||
RenameSprites(deletelumps);
|
||||
FixMacHexen();
|
||||
|
||||
// [RH] Set up hash table
|
||||
|
|
@ -755,7 +755,7 @@ void FWadCollection::InitHashChains (void)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FWadCollection::RenameSprites ()
|
||||
void FWadCollection::RenameSprites (const TArray<FString> &deletelumps)
|
||||
{
|
||||
bool renameAll;
|
||||
bool MNTRZfound = false;
|
||||
|
|
@ -894,16 +894,14 @@ void FWadCollection::RenameSprites ()
|
|||
}
|
||||
else if (LumpInfo[i].lump->Namespace == ns_global)
|
||||
{
|
||||
// Rename the game specific big font lumps so that the font manager does not have to do problematic special checks for them.
|
||||
if (!strcmp(LumpInfo[i].lump->Name, altbigfont))
|
||||
strcpy(LumpInfo[i].lump->Name, "BIGFONT");
|
||||
|
||||
if (LumpInfo[i].wadnum == GetIwadNum() && gameinfo.flags & GI_IGNOREBIGFONTLUMP)
|
||||
if (LumpInfo[i].wadnum == GetIwadNum() && deletelumps.Find(LumpInfo[i].lump->Name) < deletelumps.Size())
|
||||
{
|
||||
if (!strcmp(LumpInfo[i].lump->Name, "BIGFONT"))
|
||||
{
|
||||
LumpInfo[i].lump->Name[0] = 0;
|
||||
}
|
||||
LumpInfo[i].lump->Name[0] = 0; // Lump must be deleted from directory.
|
||||
}
|
||||
// Rename the game specific big font lumps so that the font manager does not have to do problematic special checks for them.
|
||||
else if (!strcmp(LumpInfo[i].lump->Name, altbigfont))
|
||||
{
|
||||
strcpy(LumpInfo[i].lump->Name, "BIGFONT");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public:
|
|||
int GetIwadNum() { return IwadIndex; }
|
||||
void SetIwadNum(int x) { IwadIndex = x; }
|
||||
|
||||
void InitMultipleFiles (TArray<FString> &filenames);
|
||||
void InitMultipleFiles (TArray<FString> &filenames, const TArray<FString> &deletelumps);
|
||||
void AddFile (const char *filename, FileReader *wadinfo = NULL);
|
||||
int CheckIfWadLoaded (const char *name);
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ protected:
|
|||
void InitHashChains (); // [RH] Set up the lumpinfo hashing
|
||||
|
||||
private:
|
||||
void RenameSprites();
|
||||
void RenameSprites(const TArray<FString> &deletelumps);
|
||||
void RenameNerve();
|
||||
void FixMacHexen();
|
||||
void DeleteAll();
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE)
|
|||
CVAR (Int, m_showinputgrid, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, m_blockcontrollers, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
|
||||
CVAR (Float, snd_menuvolume, 0.6f, CVAR_ARCHIVE)
|
||||
CVAR(Int, m_use_mouse, 2, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CVAR(Int, m_show_backbutton, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
|
|
@ -518,6 +517,10 @@ void M_SetMenu(FName menu, int param)
|
|||
void ActivateEndGameMenu();
|
||||
ActivateEndGameMenu();
|
||||
return;
|
||||
|
||||
case NAME_Playermenu:
|
||||
menu = NAME_NewPlayerMenu; // redirect the old player menu to the new one.
|
||||
break;
|
||||
}
|
||||
|
||||
// End of special checks
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
#include "i_system.h"
|
||||
#include "v_video.h"
|
||||
#include "gstrings.h"
|
||||
#include "teaminfo.h"
|
||||
#include "r_data/sprites.h"
|
||||
|
||||
|
||||
void ClearSaveGames();
|
||||
|
|
@ -1543,6 +1545,95 @@ void M_CreateMenus()
|
|||
{
|
||||
I_BuildALResamplersList(*opt);
|
||||
}
|
||||
opt = OptionValues.CheckKey(NAME_PlayerTeam);
|
||||
if (opt != nullptr)
|
||||
{
|
||||
auto op = *opt;
|
||||
op->mValues.Resize(Teams.Size() + 1);
|
||||
op->mValues[0].Value = 0;
|
||||
op->mValues[0].Text = "$OPTVAL_NONE";
|
||||
for (unsigned i = 0; i < Teams.Size(); i++)
|
||||
{
|
||||
op->mValues[i+1].Value = i+1;
|
||||
op->mValues[i+1].Text = Teams[i].GetName();
|
||||
}
|
||||
}
|
||||
opt = OptionValues.CheckKey(NAME_PlayerClass);
|
||||
if (opt != nullptr)
|
||||
{
|
||||
auto op = *opt;
|
||||
int o = 0;
|
||||
if (!gameinfo.norandomplayerclass && PlayerClasses.Size() > 1)
|
||||
{
|
||||
op->mValues.Resize(PlayerClasses.Size()+1);
|
||||
op->mValues[0].Value = -1;
|
||||
op->mValues[0].Text = "$MNU_RANDOM";
|
||||
o = 1;
|
||||
}
|
||||
else op->mValues.Resize(PlayerClasses.Size());
|
||||
for (unsigned i = 0; i < PlayerClasses.Size(); i++)
|
||||
{
|
||||
op->mValues[i+o].Value = i;
|
||||
op->mValues[i+o].Text = GetPrintableDisplayName(PlayerClasses[i].Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DMenu, UpdateColorsets)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_POINTER(playerClass, FPlayerClass);
|
||||
|
||||
TArray<int> PlayerColorSets;
|
||||
|
||||
EnumColorSets(playerClass->Type, &PlayerColorSets);
|
||||
|
||||
auto opt = OptionValues.CheckKey(NAME_PlayerColors);
|
||||
if (opt != nullptr)
|
||||
{
|
||||
auto op = *opt;
|
||||
op->mValues.Resize(PlayerColorSets.Size() + 1);
|
||||
op->mValues[0].Value = -1;
|
||||
op->mValues[0].Text = "$OPTVAL_CUSTOM";
|
||||
for (unsigned i = 0; i < PlayerColorSets.Size(); i++)
|
||||
{
|
||||
auto cset = GetColorSet(playerClass->Type, PlayerColorSets[i]);
|
||||
op->mValues[i + 1].Value = PlayerColorSets[i];
|
||||
op->mValues[i + 1].Text = cset? cset->Name.GetChars() : "?"; // The null case should never happen here.
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(DMenu, UpdateSkinOptions)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_POINTER(playerClass, FPlayerClass);
|
||||
|
||||
auto opt = OptionValues.CheckKey(NAME_PlayerSkin);
|
||||
if (opt != nullptr)
|
||||
{
|
||||
auto op = *opt;
|
||||
|
||||
if ((GetDefaultByType(playerClass->Type)->flags4 & MF4_NOSKIN) || players[consoleplayer].userinfo.GetPlayerClassNum() == -1)
|
||||
{
|
||||
op->mValues.Resize(1);
|
||||
op->mValues[0].Value = -1;
|
||||
op->mValues[0].Text = "$OPTVAL_DEFAULT";
|
||||
}
|
||||
else
|
||||
{
|
||||
op->mValues.Clear();
|
||||
for (unsigned i = 0; i < Skins.Size(); i++)
|
||||
{
|
||||
op->mValues.Reserve(1);
|
||||
op->mValues.Last().Value = i;
|
||||
op->mValues.Last().Text = Skins[i].Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
|||
|
|
@ -133,8 +133,9 @@ DEFINE_ACTION_FUNCTION(DPlayerMenu, ClassChanged)
|
|||
PARAM_POINTER(cls, FPlayerClass);
|
||||
if (DMenu::InMenu)
|
||||
{
|
||||
players[consoleplayer].userinfo.PlayerClassNumChanged(gameinfo.norandomplayerclass ? sel : sel - 1);
|
||||
cvar_set("playerclass", sel == 0 && !gameinfo.norandomplayerclass ? "Random" : GetPrintableDisplayName(cls->Type).GetChars());
|
||||
const char *pclass = sel == -1 ? "Random" : GetPrintableDisplayName(cls->Type).GetChars();
|
||||
players[consoleplayer].userinfo.PlayerClassChanged(pclass);
|
||||
cvar_set("playerclass", pclass);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1380,6 +1380,7 @@ void P_PredictPlayer (player_t *player)
|
|||
|
||||
act->flags &= ~MF_PICKUP;
|
||||
act->flags2 &= ~MF2_PUSHWALL;
|
||||
act->renderflags &= ~RF_NOINTERPOLATEVIEW;
|
||||
player->cheats |= CF_PREDICTING;
|
||||
|
||||
BackupNodeList(act, act->touching_sectorlist, §or_t::touching_thinglist, PredictionTouchingSectors_sprev_Backup, PredictionTouchingSectorsBackup);
|
||||
|
|
|
|||
|
|
@ -1083,3 +1083,7 @@ xx(MapMarker)
|
|||
xx(Spawn2)
|
||||
xx(LevelLocals)
|
||||
xx(Level)
|
||||
xx(PlayerTeam)
|
||||
xx(PlayerColors)
|
||||
xx(PlayerSkin)
|
||||
xx(NewPlayerMenu)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue