- ported GZDoom's new 'skyoffset' ANIMDEFS option for compatibility purposes.

SVN r1977 (trunk)
This commit is contained in:
Christoph Oelckers 2009-11-13 21:28:39 +00:00
parent 363dfcffbd
commit e0734b3c2d
4 changed files with 23 additions and 3 deletions

View file

@ -87,11 +87,13 @@
#ifndef STAT
#define STAT_NEW(map)
#define STAT_END(newl)
#define STAT_SAVE(arc, hub)
#define STAT_READ(png)
#define STAT_WRITE(f)
#else
void STAT_NEW(const char *lev);
void STAT_END(const char *newl);
void STAT_SAVE(FArchive &arc, bool hubload);
void STAT_READ(PNGHandle *png);
void STAT_WRITE(FILE *f);
#endif
EXTERN_CVAR (Float, sv_gravity)
@ -1524,7 +1526,6 @@ void G_SerializeLevel (FArchive &arc, bool hubLoad)
}
}
screen->EndSerialize(arc);
STAT_SAVE(arc, hubLoad);
}
//==========================================================================
@ -1645,6 +1646,7 @@ void G_WriteSnapshots (FILE *file)
{
unsigned int i;
STAT_WRITE(file);
for (i = 0; i < wadlevelinfos.Size(); i++)
{
if (wadlevelinfos[i].snapshot)
@ -1795,6 +1797,7 @@ void G_ReadSnapshots (PNGHandle *png)
arc << pnum;
}
}
STAT_READ(png);
png->File->ResetFilePtr();
}

View file

@ -405,6 +405,17 @@ static void R_InitAnimDefs ()
{
P_ParseAnimatedDoor (sc);
}
else if (sc.Compare("skyoffset"))
{
sc.MustGetString ();
FTextureID picnum = TexMan.CheckForTexture (sc.String, FTexture::TEX_Wall, texflags);
sc.MustGetNumber();
if (picnum.Exists())
{
FTexture *tex = TexMan[picnum];
tex->SkyOffset = sc.Number;
}
}
else
{
sc.ScriptError (NULL);

View file

@ -606,6 +606,11 @@ struct sector_t
return lightlevel;
}
secplane_t &GetSecPlane(int pos)
{
return pos == floor? floorplane:ceilingplane;
}
bool PlaneMoving(int pos);

View file

@ -121,6 +121,7 @@ public:
// doing it per patch.
WORD Rotations;
SWORD SkyOffset;
enum // UseTypes
{