diff --git a/src/g_level.cpp b/src/g_level.cpp index a2bd300eda..6e4cd6f4ab 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -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(); } diff --git a/src/r_anim.cpp b/src/r_anim.cpp index c4ed59850a..2ae96f58e1 100644 --- a/src/r_anim.cpp +++ b/src/r_anim.cpp @@ -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); diff --git a/src/r_defs.h b/src/r_defs.h index a14a819ce2..f19656afa7 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -606,6 +606,11 @@ struct sector_t return lightlevel; } + secplane_t &GetSecPlane(int pos) + { + return pos == floor? floorplane:ceilingplane; + } + bool PlaneMoving(int pos); diff --git a/src/textures/textures.h b/src/textures/textures.h index b62da46d80..1bd9282a9a 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -121,6 +121,7 @@ public: // doing it per patch. WORD Rotations; + SWORD SkyOffset; enum // UseTypes {