Merge remote-tracking branch 'origin/master' into vulkan2

This commit is contained in:
Magnus Norddahl 2019-03-03 13:45:22 +01:00
commit 7d56aa4b0b
518 changed files with 140 additions and 65 deletions

View File

@ -133,6 +133,7 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
{
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;
else if(sc.Compare("Poly2")) iwad->flags |= GI_COMPATPOLY2;
else if(sc.Compare("Shareware")) iwad->flags |= GI_SHAREWARE;

View File

@ -280,7 +280,8 @@ class player_t
public:
player_t() = default;
~player_t();
player_t &operator= (const player_t &p);
player_t &operator= (const player_t &p) = delete;
void CopyFrom(player_t &src, bool copyPSP);
void Serialize(FSerializer &arc);
size_t PropagateMark();

View File

@ -1016,6 +1016,29 @@ public:
CPlayer = player;
}
void SetReferences()
{
if (CPlayer->ReadyWeapon != nullptr)
{
ammo1 = CPlayer->ReadyWeapon->PointerVar<AActor>(NAME_Ammo1);
ammo2 = CPlayer->ReadyWeapon->PointerVar<AActor>(NAME_Ammo2);
if (ammo1 == nullptr)
{
ammo1 = ammo2;
ammo2 = nullptr;
}
}
else
{
ammo1 = ammo2 = nullptr;
}
ammocount1 = ammo1 != nullptr ? ammo1->IntVar(NAME_Amount) : 0;
ammocount2 = ammo2 != nullptr ? ammo2->IntVar(NAME_Amount) : 0;
//prepare ammo counts
armor = CPlayer->mo->FindInventory(NAME_BasicArmor);
}
void _Draw (EHudState state)
{
int hud = STBAR_NORMAL;
@ -1040,25 +1063,7 @@ public:
}
wrapper->ForceHUDScale(script->huds[hud]->ForceScaled());
if (CPlayer->ReadyWeapon != nullptr)
{
ammo1 = CPlayer->ReadyWeapon->PointerVar<AActor>(NAME_Ammo1);
ammo2 = CPlayer->ReadyWeapon->PointerVar<AActor>(NAME_Ammo2);
if (ammo1 == nullptr)
{
ammo1 = ammo2;
ammo2 = nullptr;
}
}
else
{
ammo1 = ammo2 = nullptr;
}
ammocount1 = ammo1 != nullptr ? ammo1->IntVar(NAME_Amount) : 0;
ammocount2 = ammo2 != nullptr ? ammo2->IntVar(NAME_Amount) : 0;
//prepare ammo counts
armor = CPlayer->mo->FindInventory(NAME_BasicArmor);
SetReferences();
if(state != HUD_AltHud)
{
@ -1113,6 +1118,9 @@ public:
else
lastPopup = NULL;
// These may not live any longer than beyond here!
ammo1 = ammo2 = nullptr;
armor = nullptr;
}
void _NewGame ()
@ -1129,6 +1137,7 @@ public:
void _Tick ()
{
SetReferences();
if(currentPopup != DBaseStatusBar::POP_None)
{
script->popups[currentPopup-1].tick();
@ -1146,6 +1155,10 @@ public:
script->huds[lastHud]->Tick(NULL, this, false);
if(lastInventoryBar != NULL && CPlayer->inventorytics > 0)
lastInventoryBar->Tick(NULL, this, false);
// These may not live any longer than beyond here!
ammo1 = ammo2 = nullptr;
armor = nullptr;
}
void _ShowPop(int popnum)

View File

@ -50,6 +50,7 @@ enum
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"

View File

@ -897,6 +897,15 @@ void FWadCollection::RenameSprites ()
// 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 (!strcmp(LumpInfo[i].lump->Name, "BIGFONT"))
{
LumpInfo[i].lump->Name[0] = 0;
}
}
}
}
}

View File

@ -813,8 +813,7 @@ void FLevelLocals::CopyPlayer(player_t *dst, player_t *src, const char *name)
bool attackdown = dst->attackdown;
bool usedown = dst->usedown;
*dst = *src; // To avoid memory leaks at this point the userinfo in src must be empty which is taken care of by the TransferFrom call above.
dst->CopyFrom(*src, true); // To avoid memory leaks at this point the userinfo in src must be empty which is taken care of by the TransferFrom call above.
dst->cheats |= chasecam;
@ -857,9 +856,6 @@ void FLevelLocals::CopyPlayer(player_t *dst, player_t *src, const char *name)
pspr = pspr->Next;
}
// Don't let the psprites be destroyed when src is destroyed.
src->psprites = nullptr;
// These 2 variables may not be overwritten.
dst->attackdown = attackdown;
dst->usedown = usedown;

View File

@ -259,7 +259,7 @@ player_t::~player_t()
DestroyPSprites();
}
player_t &player_t::operator=(const player_t &p)
void player_t::CopyFrom(player_t &p, bool copyPSP)
{
mo = p.mo;
playerstate = p.playerstate;
@ -312,7 +312,6 @@ player_t &player_t::operator=(const player_t &p)
extralight = p.extralight;
fixedcolormap = p.fixedcolormap;
fixedlightlevel = p.fixedlightlevel;
psprites = p.psprites;
morphTics = p.morphTics;
MorphedPlayerClass = p.MorphedPlayerClass;
MorphStyle = p.MorphStyle;
@ -346,7 +345,13 @@ player_t &player_t::operator=(const player_t &p)
ConversationFaceTalker = p.ConversationFaceTalker;
MUSINFOactor = p.MUSINFOactor;
MUSINFOtics = p.MUSINFOtics;
return *this;
if (copyPSP)
{
// This needs to transfer ownership completely.
psprites = p.psprites;
p.psprites = nullptr;
}
else psprites = nullptr;
}
size_t player_t::PropagateMark()
@ -1369,7 +1374,7 @@ void P_PredictPlayer (player_t *player)
}
// Save original values for restoration later
PredictionPlayerBackup = *player;
PredictionPlayerBackup.CopyFrom(*player, false);
auto act = player->mo;
PredictionActor = player->mo;
@ -1494,7 +1499,7 @@ void P_UnPredictPlayer ()
int inventorytics = player->inventorytics;
const bool settings_controller = player->settings_controller;
*player = PredictionPlayerBackup;
player->CopyFrom(PredictionPlayerBackup, false);
player->settings_controller = settings_controller;
// Restore the camera instead of using the backup's copy, because spynext/prev

View File

@ -58,6 +58,7 @@ void GLViewpointBuffer::CheckSize()
mBufferSize *= 2;
mByteSize *= 2;
mBuffer->Resize(mByteSize);
m2DHeight = m2DWidth = -1;
}
}

View File

@ -104,7 +104,7 @@ IWad
Config = "Chex"
IWADName = "chex3.wad"
Mapinfo = "mapinfo/chex.txt"
Compatibility = "NoTextcolor"
Compatibility = "NoTextcolor", "NoBigFont"
MustContain = "E1M1", "CYCLA1", "FLMBA1", "MAPINFO"
BannerColors = "ff ff 00", "00 c0 00"
}

View File

@ -36,8 +36,8 @@ gameinfo
weaponslot = 5, "ZorchPropulsor"
weaponslot = 6, "PhasingZorcher"
weaponslot = 7, "LAZDevice"
dimcolor = "ff d7 00"
dimamount = 0.2
dimcolor = "1a 30 00"
dimamount = 0.5
bluramount = 0.0
menuslidercolor = "Orange"
definventorymaxamount = 25

View File

@ -36,8 +36,8 @@ gameinfo
weaponslot = 5, "RocketLauncher"
weaponslot = 6, "PlasmaRifle"
weaponslot = 7, "BFG9000"
dimcolor = "ff d7 00"
dimamount = 0.2
dimcolor = "30 26 00"
dimamount = 0.5
bluramount = 0.0
menuslidercolor = "Orange"
definventorymaxamount = 25

View File

@ -36,8 +36,8 @@ gameinfo
weaponslot = 5, "SkullRod"
weaponslot = 6, "PhoenixRod"
weaponslot = 7, "Mace"
dimcolor = "00 00 ff"
dimamount = 0.2
dimcolor = "00 00 40"
dimamount = 0.5
bluramount = 0
menuslidercolor = "Orange"
definventorymaxamount = 16

View File

@ -35,8 +35,8 @@ gameinfo
weaponslot = 2, "FWeapAxe", "CWeapStaff", "MWeapFrost"
weaponslot = 3, "FWeapHammer", "CWeapFlame", "MWeapLightning"
weaponslot = 4, "FWeapQuietus", "CWeapWraithverge", "MWeapBloodscourge"
dimcolor = "00 00 ff"
dimamount = 0.2
dimcolor = "00 00 40"
dimamount = 0.5
bluramount = 0.0
menuslidercolor = "Orange"
definventorymaxamount = 25

View File

@ -36,8 +36,8 @@ gameinfo
weaponslot = 6, "FlameThrower"
weaponslot = 7, "Mauler2", "Mauler"
weaponslot = 8, "Sigil"
dimcolor = "ff d7 00"
dimamount = 0.2
dimcolor = "30 26 00"
dimamount = 0.5
bluramount = 0
menuslidercolor = "Orange"
definventorymaxamount = 25

View File

@ -1281,6 +1281,10 @@ OptionMenu MapColorMenu protected
Title "$MAPCOLORMNU_TITLE"
SafeCommand "$MAPCOLORMNU_DEFAULTMAPCOLORS", "am_restorecolors"
StaticText " "
Submenu "$MAPCOLORMNU_CHEATMODE", "MapColorMenuCheats"
Submenu "$MAPCOLORMNU_OVERLAY", "MapColorMenuOverlay"
Submenu "$MAPCOLORMNU_OVCHEATMODE", "MapColorMenuCheatsOverlay"
StaticText " "
ColorPicker "$MAPCOLORMNU_BACKCOLOR", "am_backcolor"
ColorPicker "$MAPCOLORMNU_YOURCOLOR", "am_yourcolor"
ColorPicker "$MAPCOLORMNU_WALLCOLOR", "am_wallcolor"
@ -1297,8 +1301,11 @@ OptionMenu MapColorMenu protected
ColorPicker "$MAPCOLORMNU_UNEXPLOREDSECRETCOLOR", "am_unexploredsecretcolor"
ColorPicker "$MAPCOLORMNU_SPECIALWALLCOLOR", "am_specialwallcolor"
ColorPicker "$MAPCOLORMNU_PORTAL", "am_portalcolor"
StaticText " "
StaticText "$MAPCOLORMNU_CHEATMODE", 1
}
OptionMenu MapColorMenuCheats protected
{
Title "$MAPCOLORMNU_CHEATMODE"
ColorPicker "$MAPCOLORMNU_TSWALLCOLOR", "am_tswallcolor"
ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR", "am_secretwallcolor"
ColorPicker "$MAPCOLORMNU_THINGCOLOR", "am_thingcolor"
@ -1307,8 +1314,11 @@ OptionMenu MapColorMenu protected
ColorPicker "$MAPCOLORMNU_FRIENDCOLOR", "am_thingcolor_friend"
ColorPicker "$MAPCOLORMNU_ITEMCOLOR", "am_thingcolor_item"
ColorPicker "$MAPCOLORMNU_COUNTITEMCOLOR", "am_thingcolor_citem"
StaticText " "
StaticText "$MAPCOLORMNU_OVERLAY", 1
}
OptionMenu MapColorMenuOverlay protected
{
Title "$MAPCOLORMNU_OVERLAY"
ColorPicker "$MAPCOLORMNU_YOURCOLOR", "am_ovyourcolor"
ColorPicker "$MAPCOLORMNU_WALLCOLOR", "am_ovwallcolor"
ColorPicker "$MAPCOLORMNU_FDWALLCOLOR", "am_ovfdwallcolor"
@ -1321,8 +1331,11 @@ OptionMenu MapColorMenu protected
ColorPicker "$MAPCOLORMNU_SECRETSECTORCOLOR", "am_ovsecretsectorcolor"
ColorPicker "$MAPCOLORMNU_SPECIALWALLCOLOR", "am_ovspecialwallcolor"
ColorPicker "$MAPCOLORMNU_PORTAL", "am_ovportalcolor"
StaticText " "
StaticText "$MAPCOLORMNU_OVCHEATMODE", 1
}
OptionMenu MapColorMenuCheatsOverlay protected
{
Title "$MAPCOLORMNU_OVCHEATMODE"
ColorPicker "$MAPCOLORMNU_TSWALLCOLOR", "am_ovotherwallscolor"
ColorPicker "$MAPCOLORMNU_SECRETWALLCOLOR", "am_ovsecretwallcolor"
ColorPicker "$MAPCOLORMNU_THINGCOLOR", "am_ovthingcolor"
@ -1456,6 +1469,9 @@ OptionMenu GameplayOptions protected
{
Title "$GMPLYMNU_TITLE"
//Indent 222
Submenu "$GMPLYMNU_DEATHMATCH", "DeathmatchOptions"
Submenu "$GMPLYMNU_COOPERATIVE", "CoopOptions"
StaticText " "
Option "$GMPLYMNU_TEAMPLAY", "teamplay", "OnOff"
Slider "$GMPLYMNU_TEAMDAMAGE", "teamdamage", 0, 1, 0.05,2
StaticText " "
@ -1488,9 +1504,13 @@ OptionMenu GameplayOptions protected
Option "$GMPLYMNU_DONTCHECKAMMO", "sv_dontcheckammo", "NoYes"
Option "$GMPLYMNU_KILLBOSSSPAWNS", "sv_killbossmonst", "YesNo"
Option "$GMPLYMNU_NOCOUNTENDMONSTER", "sv_nocountendmonst", "NoYes"
Class "GameplayMenu"
}
OptionMenu DeathmatchOptions protected
{
Title "$GMPLYMNU_DEATHMATCH"
StaticText " "
StaticText "$GMPLYMNU_DEATHMATCH",1
Option "$GMPLYMNU_WEAPONSSTAY", "sv_weaponstay", "YesNo"
Option "$GMPLYMNU_ALLOWPOWERUPS", "sv_noitems", "NoYes"
Option "$GMPLYMNU_ALLOWHEALTH", "sv_nohealth", "NoYes"
@ -1504,9 +1524,13 @@ OptionMenu GameplayOptions protected
Option "$GMPLYMNU_LOSEFRAG", "sv_losefrag", "YesNo"
Option "$GMPLYMNU_KEEPFRAGS", "sv_keepfrags", "YesNo"
Option "$GMPLYMNU_NOTEAMSWITCH", "sv_noteamswitch", "YesNo"
Class "GameplayMenu"
}
OptionMenu CoopOptions protected
{
Title "$GMPLYMNU_COOPERATIVE"
StaticText " "
StaticText "$GMPLYMNU_COOPERATIVE",1
Option "$GMPLYMNU_MULTIPLAYERWEAPONS", "sv_noweaponspawn", "NoYes"
Option "$GMPLYMNU_LOSEINVENTORY", "sv_cooploseinventory", "YesNo"
Option "$GMPLYMNU_KEEPKEYS", "sv_cooplosekeys", "NoYes"
@ -1541,9 +1565,19 @@ OptionMenu "CompatibilityOptions" protected
{
Title "$CMPTMNU_TITLE"
Option "$CMPTMNU_MODE", "compatmode", "CompatModes", "", 1
StaticText " "
StaticText "$CMPTMNU_ACTORBEHAVIOR",1
Submenu "$CMPTMNU_ACTORBEHAVIOR", "CompatActorMenu"
Submenu "$CMPTMNU_DEHACKEDBEHAVIOR", "CompatDehackedMenu"
Submenu "$CMPTMNU_MAPACTIONBEHAVIOR", "CompatMapMenu"
Submenu "$CMPTMNU_PHYSICSBEHAVIOR", "CompatPhysicsMenu"
Submenu "$CMPTMNU_RENDERINGBEHAVIOR", "CompatRenderMenu"
Submenu "$CMPTMNU_SOUNDBEHAVIOR", "CompatSoundMenu"
Class "CompatibilityMenu"
}
OptionMenu "CompatActorMenu" protected
{
Title "$CMPTMNU_ACTORBEHAVIOR"
Option "$CMPTMNU_CORPSEGIBS", "compat_CORPSEGIBS", "YesNo"
Option "$CMPTMNU_NOBLOCKFRIENDS", "compat_NOBLOCKFRIENDS", "YesNo"
Option "$CMPTMNU_LIMITPAIN", "compat_LIMITPAIN", "YesNo"
@ -1553,14 +1587,20 @@ OptionMenu "CompatibilityOptions" protected
Option "$CMPTMNU_INVISIBILITY", "compat_INVISIBILITY", "YesNo"
Option "$CMPTMNU_MINOTAUR", "compat_MINOTAUR", "YesNo"
Option "$CMPTMNU_NOTOSSDROPS", "compat_NOTOSSDROPS", "YesNo"
Class "CompatibilityMenu"
}
StaticText " "
StaticText "$CMPTMNU_DEHACKEDBEHAVIOR",1
OptionMenu "CompatDehackedMenu" protected
{
Title "$CMPTMNU_DEHACKEDBEHAVIOR"
Option "$CMPTMNU_DEHHEALTH", "compat_DEHHEALTH", "YesNo"
Option "$CMPTMNU_MUSHROOM", "compat_MUSHROOM", "YesNo"
Class "CompatibilityMenu"
}
StaticText " "
StaticText "$CMPTMNU_MAPACTIONBEHAVIOR",1
OptionMenu "CompatMapMenu" protected
{
Title "$CMPTMNU_MAPACTIONBEHAVIOR"
Option "$CMPTMNU_USEBLOCKING", "compat_USEBLOCKING", "YesNo"
Option "$CMPTMNU_ANYBOSSDEATH", "compat_ANYBOSSDEATH", "YesNo"
Option "$CMPTMNU_NODOORLIGHT", "compat_NODOORLIGHT", "YesNo"
@ -1573,9 +1613,12 @@ OptionMenu "CompatibilityOptions" protected
Option "$CMPTMNU_TELEPORT", "compat_teleport", "YesNo"
Option "$CMPTMNU_PUSHWINDOW", "compat_pushwindow", "YesNo"
Option "$CMPTMNU_CHECKSWITCHRANGE", "compat_checkswitchrange", "YesNo"
Class "CompatibilityMenu"
}
StaticText " "
StaticText "$CMPTMNU_PHYSICSBEHAVIOR",1
OptionMenu "CompatPhysicsMenu" protected
{
Title "$CMPTMNU_PHYSICSBEHAVIOR"
Option "$CMPTMNU_NOPASSOVER", "compat_nopassover", "YesNo"
Option "$CMPTMNU_BOOMSCROLL", "compat_BOOMSCROLL", "YesNo"
Option "$CMPTMNU_BADANGLES", "compat_badangles", "YesNo"
@ -1584,23 +1627,28 @@ OptionMenu "CompatibilityOptions" protected
Option "$CMPTMNU_TRACE", "compat_TRACE", "YesNo"
Option "$CMPTMNU_HITSCAN", "compat_HITSCAN", "YesNo"
Option "$CMPTMNU_MISSILECLIP", "compat_MISSILECLIP", "YesNo"
Class "CompatibilityMenu"
}
StaticText " "
StaticText "$CMPTMNU_RENDERINGBEHAVIOR",1
OptionMenu "CompatRenderMenu" protected
{
Title "$CMPTMNU_RENDERINGBEHAVIOR"
Option "$CMPTMNU_POLYOBJ", "compat_POLYOBJ", "YesNo"
Option "$CMPTMNU_MASKEDMIDTEX", "compat_MASKEDMIDTEX", "YesNo"
Option "$CMPTMNU_SPRITESORT", "compat_SPRITESORT", "YesNo"
Class "CompatibilityMenu"
}
StaticText " "
StaticText "$CMPTMNU_SOUNDBEHAVIOR",1
OptionMenu "CompatSoundMenu" protected
{
Title "$CMPTMNU_SOUNDBEHAVIOR"
Option "$CMPTMNU_SOUNDSLOTS", "compat_soundslots", "YesNo"
Option "$CMPTMNU_SILENTPICKUP", "compat_SILENTPICKUP", "YesNo"
Option "$CMPTMNU_SILENTINSTANTFLOORS", "compat_silentinstantfloors", "YesNo"
Option "$CMPTMNU_SECTORSOUNDS", "compat_SECTORSOUNDS", "YesNo"
Option "$CMPTMNU_SOUNDCUTOFF", "compat_soundcutoff", "YesNo"
Option "$CMPTMNU_SOUNDTARGET", "compat_SOUNDTARGET", "YesNo"
Class "CompatibilityMenu"
}

View File

@ -391,7 +391,7 @@ class ConversationMenu : Menu
}
else
{
speakerName = players[consoleplayer].ConversationNPC.GetTag("Person");
speakerName = players[consoleplayer].ConversationNPC.GetTag("$TXT_PERSON");
}

Some files were not shown because too many files have changed in this diff Show More