From 950443683b60bfabc1f5359472c05a7e8290f299 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 11 Apr 2018 12:35:45 +0300 Subject: [PATCH] Scriptified compatibility of more Heretic levels --- src/compatibility.cpp | 13 ++++ wadsrc/static/compatibility.txt | 65 ---------------- wadsrc/static/zscript/level_compatibility.txt | 77 +++++++++++++++++++ 3 files changed, 90 insertions(+), 65 deletions(-) diff --git a/src/compatibility.cpp b/src/compatibility.cpp index beb07dc9c9..d77f2dafad 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -842,6 +842,19 @@ DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetThingFlags) return 0; } +DEFINE_ACTION_FUNCTION(DLevelCompatibility, SetVertex) +{ + PARAM_PROLOGUE; + PARAM_UINT(vertex); + PARAM_FLOAT(x); + PARAM_FLOAT(y); + + if (vertex < level.vertexes.Size()) + { + level.vertexes[vertex].p = DVector2(x, y); + } + return 0; +} //========================================================================== diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index 7ca81e4030..d217b92ee1 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -249,12 +249,6 @@ DC96228097DD004C40CCB1DB14A91EAA // unloved.pk3:unlovedmaps.wad map05 -B68EB7CFB4CC481796E2919B9C16DFBD // Moc11.wad e1m6 -{ - setvertex 1650 -3072 2671 - setvertex 1642 -2944 2671 -} - 712BB4CFBD0753178CA0C6814BE4C288 // map12 BTSX_E1 - patch some rendering glitches that are problematic to detect { setsectortag 545 32000 @@ -270,65 +264,6 @@ B68EB7CFB4CC481796E2919B9C16DFBD // Moc11.wad e1m6 -// Cosmetic fixes for Heretic: Shadow of the Serpent Riders -D94587625BA779644D58151A87897CF1 // e1m2 -{ - // Missing textures - setwalltexture 477 back top MOSSRCK1 - setwalltexture 478 back top MOSSRCK1 - setwalltexture 479 back top MOSSRCK1 - setwalltexture 1057 front top MOSSRCK1 -} -ADD0FAC41AFB0B3C9B9F3C0006F93805 // e1m3 -{ - // Broken door between the hallway that leads to a Torch - // and the passage that has a Bag of Holding at its end - setsectoroffset 86 floor -128 - setsectoroffset 86 ceil -128 -} -916318D8B06DAC2D83424B23E4B66531 // e1m4 -{ - // Wrong sector offsets - setsectoroffset 0 ceil 8 - setsectoroffset 1 ceil 8 - setsectoroffset 2 ceil 8 - setsectoroffset 3 ceil 8 - setsectoroffset 4 ceil 8 - setsectoroffset 6 ceil 8 - setsectoroffset 6 floor 8 - setsectoroffset 17 ceil 8 - // Yellow key door - setsectoroffset 284 floor -8 - setsectoroffset 284 ceil -8 - // Missing textures - setwalltexture 490 back bot GRSTNPB - setwalltexture 722 front bot WOODWL - setwalltexture 911 front bot WOODWL - setwalltexture 1296 front bot WOODWL -} -397A0E17A39542E4E8294E156FAB0502 // e2m2 -{ - // Missing green door statues on easy and hard difficulties - setthingskills 17 31 - setthingskills 18 31 -} -CA3773ED313E8899311F3DD0CA195A68 // e3m6 -{ - // Quartz flask outside of map - setthingskills 373 0 - // Missing wall torch on hard difficulty - setthingskills 448 31 - // Missing textures - setwalltexture 343 front top MOSSRCK1 - setwalltexture 370 front top MOSSRCK1 -} -5E3FCFDE78310BB89F92B1626A47D0AD // heretic.wad E4M7 -{ - // Missing textures - setwalltexture 1274 front top CSTLRCK - setwalltexture 1277 back top CSTLRCK - setwalltexture 1278 front top CSTLRCK -} 39C594CAC07EE51C80F757DA465FCC94 // strife1.wad map10 { diff --git a/wadsrc/static/zscript/level_compatibility.txt b/wadsrc/static/zscript/level_compatibility.txt index 9a13876207..9f63b88119 100644 --- a/wadsrc/static/zscript/level_compatibility.txt +++ b/wadsrc/static/zscript/level_compatibility.txt @@ -407,6 +407,75 @@ class LevelCompatibility play break; } + case 'D94587625BA779644D58151A87897CF1': // heretic.wad e1m2 + { + // Missing textures + TextureID mossrck1 = TexMan.CheckForTexture("MOSSRCK1", TexMan.Type_Wall); + SetWallTextureID( 477, Line.back, Side.top, mossrck1); + SetWallTextureID( 478, Line.back, Side.top, mossrck1); + SetWallTextureID( 479, Line.back, Side.top, mossrck1); + SetWallTextureID(1057, Line.front, Side.top, mossrck1); + break; + } + case 'ADD0FAC41AFB0B3C9B9F3C0006F93805': // heretic.wad e1m3 + { + // Broken door between the hallway that leads to a Torch + // and the passage that has a Bag of Holding at its end + OffsetSectorPlane(86, Sector.floor, -128); + OffsetSectorPlane(86, Sector.ceiling, -128); + break; + } + case '916318D8B06DAC2D83424B23E4B66531': // heretic.wad e1m4 + { + // Wrong sector offsets + OffsetSectorPlane( 0, Sector.ceiling, 8); + OffsetSectorPlane( 1, Sector.ceiling, 8); + OffsetSectorPlane( 2, Sector.ceiling, 8); + OffsetSectorPlane( 3, Sector.ceiling, 8); + OffsetSectorPlane( 4, Sector.ceiling, 8); + OffsetSectorPlane( 6, Sector.ceiling, 8); + OffsetSectorPlane( 6, Sector.floor, 8); + OffsetSectorPlane(17, Sector.ceiling, 8); + // Yellow key door + OffsetSectorPlane(284, Sector.floor, -8); + OffsetSectorPlane(284, Sector.ceiling, -8); + // Missing textures + SetWallTexture(490, Line.back, Side.bottom, "GRSTNPB"); + TextureID woodwl = TexMan.CheckForTexture("WOODWL", TexMan.Type_Wall); + SetWallTextureID( 722, Line.front, Side.bottom, woodwl); + SetWallTextureID( 911, Line.front, Side.bottom, woodwl); + SetWallTextureID(1296, Line.front, Side.bottom, woodwl); + break; + } + case '397A0E17A39542E4E8294E156FAB0502': // heretic.wad e2m2 + { + // Missing green door statues on easy and hard difficulties + SetThingSkills(17, 31); + SetThingSkills(18, 31); + break; + } + case 'CA3773ED313E8899311F3DD0CA195A68': // heretic.wad e3m6 + { + // Quartz flask outside of map + SetThingSkills(373, 0); + // Missing wall torch on hard difficulty + SetThingSkills(448, 31); + // Missing textures + TextureID mossrck1 = TexMan.CheckForTexture("MOSSRCK1", TexMan.Type_Wall); + SetWallTextureID(343, Line.front, Side.top, mossrck1); + SetWallTextureID(370, Line.front, Side.top, mossrck1); + break; + } + case '5E3FCFDE78310BB89F92B1626A47D0AD': // heretic.wad E4M7 + { + // Missing textures + TextureID cstlrck = TexMan.CheckForTexture("CSTLRCK", TexMan.Type_Wall); + SetWallTextureID(1274, Line.front, Side.top, cstlrck); + SetWallTextureID(1277, Line.back, Side.top, cstlrck); + SetWallTextureID(1278, Line.front, Side.top, cstlrck); + break; + } + case 'DB31D71B11E3E4393B9C0CCB44A8639F': // rop_2015.wad e1m5 { // Lower floor a bit so secret switch becomes accessible @@ -420,6 +489,13 @@ class LevelCompatibility play ClearSectorTags(483); break; } + + case 'B68EB7CFB4CC481796E2919B9C16DFBD': // Moc11.wad e1m6 + { + SetVertex(1650, -3072, 2671); + SetVertex(1642, -2944, 2671); + break; + } } } @@ -429,6 +505,7 @@ class LevelCompatibility play private static native void SetThingSkills(int thing, int skills); private static native void SetThingZ(int thing, double z); private static native void SetThingFlags(int thing, int flags); + private static native void SetVertex(uint vertex, double x, double y); private static void SetWallTexture(int line, int side, int texpart, String texture) {