Save 'Numsprites' into savegames and mapstates. Bump savegame minor version.

git-svn-id: https://svn.eduke32.com/eduke32@2483 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-14 22:31:49 +00:00
parent 76de780d8b
commit acc2a2f70e
4 changed files with 8 additions and 1 deletions

View file

@ -5053,6 +5053,8 @@ void G_SaveMapState(mapstate_t *save)
for (i=0; i<MAXSPRITES; i++)
spriteext[i].tspr = NULL;
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
save->numsprites = Numsprites;
save->tailspritefree = tailspritefree;
Bmemcpy(&save->headspritesect[0],&headspritesect[0],sizeof(headspritesect));
Bmemcpy(&save->prevspritesect[0],&prevspritesect[0],sizeof(prevspritesect));
@ -5150,6 +5152,8 @@ void G_RestoreMapState(mapstate_t *save)
else
for (i=0; i<MAXSPRITES; i++)
spriteext[i].tspr = NULL;
Numsprites = save->numsprites;
tailspritefree = save->tailspritefree;
Bmemcpy(&headspritesect[0],&save->headspritesect[0],sizeof(headspritesect));
Bmemcpy(&prevspritesect[0],&save->prevspritesect[0],sizeof(prevspritesect));

View file

@ -878,6 +878,7 @@ static const dataspec_t svgm_secwsp[] =
{ DS_CNT(numwalls), yax_nextwall, sizeof(yax_nextwall[0]), (intptr_t)&numwalls },
{ DS_LOADFN|DS_PROTECTFN, (void *)&sv_postyaxload, 0, 1 },
#endif
{ 0, &Numsprites, sizeof(Numsprites), 1 },
{ 0, &tailspritefree, sizeof(tailspritefree), 1 },
{ 0, &headspritesect[0], sizeof(headspritesect[0]), MAXSECTORS+1 },
{ 0, &prevspritesect[0], sizeof(prevspritesect[0]), MAXSPRITES },

View file

@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define __savegame_h__
#define SV_MAJOR_VER 1
#define SV_MINOR_VER 2
#define SV_MINOR_VER 3
#pragma pack(push,1)
typedef struct

View file

@ -53,6 +53,8 @@ typedef struct {
int16_t g_numAnimWalls;
int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128];
int16_t g_numCyclers;
int32_t numsprites;
int16_t tailspritefree;
int16_t headspritesect[MAXSECTORS+1];
int16_t headspritestat[MAXSTATUS+1];