- Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t.
- Grouped the sector plane texture transformation options into a separate structure and replaced all access to them with wrapper functions. SVN r1033 (trunk)
This commit is contained in:
parent
4a1cb412f1
commit
0e6e1da970
14 changed files with 249 additions and 201 deletions
|
|
@ -583,16 +583,8 @@ void DSectorScrollInterpolation::Destroy()
|
|||
|
||||
void DSectorScrollInterpolation::UpdateInterpolation()
|
||||
{
|
||||
if (!ceiling)
|
||||
{
|
||||
oldx = sector->floor_xoffs;
|
||||
oldy = sector->floor_yoffs;
|
||||
}
|
||||
else
|
||||
{
|
||||
oldx = sector->ceiling_xoffs;
|
||||
oldy = sector->ceiling_yoffs;
|
||||
}
|
||||
oldx = sector->GetXOffset(ceiling);
|
||||
oldy = sector->GetYOffset(ceiling, false);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -603,16 +595,8 @@ void DSectorScrollInterpolation::UpdateInterpolation()
|
|||
|
||||
void DSectorScrollInterpolation::Restore()
|
||||
{
|
||||
if (!ceiling)
|
||||
{
|
||||
sector->floor_xoffs = bakx;
|
||||
sector->floor_yoffs = baky;
|
||||
}
|
||||
else
|
||||
{
|
||||
sector->ceiling_xoffs = bakx;
|
||||
sector->ceiling_yoffs = baky;
|
||||
}
|
||||
sector->SetXOffset(ceiling, bakx);
|
||||
sector->SetYOffset(ceiling, bakx);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -623,25 +607,11 @@ void DSectorScrollInterpolation::Restore()
|
|||
|
||||
void DSectorScrollInterpolation::Interpolate(fixed_t smoothratio)
|
||||
{
|
||||
fixed_t *px;
|
||||
fixed_t *py;
|
||||
bakx = sector->GetXOffset(ceiling);
|
||||
baky = sector->GetYOffset(ceiling, false);
|
||||
|
||||
if (!ceiling)
|
||||
{
|
||||
px = §or->floor_xoffs;
|
||||
py = §or->floor_yoffs;
|
||||
}
|
||||
else
|
||||
{
|
||||
px = §or->ceiling_xoffs;
|
||||
py = §or->ceiling_yoffs;
|
||||
}
|
||||
|
||||
bakx = *px;
|
||||
baky = *py;
|
||||
|
||||
*px = oldx + FixedMul(bakx - oldx, smoothratio);
|
||||
*py = oldy + FixedMul(baky - oldy, smoothratio);
|
||||
sector->SetXOffset(ceiling, oldx + FixedMul(bakx - oldx, smoothratio));
|
||||
sector->SetYOffset(ceiling, oldy + FixedMul(baky - oldy, smoothratio));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue