- migrated SW to the common interpolation system.

So far only the existing pieces - animations and sector objects still to do.
This commit is contained in:
Christoph Oelckers 2020-11-26 18:05:49 +01:00
parent b9477f147e
commit bf4cc9c6af
16 changed files with 70 additions and 397 deletions

View file

@ -18,8 +18,6 @@ set( PCH_SOURCES
src/goro.cpp
src/hornet.cpp
src/input.cpp
src/interp.cpp
src/interpsh.cpp
src/interpso.cpp
src/inv.cpp
src/jsector.cpp

View file

@ -48,7 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "misc.h"
#include "menus.h"
#include "interp.h"
#include "interpolate.h"
#include "interpso.h"
#include "sector.h"
#include "razemenu.h"
@ -1634,8 +1634,7 @@ drawscreen(PLAYERp pp, double smoothratio)
if (!ScreenSavePic)
{
dointerpolations(smoothratio); // Stick at beginning of drawscreen
short_dointerpolations(smoothratio); // Stick at beginning of drawscreen
DoInterpolations(smoothratio / 65536.); // Stick at beginning of drawscreen
if (cl_sointerpolation)
so_dointerpolations(smoothratio); // Stick at beginning of drawscreen
}
@ -1847,8 +1846,7 @@ drawscreen(PLAYERp pp, double smoothratio)
SyncStatMessage();
#endif
restoreinterpolations(); // Stick at end of drawscreen
short_restoreinterpolations(); // Stick at end of drawscreen
RestoreInterpolations(); // Stick at end of drawscreen
if (cl_sointerpolation)
so_restoreinterpolations(); // Stick at end of drawscreen

View file

@ -32,7 +32,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "names2.h"
#include "panel.h"
#include "game.h"
#include "interp.h"
#include "interpso.h"
#include "tags.h"
#include "sector.h"
@ -79,6 +78,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "gamestate.h"
#include "d_net.h"
#include "v_draw.h"
#include "interpolate.h"
//#include "crc32.h"
@ -283,7 +283,7 @@ void InitLevelGlobals(void)
AnimCnt = 0;
left_foot = false;
screenpeek = myconnectindex;
numinterpolations = short_numinterpolations = 0;
ClearInterpolations();
gNet.TimeLimitClock = gNet.TimeLimit;

View file

@ -1,114 +0,0 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1997, 2005 - 3D Realms Entertainment
This file is part of Shadow Warrior version 1.2
Shadow Warrior is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Original Source: 1997 - Frank Maddin and Jim Norwood
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#include "ns.h"
#include "compat.h"
#include "pragmas.h"
#include "interp.h"
BEGIN_SW_NS
int numinterpolations = 0;
int oldipos[MAXINTERPOLATIONS];
int bakipos[MAXINTERPOLATIONS];
int *curipos[MAXINTERPOLATIONS];
void setinterpolation(int *posptr)
{
int i;
if (numinterpolations >= MAXINTERPOLATIONS)
return;
for (i = numinterpolations - 1; i >= 0; i--)
{
if (curipos[i] == posptr)
return;
}
curipos[numinterpolations] = posptr;
oldipos[numinterpolations] = *posptr;
numinterpolations++;
}
void stopinterpolation(int *posptr)
{
int i;
for (i = numinterpolations - 1; i >= 0; i--)
{
if (curipos[i] == posptr)
{
numinterpolations--;
oldipos[i] = oldipos[numinterpolations];
bakipos[i] = bakipos[numinterpolations];
curipos[i] = curipos[numinterpolations];
}
}
}
void updateinterpolations(void) // Stick at beginning of domovethings
{
int i;
for (i = numinterpolations - 1; i >= 0; i--)
oldipos[i] = *curipos[i];
}
// must call restore for every do interpolations
// make sure you don't exit
void dointerpolations(int smoothratio) // Stick at beginning of drawscreen
{
int i, j, odelta, ndelta;
ndelta = 0;
j = 0;
for (i = numinterpolations - 1; i >= 0; i--)
{
bakipos[i] = *curipos[i];
odelta = ndelta;
ndelta = (*curipos[i]) - oldipos[i];
if (odelta != ndelta)
j = mulscale16(ndelta, smoothratio);
*curipos[i] = oldipos[i] + j;
}
}
void restoreinterpolations(void) // Stick at end of drawscreen
{
int i;
for (i = numinterpolations - 1; i >= 0; i--)
*curipos[i] = bakipos[i];
}
END_SW_NS

View file

@ -1,54 +0,0 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1997, 2005 - 3D Realms Entertainment
This file is part of Shadow Warrior version 1.2
Shadow Warrior is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Original Source: 1997 - Frank Maddin and Jim Norwood
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#pragma once
#include "build.h"
BEGIN_SW_NS
#define SHORT_MAXINTERPOLATIONS 256
extern short short_numinterpolations;
extern short short_oldipos[SHORT_MAXINTERPOLATIONS];
extern short short_bakipos[SHORT_MAXINTERPOLATIONS];
extern short *short_curipos[SHORT_MAXINTERPOLATIONS];
#define MAXINTERPOLATIONS MAXSPRITES
extern int numinterpolations;
extern int oldipos[MAXINTERPOLATIONS];
extern int bakipos[MAXINTERPOLATIONS];
extern int *curipos[MAXINTERPOLATIONS];
void setinterpolation(int *posptr);
void stopinterpolation(int *posptr);
void updateinterpolations(void);
void dointerpolations(int smoothratio);
void restoreinterpolations(void);
END_SW_NS

View file

@ -1,114 +0,0 @@
//-------------------------------------------------------------------------
/*
Copyright (C) 1997, 2005 - 3D Realms Entertainment
This file is part of Shadow Warrior version 1.2
Shadow Warrior is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Original Source: 1997 - Frank Maddin and Jim Norwood
Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/
//-------------------------------------------------------------------------
#include "ns.h"
#include "compat.h"
#include "pragmas.h"
#include "interp.h"
BEGIN_SW_NS
short short_numinterpolations = 0;
short short_oldipos[SHORT_MAXINTERPOLATIONS];
short short_bakipos[SHORT_MAXINTERPOLATIONS];
short *short_curipos[SHORT_MAXINTERPOLATIONS];
void short_setinterpolation(short *posptr)
{
int i;
if (short_numinterpolations >= SHORT_MAXINTERPOLATIONS)
return;
for (i = short_numinterpolations - 1; i >= 0; i--)
{
if (short_curipos[i] == posptr)
return;
}
short_curipos[short_numinterpolations] = posptr;
short_oldipos[short_numinterpolations] = *posptr;
short_numinterpolations++;
}
void short_stopinterpolation(short *posptr)
{
int i;
for (i = short_numinterpolations - 1; i >= 0; i--)
{
if (short_curipos[i] == posptr)
{
short_numinterpolations--;
short_oldipos[i] = short_oldipos[short_numinterpolations];
short_bakipos[i] = short_bakipos[short_numinterpolations];
short_curipos[i] = short_curipos[short_numinterpolations];
}
}
}
void short_updateinterpolations(void) // Stick at beginning of domovethings
{
int i;
for (i = short_numinterpolations - 1; i >= 0; i--)
short_oldipos[i] = *short_curipos[i];
}
// must call restore for every do interpolations
// make sure you don't exit
void short_dointerpolations(int smoothratio) // Stick at beginning of drawscreen
{
int i, j, odelta, ndelta;
ndelta = 0;
j = 0;
for (i = short_numinterpolations - 1; i >= 0; i--)
{
short_bakipos[i] = *short_curipos[i];
odelta = ndelta;
ndelta = (*short_curipos[i]) - short_oldipos[i];
if (odelta != ndelta)
j = mulscale16(ndelta, smoothratio);
*short_curipos[i] = short_oldipos[i] + j;
}
}
void short_restoreinterpolations(void) // Stick at end of drawscreen
{
int i;
for (i = short_numinterpolations - 1; i >= 0; i--)
*short_curipos[i] = short_bakipos[i];
}
END_SW_NS

View file

@ -30,13 +30,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "pragmas.h"
#include "game.h"
#include "interp.h"
#include "interpso.h"
#include "names2.h"
BEGIN_SW_NS
#define SO_MAXINTERPOLATIONS MAXINTERPOLATIONS
#define SO_MAXINTERPOLATIONS 1024
static struct so_interp
{

View file

@ -60,11 +60,10 @@ short DoSlidorMatch(PLAYERp pp, short match, bool);
bool TestSlidorMatchActive(short match);
void InterpSectorSprites(short sectnum, bool state);
typedef void INTERP_FUNC(int*);
typedef INTERP_FUNC* INTERP_FUNCp;
using INTERP_FUNC = void(*)(int, int);
void SetSlidorActive(short SpriteNum);
void DoSlidorInterp(short, INTERP_FUNCp);
void DoSlidorInterp(short, INTERP_FUNC);
int DoBeginJump(short SpriteNum);
int DoJump(short SpriteNum);

View file

@ -48,7 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "jsector.h"
#include "sector.h"
#include "misc.h"
#include "interp.h"
#include "interpolate.h"
#include "interpso.h"
#include "razemenu.h"
#include "gstrings.h"
@ -7163,8 +7163,7 @@ domovethings(void)
extern int FinishTimer;
updateinterpolations(); // Stick at beginning of domovethings
short_updateinterpolations(); // Stick at beginning of domovethings
UpdateInterpolations(); // Stick at beginning of domovethings
so_updateinterpolations(); // Stick at beginning of domovethings
MoveSkipSavePos();

View file

@ -32,7 +32,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "network.h"
#include "tags.h"
#include "sector.h"
#include "interp.h"
#include "interpolate.h"
#include "sprite.h"
#include "quotemgr.h"
@ -273,14 +273,14 @@ void DoRotatorSetInterp(short SpriteNum)
// move points
for (w = startwall; w <= endwall; w++)
{
setinterpolation(&wall[w].x);
setinterpolation(&wall[w].y);
StartInterpolation(w, Interp_Wall_X);
StartInterpolation(w, Interp_Wall_Y);
uint16_t const nextwall = wall[w].nextwall;
if (nextwall < MAXWALLS)
{
setinterpolation(&wall[wall[nextwall].point2].x);
setinterpolation(&wall[wall[nextwall].point2].y);
StartInterpolation(wall[nextwall].point2, Interp_Wall_X);
StartInterpolation(wall[nextwall].point2, Interp_Wall_Y);
}
}
}
@ -296,14 +296,14 @@ void DoRotatorStopInterp(short SpriteNum)
// move points
for (w = startwall; w <= endwall; w++)
{
stopinterpolation(&wall[w].x);
stopinterpolation(&wall[w].y);
StopInterpolation(w, Interp_Wall_X);
StopInterpolation(w, Interp_Wall_Y);
uint16_t const nextwall = wall[w].nextwall;
if (nextwall < MAXWALLS)
{
stopinterpolation(&wall[wall[nextwall].point2].x);
stopinterpolation(&wall[wall[nextwall].point2].y);
StopInterpolation(wall[nextwall].point2, Interp_Wall_X);
StopInterpolation(wall[nextwall].point2, Interp_Wall_Y);
}
}
}

View file

@ -35,7 +35,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "game.h"
#include "tags.h"
#include "lists.h"
#include "interp.h"
#include "interpolate.h"
#include "interpso.h"
#include "network.h"
@ -560,26 +560,6 @@ bool GameInterface::SaveGame()
MWRITE(&MoveSkip4,sizeof(MoveSkip4),1,fil);
MWRITE(&MoveSkip8,sizeof(MoveSkip8),1,fil);
// long interpolations
MWRITE(&numinterpolations,sizeof(numinterpolations),1,fil);
MWRITE(oldipos,sizeof(oldipos),1,fil);
MWRITE(bakipos,sizeof(bakipos),1,fil);
for (i = numinterpolations - 1; i >= 0; i--)
{
saveisshot |= SaveSymDataInfo(fil, curipos[i]);
assert(!saveisshot);
}
// short interpolations
MWRITE(&short_numinterpolations,sizeof(short_numinterpolations),1,fil);
MWRITE(short_oldipos,sizeof(short_oldipos),1,fil);
MWRITE(short_bakipos,sizeof(short_bakipos),1,fil);
for (i = short_numinterpolations - 1; i >= 0; i--)
{
saveisshot |= SaveSymDataInfo(fil, short_curipos[i]);
assert(!saveisshot);
}
// SO interpolations
saveisshot |= so_writeinterpolations(fil);
assert(!saveisshot);
@ -919,22 +899,6 @@ bool GameInterface::LoadGame()
MREAD(&MoveSkip4,sizeof(MoveSkip4),1,fil);
MREAD(&MoveSkip8,sizeof(MoveSkip8),1,fil);
// long interpolations
MREAD(&numinterpolations,sizeof(numinterpolations),1,fil);
MREAD(oldipos,sizeof(oldipos),1,fil);
MREAD(bakipos,sizeof(bakipos),1,fil);
for (i = numinterpolations - 1; i >= 0; i--)
saveisshot |= LoadSymDataInfo(fil, (void **)&curipos[i]);
if (saveisshot) { MCLOSE_READ(fil); return false; }
// short interpolations
MREAD(&short_numinterpolations,sizeof(short_numinterpolations),1,fil);
MREAD(short_oldipos,sizeof(short_oldipos),1,fil);
MREAD(short_bakipos,sizeof(short_bakipos),1,fil);
for (i = short_numinterpolations - 1; i >= 0; i--)
saveisshot |= LoadSymDataInfo(fil, (void **)&short_curipos[i]);
if (saveisshot) { MCLOSE_READ(fil); return false; }
// SO interpolations
saveisshot |= so_readinterpolations(fil);
if (saveisshot) { MCLOSE_READ(fil); return false; }

View file

@ -32,7 +32,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "network.h"
#include "tags.h"
#include "sector.h"
#include "interp.h"
#include "interpolate.h"
#include "misc.h"
#include "sprite.h"
#include "quotemgr.h"
@ -98,7 +98,7 @@ void SetSlidorActive(short SpriteNum)
r = u->rotator;
DoSlidorInterp(SpriteNum, setinterpolation);
DoSlidorInterp(SpriteNum, StartInterpolation);
// play activate sound
DoSoundSpotMatch(SP_TAG2(sp), 1, SOUND_OBJECT_TYPE);
@ -118,7 +118,7 @@ void SetSlidorInactive(short SpriteNum)
USERp u = User[SpriteNum];
SPRITEp sp = u->SpriteP;
DoSlidorInterp(SpriteNum, stopinterpolation);
DoSlidorInterp(SpriteNum, StopInterpolation);
// play inactivate sound
DoSoundSpotMatch(SP_TAG2(sp), 2, SOUND_OBJECT_TYPE);
@ -257,7 +257,7 @@ TestSlidorMatchActive(short match)
return false;
}
void DoSlidorInterp(short SpriteNum, INTERP_FUNCp interp_func)
void DoSlidorInterp(short SpriteNum, INTERP_FUNC interp_func)
{
short w, pw, startwall, endwall;
@ -279,18 +279,18 @@ void DoSlidorInterp(short SpriteNum, INTERP_FUNCp interp_func)
if (nextwall >= MAXWALLS)
{
// white wall - move 4 points
interp_func(&wall[w].x);
interp_func(&wall[pw].x);
interp_func(&wall[wall[w].point2].x);
interp_func(&wall[wall[wall[w].point2].point2].x);
interp_func(w, Interp_Wall_X);
interp_func(pw, Interp_Wall_X);
interp_func(wall[w].point2, Interp_Wall_X);
interp_func(wall[wall[w].point2].point2, Interp_Wall_X);
}
else
{
// red wall - move 2 points
interp_func(&wall[w].x);
interp_func(&wall[wall[nextwall].point2].x);
interp_func(&wall[wall[w].point2].x);
interp_func(&wall[wall[wall[wall[w].point2].nextwall].point2].x);
interp_func(w, Interp_Wall_X);
interp_func(wall[nextwall].point2, Interp_Wall_X);
interp_func(wall[w].point2, Interp_Wall_X);
interp_func(wall[wall[wall[w].point2].nextwall].point2, Interp_Wall_X);
}
break;
@ -307,18 +307,18 @@ void DoSlidorInterp(short SpriteNum, INTERP_FUNCp interp_func)
if (nextwall >= MAXWALLS)
{
// white wall - move 4 points
interp_func(&wall[w].x);
interp_func(&wall[pw].x);
interp_func(&wall[wall[w].point2].x);
interp_func(&wall[wall[wall[w].point2].point2].x);
interp_func(w, Interp_Wall_X);
interp_func(pw, Interp_Wall_X);
interp_func(wall[w].point2, Interp_Wall_X);
interp_func(wall[wall[w].point2].point2, Interp_Wall_X);
}
else
{
// red wall - move 2 points
interp_func(&wall[w].x);
interp_func(&wall[wall[nextwall].point2].x);
interp_func(&wall[wall[w].point2].x);
interp_func(&wall[wall[wall[wall[w].point2].nextwall].point2].x);
interp_func(w, Interp_Wall_X);
interp_func(wall[nextwall].point2, Interp_Wall_X);
interp_func(wall[w].point2, Interp_Wall_X);
interp_func(wall[wall[wall[w].point2].nextwall].point2, Interp_Wall_X);
}
break;
@ -334,17 +334,17 @@ void DoSlidorInterp(short SpriteNum, INTERP_FUNCp interp_func)
uint16_t const nextwall = wall[w].nextwall;
if (nextwall >= MAXWALLS)
{
interp_func(&wall[w].y);
interp_func(&wall[pw].y);
interp_func(&wall[wall[w].point2].y);
interp_func(&wall[wall[wall[w].point2].point2].y);
interp_func(w, Interp_Wall_Y);
interp_func(pw, Interp_Wall_Y);
interp_func(wall[w].point2, Interp_Wall_Y);
interp_func(wall[wall[w].point2].point2, Interp_Wall_Y);
}
else
{
interp_func(&wall[w].y);
interp_func(&wall[wall[nextwall].point2].y);
interp_func(&wall[wall[w].point2].y);
interp_func(&wall[wall[wall[wall[w].point2].nextwall].point2].y);
interp_func(w, Interp_Wall_Y);
interp_func(wall[nextwall].point2, Interp_Wall_Y);
interp_func(wall[w].point2, Interp_Wall_Y);
interp_func(wall[wall[wall[w].point2].nextwall].point2, Interp_Wall_Y);
}
break;
@ -360,17 +360,17 @@ void DoSlidorInterp(short SpriteNum, INTERP_FUNCp interp_func)
uint16_t const nextwall = wall[w].nextwall;
if (nextwall >= MAXWALLS)
{
interp_func(&wall[w].y);
interp_func(&wall[pw].y);
interp_func(&wall[wall[w].point2].y);
interp_func(&wall[wall[wall[w].point2].point2].y);
interp_func(w, Interp_Wall_Y);
interp_func(pw, Interp_Wall_Y);
interp_func(wall[w].point2, Interp_Wall_Y);
interp_func(wall[wall[w].point2].point2, Interp_Wall_Y);
}
else
{
interp_func(&wall[w].y);
interp_func(&wall[wall[nextwall].point2].y);
interp_func(&wall[wall[w].point2].y);
interp_func(&wall[wall[wall[wall[w].point2].nextwall].point2].y);
interp_func(w, Interp_Wall_Y);
interp_func(wall[nextwall].point2, Interp_Wall_Y);
interp_func(wall[w].point2, Interp_Wall_Y);
interp_func(wall[wall[wall[w].point2].nextwall].point2, Interp_Wall_Y);
}
break;

View file

@ -32,6 +32,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "tags.h"
#include "sector.h"
#include "sprite.h"
#include "interpolate.h"
BEGIN_SW_NS
@ -101,9 +102,9 @@ void SetSpikeActive(short SpriteNum)
SECTORp sectp = &sector[sp->sectnum];
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
short_setinterpolation(&sectp->ceilingheinum);
StartInterpolation(sp->sectnum, Interp_Sect_Ceilingheinum);
else
short_setinterpolation(&sectp->floorheinum);
StartInterpolation(sp->sectnum, Interp_Sect_Floorheinum);
InterpSectorSprites(sp->sectnum, true);
@ -129,9 +130,9 @@ void SetSpikeInactive(short SpriteNum)
SECTORp sectp = &sector[sp->sectnum];
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
short_stopinterpolation(&sectp->ceilingheinum);
StopInterpolation(sp->sectnum, Interp_Sect_Ceilingheinum);
else
short_stopinterpolation(&sectp->floorheinum);
StopInterpolation(sp->sectnum, Interp_Sect_Floorheinum);
InterpSectorSprites(sp->sectnum, false);

View file

@ -38,7 +38,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "pal.h"
#include "sounds.h"
#include "interp.h"
#include "interpolate.h"
#include "interpso.h"
#include "sprite.h"
#include "weapon.h"
@ -656,9 +656,7 @@ KillSprite(int16_t SpriteNum)
// any Anims attached
AnimDelete(&u->sz);
AnimDelete(&sp->z);
stopinterpolation(&sp->x);
stopinterpolation(&sp->y);
stopinterpolation(&sp->z);
StopInterpolation(SpriteNum, Interp_Sprite_Z);
//if (TEST(u->Flags2, SPR2_DONT_TARGET_OWNER))
// Zombies--;

View file

@ -32,7 +32,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "network.h"
#include "tags.h"
#include "sector.h"
#include "interp.h"
#include "interpolate.h"
#include "misc.h"
#include "sprite.h"
#include "weapon.h"
@ -106,9 +106,9 @@ void SetVatorActive(short SpriteNum)
SECTORp sectp = &sector[sp->sectnum];
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
setinterpolation(&sectp->ceilingz);
StartInterpolation(sp->sectnum, Interp_Sect_Ceilingz);
else
setinterpolation(&sectp->floorz);
StartInterpolation(sp->sectnum, Interp_Sect_Floorz);
InterpSectorSprites(sp->sectnum, true);
@ -134,9 +134,9 @@ void SetVatorInactive(short SpriteNum)
SECTORp sectp = &sector[sp->sectnum];
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
stopinterpolation(&sectp->ceilingz);
StopInterpolation(sp->sectnum, Interp_Sect_Ceilingz);
else
stopinterpolation(&sectp->floorz);
StopInterpolation(sp->sectnum, Interp_Sect_Floorz);
InterpSectorSprites(sp->sectnum, false);
@ -339,9 +339,9 @@ void InterpSectorSprites(short sectnum, bool state)
}
if (state)
setinterpolation(&sp->z);
StartInterpolation(i, Interp_Sprite_Z);
else
stopinterpolation(&sp->z);
StopInterpolation(i, Interp_Sprite_Z);
}
}

View file

@ -29,7 +29,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "names2.h"
#include "panel.h"
#include "misc.h"
#include "interp.h"
#include "interpso.h"
#include "tags.h"
#include "break.h"