diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 25bf0f5d35..f145b5ad95 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -77,7 +77,9 @@ enum CP_SETFLAGS, CP_SETSPECIAL, CP_CLEARSPECIAL, - CP_SETACTIVATION + CP_SETACTIVATION, + CP_SECTORFLOOROFFSET, + CP_SETWALLYSCALE, }; // EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- @@ -137,6 +139,16 @@ static FCompatOption Options[] = { NULL, 0, 0 } }; +static const char *const LineSides[] = +{ + "Front", "Back", NULL +}; + +static const char *const WallTiers[] = +{ + "Top", "Mid", "Bot", NULL +}; + static TArray CompatParams; static int ii_compatparams; @@ -259,6 +271,28 @@ void ParseCompatibility() sc.MustGetNumber(); CompatParams.Push(sc.Number); } + else if (sc.Compare("sectorflooroffset")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SECTORFLOOROFFSET); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetFloat(); + CompatParams.Push(FLOAT2FIXED(sc.Float)); + } + else if (sc.Compare("setwallyscale")) + { + if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size(); + CompatParams.Push(CP_SETWALLYSCALE); + sc.MustGetNumber(); + CompatParams.Push(sc.Number); + sc.MustGetString(); + CompatParams.Push(sc.MustMatchString(LineSides)); + sc.MustGetString(); + CompatParams.Push(sc.MustMatchString(WallTiers)); + sc.MustGetFloat(); + CompatParams.Push(FLOAT2FIXED(sc.Float)); + } else { sc.UnGet(); @@ -438,6 +472,30 @@ void SetCompatibilityParams() i += 3; break; } + case CP_SECTORFLOOROFFSET: + { + if (CompatParams[i+1] < numsectors) + { + sector_t *sec = §ors[CompatParams[i+1]]; + sec->floorplane.ChangeHeight(CompatParams[i+2]); + sec->ChangePlaneTexZ(sector_t::floor, CompatParams[i+2]); + } + i += 3; + break; + } + case CP_SETWALLYSCALE: + { + if (CompatParams[i+1] < numlines) + { + side_t *side = lines[CompatParams[i+1]].sidedef[CompatParams[i+2]]; + if (side != NULL) + { + side->SetTextureYScale(CompatParams[i+3], CompatParams[i+4]); + } + } + i += 5; + break; + } } } } diff --git a/wadsrc/static/compatibility.txt b/wadsrc/static/compatibility.txt index d87f593f08..f381155bd4 100644 --- a/wadsrc/static/compatibility.txt +++ b/wadsrc/static/compatibility.txt @@ -301,3 +301,32 @@ F481922F4881F74760F3C0437FD5EDD0 // map03 setlineflags 455 0x200 // repeatable setactivation 455 16 // SPAC_Push } + +6DC9F6CCEAE7A91AEC48EBE506F22BC4 // Void +{ + // Slightly squash the pillars in the starting room with "stimpacks" + // floating on them so that they can be obtained. + sectorflooroffset 62 -8 + setwallyscale 286 front bot 1.090909 + setwallyscale 287 front bot 1.090909 + setwallyscale 288 front bot 1.090909 + setwallyscale 289 front bot 1.090909 + + sectorflooroffset 63 -8 + setwallyscale 290 front bot 1.090909 + setwallyscale 291 front bot 1.090909 + setwallyscale 292 front bot 1.090909 + setwallyscale 293 front bot 1.090909 + + sectorflooroffset 118 -8 + setwallyscale 710 front bot 1.090909 + setwallyscale 711 front bot 1.090909 + setwallyscale 712 front bot 1.090909 + setwallyscale 713 front bot 1.090909 + + sectorflooroffset 119 -8 + setwallyscale 714 front bot 1.090909 + setwallyscale 715 front bot 1.090909 + setwallyscale 716 front bot 1.090909 + setwallyscale 717 front bot 1.090909 +}