mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Merge remote-tracking branch 'origin/master' into vulkan2
This commit is contained in:
commit
4cc9880f50
36 changed files with 31 additions and 14 deletions
|
@ -330,7 +330,8 @@ enum : unsigned int
|
|||
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
|
||||
COMPATF2_CHECKSWITCHRANGE = 1 << 7, // Enable buggy CheckSwitchRange behavior
|
||||
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
|
||||
COMPATF2_EXPLODE2 = 1 << 9 // Use original explosion code throughout.
|
||||
COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout.
|
||||
COMPATF2_RAILING = 1 << 10, // Bugged Strife railings.
|
||||
};
|
||||
|
||||
// Emulate old bugs for select maps. These are not exposed by a cvar
|
||||
|
|
|
@ -46,6 +46,13 @@
|
|||
EventManager staticEventManager;
|
||||
EventManager eventManager;
|
||||
|
||||
void EventManager::CallOnRegister()
|
||||
{
|
||||
for (DStaticEventHandler* handler = FirstEventHandler; handler; handler = handler->next)
|
||||
{
|
||||
handler->OnRegister();
|
||||
}
|
||||
}
|
||||
|
||||
bool EventManager::RegisterHandler(DStaticEventHandler* handler)
|
||||
{
|
||||
|
|
|
@ -240,6 +240,8 @@ struct EventManager
|
|||
~EventManager() { Shutdown(); }
|
||||
bool ShouldCallStatic(bool forplay);
|
||||
|
||||
// for use after loading a savegame. The old handler explicitly reinstalled all handlers instead of doing a list deserialization which resulted in OnRegister being called even when a save was loaded.
|
||||
void CallOnRegister();
|
||||
// register
|
||||
bool RegisterHandler(DStaticEventHandler* handler);
|
||||
// unregister
|
||||
|
|
|
@ -1644,6 +1644,7 @@ MapFlagHandlers[] =
|
|||
{ "compat_checkswitchrange", MITYPE_COMPATFLAG, 0, COMPATF2_CHECKSWITCHRANGE },
|
||||
{ "compat_explode1", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE1 },
|
||||
{ "compat_explode2", MITYPE_COMPATFLAG, 0, COMPATF2_EXPLODE2 },
|
||||
{ "compat_railing", MITYPE_COMPATFLAG, 0, COMPATF2_RAILING },
|
||||
{ "cd_start_track", MITYPE_EATNEXT, 0, 0 },
|
||||
{ "cd_end1_track", MITYPE_EATNEXT, 0, 0 },
|
||||
{ "cd_end2_track", MITYPE_EATNEXT, 0, 0 },
|
||||
|
|
|
@ -225,7 +225,7 @@ enum ELevelFlags : unsigned int
|
|||
LEVEL2_FORCETEAMPLAYOFF = 0x00080000,
|
||||
|
||||
LEVEL2_CONV_SINGLE_UNFREEZE = 0x00100000,
|
||||
LEVEL2_RAILINGHACK = 0x00200000, // but UDMF requires them to be separate to have more control
|
||||
// = 0x00200000, // unused, was LEVEL2_RAILINGHACK
|
||||
LEVEL2_DUMMYSWITCHES = 0x00400000,
|
||||
LEVEL2_HEXENHACK = 0x00800000, // Level was defined in a Hexen style MAPINFO
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ TArray<TArray<FString>> FStringTable::parseCSV(const TArray<uint8_t> &buffer)
|
|||
while (vend > vcopy && myisspace((unsigned char)vend[-1])) *--vend = 0; // skip over trailing whitespace
|
||||
*/
|
||||
|
||||
for (int i = 0; i < bufLength; ++i)
|
||||
for (size_t i = 0; i < bufLength; ++i)
|
||||
{
|
||||
if (buffer[i] == '"')
|
||||
{
|
||||
|
|
|
@ -167,6 +167,7 @@ static FCompatOption Options[] =
|
|||
{ "checkswitchrange", COMPATF2_CHECKSWITCHRANGE, SLOT_COMPAT2 },
|
||||
{ "explode1", COMPATF2_EXPLODE1, SLOT_COMPAT2 },
|
||||
{ "explode2", COMPATF2_EXPLODE2, SLOT_COMPAT2 },
|
||||
{ "railing", COMPATF2_RAILING, SLOT_COMPAT2 },
|
||||
{ NULL, 0, 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -3004,11 +3004,6 @@ void MapLoader::LoadLevel(MapData *map, const char *lumpname, int position)
|
|||
|
||||
if (!map->HasBehavior && !map->isText)
|
||||
{
|
||||
// set compatibility flags
|
||||
if (gameinfo.gametype == GAME_Strife)
|
||||
{
|
||||
Level->flags2 |= LEVEL2_RAILINGHACK;
|
||||
}
|
||||
Level->flags2 |= LEVEL2_DUMMYSWITCHES;
|
||||
}
|
||||
|
||||
|
|
|
@ -2161,7 +2161,7 @@ public:
|
|||
case NAME_Strife:
|
||||
namespace_bits = St;
|
||||
Level->Translator = P_LoadTranslator("xlat/strife_base.txt");
|
||||
Level->flags2 |= LEVEL2_DUMMYSWITCHES|LEVEL2_RAILINGHACK;
|
||||
Level->flags2 |= LEVEL2_DUMMYSWITCHES;
|
||||
floordrop = true;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -976,7 +976,7 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
|
|||
// better than Strife's handling of rails, which lets you jump into rails
|
||||
// from either side. How long until somebody reports this as a bug and I'm
|
||||
// forced to say, "It's not a bug. It's a feature?" Ugh.
|
||||
(!(tm.thing->Level->flags2 & LEVEL2_RAILINGHACK) ||
|
||||
(!(tm.thing->Level->i_compatflags2 & COMPATF2_RAILING) ||
|
||||
open.bottom == tm.thing->Sector->floorplane.ZatPoint(ref)))
|
||||
{
|
||||
open.bottom += 32;
|
||||
|
|
|
@ -994,6 +994,7 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
|
|||
// [ZZ] serialize events
|
||||
arc("firstevent", localEventManager->FirstEventHandler)
|
||||
("lastevent", localEventManager->LastEventHandler);
|
||||
localEventManager->CallOnRegister();
|
||||
Thinkers.SerializeThinkers(arc, hubload);
|
||||
arc("polyobjs", Polyobjects);
|
||||
SerializeSubsectors(arc, "subsectors");
|
||||
|
|
|
@ -221,7 +221,7 @@ void PostProcessShaderInstance::BindTextures()
|
|||
{
|
||||
glUniform1i(location, textureUnit);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + 1);
|
||||
glActiveTexture(GL_TEXTURE0 + textureUnit);
|
||||
auto it = mTextureHandles.find(tex);
|
||||
if (it == mTextureHandles.end())
|
||||
{
|
||||
|
|
|
@ -627,6 +627,7 @@ map MAP04 LOOKUP "TXT_STRIFE_MAP04"
|
|||
sky1 = "SKYMNT02"
|
||||
music = "D_FAST"
|
||||
cluster = 1
|
||||
compat_railing
|
||||
}
|
||||
|
||||
map MAP05 LOOKUP "TXT_STRIFE_MAP05"
|
||||
|
|
|
@ -1662,6 +1662,7 @@ OptionMenu "CompatPhysicsMenu" protected
|
|||
Option "$CMPTMNU_MISSILECLIP", "compat_MISSILECLIP", "YesNo"
|
||||
Option "$CMPTMNU_EXPLODE1", "compat_explode1", "YesNo"
|
||||
Option "$CMPTMNU_EXPLODE2", "compat_explode2", "YesNo"
|
||||
Option "$CMPTMNU_RAILINGHACK", "compat_railing", "YesNo"
|
||||
Class "CompatibilityMenu"
|
||||
}
|
||||
|
||||
|
|
|
@ -1341,5 +1341,6 @@ enum ECompatFlags
|
|||
COMPATF2_PUSHWINDOW = 1 << 6, // Disable the window check in CheckForPushSpecial()
|
||||
COMPATF2_CHECKSWITCHRANGE = 1 << 7, // Enable buggy CheckSwitchRange behavior
|
||||
COMPATF2_EXPLODE1 = 1 << 8, // No vertical explosion thrust
|
||||
COMPATF2_EXPLODE2 = 1 << 9 // Use original explosion code throughout.
|
||||
COMPATF2_EXPLODE2 = 1 << 9, // Use original explosion code throughout.
|
||||
COMPATF2_RAILING = 1 << 10, // Bugged Strife railings.
|
||||
};
|
||||
|
|
|
@ -892,6 +892,12 @@ class LevelCompatibility native play
|
|||
break;
|
||||
}
|
||||
|
||||
case '8D7A24B169717907DDA8399D8C1655DF': // strife1.wad map15
|
||||
{
|
||||
SetWallTexture(319, Line.back, Side.top, "WALTEK21");
|
||||
break;
|
||||
}
|
||||
|
||||
case 'DB31D71B11E3E4393B9C0CCB44A8639F': // rop_2015.wad e1m5
|
||||
{
|
||||
// Lower floor a bit so secret switch becomes accessible
|
||||
|
|
|
@ -811,8 +811,8 @@ class OptionMenuSliderBase : OptionMenuItem
|
|||
lm.ReleaseFocus();
|
||||
}
|
||||
|
||||
int slide_left = mDrawX+8*CleanXfac_1;
|
||||
int slide_right = slide_left + (10*8*CleanXfac_1 >> mSliderShort); // 12 char cells with 8 pixels each.
|
||||
int slide_left = mDrawX+16*CleanXfac_1;
|
||||
int slide_right = slide_left + (10*16*CleanXfac_1 >> mSliderShort); // 10 char cells with 16 pixels each.
|
||||
|
||||
if (type == Menu.MOUSE_Click)
|
||||
{
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue