diff --git a/src/doomdef.h b/src/doomdef.h index 42b516850..1e0abadaf 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -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 diff --git a/src/events.cpp b/src/events.cpp index 5b39d7f54..69de8cca5 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -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) { diff --git a/src/events.h b/src/events.h index 79c75023a..7608dfa1a 100755 --- a/src/events.h +++ b/src/events.h @@ -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 diff --git a/src/gamedata/g_mapinfo.cpp b/src/gamedata/g_mapinfo.cpp index 969affe21..6f7d88694 100644 --- a/src/gamedata/g_mapinfo.cpp +++ b/src/gamedata/g_mapinfo.cpp @@ -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 }, diff --git a/src/gamedata/g_mapinfo.h b/src/gamedata/g_mapinfo.h index f9cd2f6f4..f4c74de08 100644 --- a/src/gamedata/g_mapinfo.h +++ b/src/gamedata/g_mapinfo.h @@ -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 diff --git a/src/gamedata/stringtable.cpp b/src/gamedata/stringtable.cpp index a710ac000..3505470c2 100644 --- a/src/gamedata/stringtable.cpp +++ b/src/gamedata/stringtable.cpp @@ -97,7 +97,7 @@ TArray> FStringTable::parseCSV(const TArray &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] == '"') { diff --git a/src/maploader/compatibility.cpp b/src/maploader/compatibility.cpp index 11283dbe1..63586a1a7 100644 --- a/src/maploader/compatibility.cpp +++ b/src/maploader/compatibility.cpp @@ -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 } }; diff --git a/src/maploader/maploader.cpp b/src/maploader/maploader.cpp index 81da37591..fb5866d79 100644 --- a/src/maploader/maploader.cpp +++ b/src/maploader/maploader.cpp @@ -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; } diff --git a/src/maploader/udmf.cpp b/src/maploader/udmf.cpp index b8eac3744..a1caea659 100644 --- a/src/maploader/udmf.cpp +++ b/src/maploader/udmf.cpp @@ -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: diff --git a/src/p_map.cpp b/src/p_map.cpp index 00183fd10..6f7165b4c 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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; diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 7421185ee..b7584bb1d 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -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"); diff --git a/src/rendering/gl/shaders/gl_postprocessshader.cpp b/src/rendering/gl/shaders/gl_postprocessshader.cpp index 4f73e75b2..d197e11cf 100644 --- a/src/rendering/gl/shaders/gl_postprocessshader.cpp +++ b/src/rendering/gl/shaders/gl_postprocessshader.cpp @@ -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()) { diff --git a/wadsrc/static/mapinfo/strife.txt b/wadsrc/static/mapinfo/strife.txt index b4649c262..d38f742e6 100644 --- a/wadsrc/static/mapinfo/strife.txt +++ b/wadsrc/static/mapinfo/strife.txt @@ -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" diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index d625c05bb..34e3ec9eb 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -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" } diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index 4fdc29fda..ad3065fe4 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -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. }; diff --git a/wadsrc/static/zscript/level_compatibility.zs b/wadsrc/static/zscript/level_compatibility.zs index 0c83e8e64..4ed450d9a 100644 --- a/wadsrc/static/zscript/level_compatibility.zs +++ b/wadsrc/static/zscript/level_compatibility.zs @@ -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 diff --git a/wadsrc/static/zscript/ui/menu/optionmenuitems.zs b/wadsrc/static/zscript/ui/menu/optionmenuitems.zs index 246710e94..c4b65a46d 100644 --- a/wadsrc/static/zscript/ui/menu/optionmenuitems.zs +++ b/wadsrc/static/zscript/ui/menu/optionmenuitems.zs @@ -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) { diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C0.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C0.lmp index 0ba3368a1..f6a85de06 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C0.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C0.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C1.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C1.lmp index c2993945f..4f9cee771 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C1.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C1.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C2.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C2.lmp index acea55a33..0e1ca2431 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C2.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C2.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C8.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C8.lmp index 2ae54ea14..27eab31ac 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C8.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C8.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C9.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C9.lmp index 7368e46b3..5b484d579 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C9.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00C9.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CA.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CA.lmp index e5c5b8814..ee4f669e9 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CA.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CA.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CC.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CC.lmp index 204b2e8fd..6560c2ba7 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CC.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CC.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CD.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CD.lmp index 1e86dc114..4bafd8b2e 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CD.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CD.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CE.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CE.lmp index 291543fc9..ff19a7c40 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CE.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00CE.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D2.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D2.lmp index 0daaba4ec..80788d6f9 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D2.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D2.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D3.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D3.lmp index 7dcb65cfc..9aebc7b42 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D3.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D3.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D4.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D4.lmp index 7b41d7b88..ef2dacfc5 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D4.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D4.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D9.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D9.lmp index 4ccbdfb62..0c6ad26e9 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D9.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00D9.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DA.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DA.lmp index 47b2faab8..c24bc273c 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DA.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DA.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DB.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DB.lmp index bf897c376..b69367766 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DB.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DB.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DD.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DD.lmp index 15d8ac54c..0b9179a65 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DD.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/00DD.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp index 3d2e0b7da..24e905559 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0150.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp index 826cb05ae..9fad34405 100644 Binary files a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont/0170.lmp differ diff --git a/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont2/2014.lmp b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont2/2014.lmp new file mode 100644 index 000000000..b09ea4d63 Binary files /dev/null and b/wadsrc_extra/static/filter/game-strife/fonts/defsmallfont2/2014.lmp differ