mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-02 17:01:49 +00:00
- MBF21: implemented the new line scroller types.
These extend the parameter set of Scroll_Texture_Offsets, so in Hexen/UDMF format the advanced scroll types are also available for the tag-less variant.
This commit is contained in:
parent
5b1b6f1db4
commit
3bef08b1aa
3 changed files with 31 additions and 4 deletions
|
@ -1372,11 +1372,33 @@ void MapLoader::SpawnScrollers()
|
||||||
}
|
}
|
||||||
|
|
||||||
case Scroll_Texture_Offsets:
|
case Scroll_Texture_Offsets:
|
||||||
|
{
|
||||||
// killough 3/2/98: scroll according to sidedef offsets
|
// killough 3/2/98: scroll according to sidedef offsets
|
||||||
side = Level->lines[i].sidedef[0];
|
side = l->sidedef[0];
|
||||||
|
if (l->args[2] & 3)
|
||||||
|
{
|
||||||
|
// if 1, then displacement
|
||||||
|
// if 2, then accelerative (also if 3)
|
||||||
|
control = l->sidedef[0]->sector;
|
||||||
|
if (l->args[2] & 2)
|
||||||
|
accel = 1;
|
||||||
|
}
|
||||||
|
if (l->args[1] == 0)
|
||||||
|
{
|
||||||
Level->CreateThinker<DScroller>(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid),
|
Level->CreateThinker<DScroller>(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid),
|
||||||
side->GetTextureYOffset(side_t::mid), nullptr, nullptr, side, accel, SCROLLTYPE(l->args[0]));
|
side->GetTextureYOffset(side_t::mid), control, nullptr, side, accel, SCROLLTYPE(l->args[0]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
auto it = Level->GetLineIdIterator(l->args[1]);
|
||||||
|
while (int ln = it.Next())
|
||||||
|
{
|
||||||
|
Level->CreateThinker<DScroller>(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid),
|
||||||
|
side->GetTextureYOffset(side_t::mid), control, nullptr, Level->lines[ln].sidedef[0], accel, SCROLLTYPE(l->args[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case Scroll_Texture_Left:
|
case Scroll_Texture_Left:
|
||||||
l->special = special; // Restore the special, for compat_useblocking's benefit.
|
l->special = special; // Restore the special, for compat_useblocking's benefit.
|
||||||
|
|
|
@ -212,7 +212,7 @@ DEFINE_SPECIAL(Scroll_Texture_Both, 221, 5, 5, 5)
|
||||||
DEFINE_SPECIAL(Scroll_Texture_Model, 222, -1, -1, 2)
|
DEFINE_SPECIAL(Scroll_Texture_Model, 222, -1, -1, 2)
|
||||||
DEFINE_SPECIAL(Scroll_Floor, 223, 4, 4, 5)
|
DEFINE_SPECIAL(Scroll_Floor, 223, 4, 4, 5)
|
||||||
DEFINE_SPECIAL(Scroll_Ceiling, 224, 4, 4, 5)
|
DEFINE_SPECIAL(Scroll_Ceiling, 224, 4, 4, 5)
|
||||||
DEFINE_SPECIAL(Scroll_Texture_Offsets, 225, -1, -1, 1)
|
DEFINE_SPECIAL(Scroll_Texture_Offsets, 225, -1, -1, 3)
|
||||||
DEFINE_SPECIAL(ACS_ExecuteAlways, 226, 1, 5, 5)
|
DEFINE_SPECIAL(ACS_ExecuteAlways, 226, 1, 5, 5)
|
||||||
DEFINE_SPECIAL(PointPush_SetForce, 227, -1, -1, 4)
|
DEFINE_SPECIAL(PointPush_SetForce, 227, -1, -1, 4)
|
||||||
DEFINE_SPECIAL(Plat_RaiseAndStayTx0, 228, 2, 3, 3)
|
DEFINE_SPECIAL(Plat_RaiseAndStayTx0, 228, 2, 3, 3)
|
||||||
|
|
|
@ -375,6 +375,11 @@ include "xlat/defines.i"
|
||||||
438 = SHOOT, Floor_RaiseByValue (tag, F_SLOW, 2)
|
438 = SHOOT, Floor_RaiseByValue (tag, F_SLOW, 2)
|
||||||
439 = SHOOT|REP, Floor_RaiseByValue (tag, F_SLOW, 2)
|
439 = SHOOT|REP, Floor_RaiseByValue (tag, F_SLOW, 2)
|
||||||
|
|
||||||
|
// MBF21 extensions
|
||||||
|
1024 = 0, Scroll_Texture_Offsets(0, tag, 0)
|
||||||
|
1025 = 0, Scroll_Texture_Offsets(0, tag, 1)
|
||||||
|
1026 = 0, Scroll_Texture_Offsets(0, tag, 2)
|
||||||
|
|
||||||
/****** BOOM generalized linetypes ******
|
/****** BOOM generalized linetypes ******
|
||||||
*
|
*
|
||||||
* The general structure for a BOOM generalized translator is
|
* The general structure for a BOOM generalized translator is
|
||||||
|
|
Loading…
Reference in a new issue