mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- made partial floarting point aliases for EV_DoCeiling so that all the calls in p_lnspec.cpp match the master branch for merging.
This commit is contained in:
parent
a99ebc2356
commit
fd46909b1a
3 changed files with 51 additions and 36 deletions
|
@ -425,7 +425,7 @@ FUNC(LS_Floor_MoveToValueTimes8)
|
|||
FUNC(LS_Floor_MoveToValue)
|
||||
// Floor_MoveToValue (tag, speed, height, negative, change)
|
||||
{
|
||||
return EV_DoFloor (DFloor::floorMoveToValue, ln, arg0, _f_SPEED(arg1),
|
||||
return EV_DoFloor (DFloor::floorMoveToValue, ln, arg0, SPEED(arg1),
|
||||
arg2*(arg3?-1:1), -1, CHANGE(arg4), false);
|
||||
}
|
||||
|
||||
|
@ -630,43 +630,43 @@ FUNC(LS_Pillar_Open)
|
|||
FUNC(LS_Ceiling_LowerByValue)
|
||||
// Ceiling_LowerByValue (tag, speed, height, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerByValue, ln, arg0, _f_SPEED(arg1), 0, arg2*FRACUNIT, CRUSH(arg4), 0, CHANGE(arg3), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerByValue, ln, arg0, SPEED(arg1), 0, arg2*FRACUNIT, CRUSH(arg4), 0, CHANGE(arg3), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseByValue)
|
||||
// Ceiling_RaiseByValue (tag, speed, height, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseByValue, ln, arg0, _f_SPEED(arg1), 0, arg2*FRACUNIT, CRUSH(arg4), 0, CHANGE(arg3), false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseByValue, ln, arg0, SPEED(arg1), 0, arg2*FRACUNIT, CRUSH(arg4), 0, CHANGE(arg3), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerByValueTimes8)
|
||||
// Ceiling_LowerByValueTimes8 (tag, speed, height, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerByValue, ln, arg0, _f_SPEED(arg1), 0, arg2*FRACUNIT*8, -1, 0, CHANGE(arg3), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerByValue, ln, arg0, SPEED(arg1), 0, arg2*FRACUNIT*8, -1, 0, CHANGE(arg3), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseByValueTimes8)
|
||||
// Ceiling_RaiseByValueTimes8 (tag, speed, height, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseByValue, ln, arg0, _f_SPEED(arg1), 0, arg2*FRACUNIT*8, -1, 0, CHANGE(arg3), false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseByValue, ln, arg0, SPEED(arg1), 0, arg2*FRACUNIT*8, -1, 0, CHANGE(arg3), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushAndRaise)
|
||||
// Ceiling_CrushAndRaise (tag, speed, crush, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg1)/2, 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), SPEED(arg1)/2, 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerAndCrush)
|
||||
// Ceiling_LowerAndCrush (tag, speed, crush, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg1), 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
|
||||
return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, SPEED(arg1), SPEED(arg1), 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerAndCrushDist)
|
||||
// Ceiling_LowerAndCrush (tag, speed, crush, dist, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg1), arg3*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, SPEED(arg1), SPEED(arg1), arg3*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushStop)
|
||||
|
@ -678,27 +678,27 @@ FUNC(LS_Ceiling_CrushStop)
|
|||
FUNC(LS_Ceiling_CrushRaiseAndStay)
|
||||
// Ceiling_CrushRaiseAndStay (tag, speed, crush, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg1)/2, 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, SPEED(arg1), SPEED(arg1)/2, 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_MoveToValueTimes8)
|
||||
// Ceiling_MoveToValueTimes8 (tag, speed, height, negative, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilMoveToValue, ln, arg0, _f_SPEED(arg1), 0,
|
||||
return EV_DoCeiling (DCeiling::ceilMoveToValue, ln, arg0, SPEED(arg1), 0,
|
||||
arg2*FRACUNIT*8*((arg3) ? -1 : 1), -1, 0, CHANGE(arg4), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_MoveToValue)
|
||||
// Ceiling_MoveToValue (tag, speed, height, negative, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilMoveToValue, ln, arg0, _f_SPEED(arg1), 0,
|
||||
return EV_DoCeiling (DCeiling::ceilMoveToValue, ln, arg0, SPEED(arg1), 0,
|
||||
arg2*FRACUNIT*((arg3) ? -1 : 1), -1, 0, CHANGE(arg4), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerToHighestFloor)
|
||||
// Ceiling_LowerToHighestFloor (tag, speed, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToHighestFloor, ln, arg0, _f_SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg2), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToHighestFloor, ln, arg0, SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg2), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerInstant)
|
||||
|
@ -716,79 +716,79 @@ FUNC(LS_Ceiling_RaiseInstant)
|
|||
FUNC(LS_Ceiling_CrushRaiseAndStayA)
|
||||
// Ceiling_CrushRaiseAndStayA (tag, dnspeed, upspeed, damage, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg2), 0, arg3, 0, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, SPEED(arg1), SPEED(arg2), 0, arg3, 0, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushRaiseAndStaySilA)
|
||||
// Ceiling_CrushRaiseAndStaySilA (tag, dnspeed, upspeed, damage, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg2), 0, arg3, 1, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, SPEED(arg1), SPEED(arg2), 0, arg3, 1, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushAndRaiseA)
|
||||
// Ceiling_CrushAndRaiseA (tag, dnspeed, upspeed, damage, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg2), 0, arg3, 0, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), SPEED(arg2), 0, arg3, 0, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushAndRaiseDist)
|
||||
// Ceiling_CrushAndRaiseDist (tag, dist, speed, damage, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg2), _f_SPEED(arg2), arg1*FRACUNIT, arg3, 0, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg2), SPEED(arg2), arg1*FRACUNIT, arg3, 0, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushAndRaiseSilentA)
|
||||
// Ceiling_CrushAndRaiseSilentA (tag, dnspeed, upspeed, damage, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg2), 0, arg3, 1, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), SPEED(arg2), 0, arg3, 1, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_CrushAndRaiseSilentDist)
|
||||
// Ceiling_CrushAndRaiseSilentDist (tag, dist, upspeed, damage, crushtype)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg2), _f_SPEED(arg2), arg1*FRACUNIT, arg3, 1, 0, CRUSHTYPE(arg4));
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg2), SPEED(arg2), arg1*FRACUNIT, arg3, 1, 0, CRUSHTYPE(arg4));
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseToNearest)
|
||||
// Ceiling_RaiseToNearest (tag, speed, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToNearest, ln, arg0, _f_SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToNearest, ln, arg0, SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseToHighest)
|
||||
// Ceiling_RaiseToHighest (tag, speed, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToHighest, ln, arg0, _f_SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToHighest, ln, arg0, SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseToLowest)
|
||||
// Ceiling_RaiseToLowest (tag, speed, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToLowest, ln, arg0, _f_SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToLowest, ln, arg0, SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseToHighestFloor)
|
||||
// Ceiling_RaiseToHighestFloor (tag, speed, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToHighestFloor, ln, arg0, _f_SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseToHighestFloor, ln, arg0, SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_RaiseByTexture)
|
||||
// Ceiling_RaiseByTexture (tag, speed, change)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseByTexture, ln, arg0, _f_SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
return EV_DoCeiling (DCeiling::ceilRaiseByTexture, ln, arg0, SPEED(arg1), 0, 0, -1, CHANGE(arg2), 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerToLowest)
|
||||
// Ceiling_LowerToLowest (tag, speed, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToLowest, ln, arg0, _f_SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg2), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToLowest, ln, arg0, SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg2), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerToNearest)
|
||||
// Ceiling_LowerToNearest (tag, speed, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToNearest, ln, arg0, _f_SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg2), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToNearest, ln, arg0, SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg2), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_ToHighestInstant)
|
||||
|
@ -806,13 +806,13 @@ FUNC(LS_Ceiling_ToFloorInstant)
|
|||
FUNC(LS_Ceiling_LowerToFloor)
|
||||
// Ceiling_LowerToFloor (tag, speed, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToFloor, ln, arg0, _f_SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg4), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerToFloor, ln, arg0, SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg4), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Ceiling_LowerByTexture)
|
||||
// Ceiling_LowerByTexture (tag, speed, change, crush)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilLowerByTexture, ln, arg0, _f_SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg4), false);
|
||||
return EV_DoCeiling (DCeiling::ceilLowerByTexture, ln, arg0, SPEED(arg1), 0, 0, CRUSH(arg3), 0, CHANGE(arg4), false);
|
||||
}
|
||||
|
||||
FUNC(LS_Generic_Ceiling)
|
||||
|
@ -842,23 +842,23 @@ FUNC(LS_Generic_Ceiling)
|
|||
}
|
||||
}
|
||||
|
||||
return EV_DoCeiling (type, ln, arg0, _f_SPEED(arg1), _f_SPEED(arg1), arg2*FRACUNIT,
|
||||
return EV_DoCeiling (type, ln, arg0, SPEED(arg1), SPEED(arg1), arg2*FRACUNIT,
|
||||
(arg4 & 16) ? 20 : -1, 0, arg4 & 7, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Generic_Crusher)
|
||||
// Generic_Crusher (tag, dnspeed, upspeed, silent, damage)
|
||||
{
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg1),
|
||||
_f_SPEED(arg2), 0, arg4, arg3 ? 2 : 0, 0, false);
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1),
|
||||
SPEED(arg2), 0, arg4, arg3 ? 2 : 0, 0, false);
|
||||
}
|
||||
|
||||
FUNC(LS_Generic_Crusher2)
|
||||
// Generic_Crusher2 (tag, dnspeed, upspeed, silent, damage)
|
||||
{
|
||||
// same as above but uses Hexen's crushing method.
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, _f_SPEED(arg1),
|
||||
_f_SPEED(arg2), 0, arg4, arg3 ? 2 : 0, 0, true);
|
||||
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1),
|
||||
SPEED(arg2), 0, arg4, arg3 ? 2 : 0, 0, true);
|
||||
}
|
||||
|
||||
FUNC(LS_Plat_PerpetualRaise)
|
||||
|
|
|
@ -849,16 +849,16 @@ sightcounts[0]++;
|
|||
if (!(flags & SF_IGNOREWATERBOUNDARY))
|
||||
{
|
||||
if ((s1->GetHeightSec() &&
|
||||
((t1->top() <= s1->heightsec->floorplane.ZatPointF(t1) &&
|
||||
((t1->Top() <= s1->heightsec->floorplane.ZatPointF(t1) &&
|
||||
t2->Z() >= s1->heightsec->floorplane.ZatPointF(t2)) ||
|
||||
(t1->Z() >= s1->heightsec->ceilingplane.ZatPointF(t1) &&
|
||||
t2->top() <= s1->heightsec->ceilingplane.ZatPointF(t2))))
|
||||
t2->Top() <= s1->heightsec->ceilingplane.ZatPointF(t2))))
|
||||
||
|
||||
(s2->GetHeightSec() &&
|
||||
((t2->top() <= s2->heightsec->floorplane.ZatPointF(t2) &&
|
||||
((t2->Top() <= s2->heightsec->floorplane.ZatPointF(t2) &&
|
||||
t1->Z() >= s2->heightsec->floorplane.ZatPointF(t1)) ||
|
||||
(t2->Z() >= s2->heightsec->ceilingplane.ZatPointF(t2) &&
|
||||
t1->top() <= s2->heightsec->ceilingplane.ZatPointF(t1)))))
|
||||
t1->Top() <= s2->heightsec->ceilingplane.ZatPointF(t1)))))
|
||||
{
|
||||
res = false;
|
||||
goto done;
|
||||
|
|
15
src/p_spec.h
15
src/p_spec.h
|
@ -675,6 +675,21 @@ private:
|
|||
bool EV_DoCeiling (DCeiling::ECeiling type, line_t *line,
|
||||
int tag, fixed_t speed, fixed_t speed2, fixed_t height,
|
||||
int crush, int silent, int change, bool hexencrush);
|
||||
|
||||
inline bool EV_DoCeiling(DCeiling::ECeiling type, line_t *line,
|
||||
int tag, double speed, double speed2, fixed_t height,
|
||||
int crush, int silent, int change, bool hexencrush)
|
||||
{
|
||||
return EV_DoCeiling(type, line, tag, FLOAT2FIXED(speed), FLOAT2FIXED(speed2), height, crush, silent, change, hexencrush);
|
||||
}
|
||||
|
||||
inline bool EV_DoCeiling(DCeiling::ECeiling type, line_t *line,
|
||||
int tag, double speed, int speed2, fixed_t height,
|
||||
int crush, int silent, int change, bool hexencrush)
|
||||
{
|
||||
return EV_DoCeiling(type, line, tag, FLOAT2FIXED(speed), speed2, height, crush, silent, change, hexencrush);
|
||||
}
|
||||
|
||||
bool EV_CeilingCrushStop (int tag);
|
||||
void P_ActivateInStasisCeiling (int tag);
|
||||
|
||||
|
|
Loading…
Reference in a new issue