mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
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:
parent
76de780d8b
commit
acc2a2f70e
4 changed files with 8 additions and 1 deletions
|
@ -5053,6 +5053,8 @@ void G_SaveMapState(mapstate_t *save)
|
||||||
for (i=0; i<MAXSPRITES; i++)
|
for (i=0; i<MAXSPRITES; i++)
|
||||||
spriteext[i].tspr = NULL;
|
spriteext[i].tspr = NULL;
|
||||||
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
||||||
|
|
||||||
|
save->numsprites = Numsprites;
|
||||||
save->tailspritefree = tailspritefree;
|
save->tailspritefree = tailspritefree;
|
||||||
Bmemcpy(&save->headspritesect[0],&headspritesect[0],sizeof(headspritesect));
|
Bmemcpy(&save->headspritesect[0],&headspritesect[0],sizeof(headspritesect));
|
||||||
Bmemcpy(&save->prevspritesect[0],&prevspritesect[0],sizeof(prevspritesect));
|
Bmemcpy(&save->prevspritesect[0],&prevspritesect[0],sizeof(prevspritesect));
|
||||||
|
@ -5150,6 +5152,8 @@ void G_RestoreMapState(mapstate_t *save)
|
||||||
else
|
else
|
||||||
for (i=0; i<MAXSPRITES; i++)
|
for (i=0; i<MAXSPRITES; i++)
|
||||||
spriteext[i].tspr = NULL;
|
spriteext[i].tspr = NULL;
|
||||||
|
|
||||||
|
Numsprites = save->numsprites;
|
||||||
tailspritefree = save->tailspritefree;
|
tailspritefree = save->tailspritefree;
|
||||||
Bmemcpy(&headspritesect[0],&save->headspritesect[0],sizeof(headspritesect));
|
Bmemcpy(&headspritesect[0],&save->headspritesect[0],sizeof(headspritesect));
|
||||||
Bmemcpy(&prevspritesect[0],&save->prevspritesect[0],sizeof(prevspritesect));
|
Bmemcpy(&prevspritesect[0],&save->prevspritesect[0],sizeof(prevspritesect));
|
||||||
|
|
|
@ -878,6 +878,7 @@ static const dataspec_t svgm_secwsp[] =
|
||||||
{ DS_CNT(numwalls), yax_nextwall, sizeof(yax_nextwall[0]), (intptr_t)&numwalls },
|
{ DS_CNT(numwalls), yax_nextwall, sizeof(yax_nextwall[0]), (intptr_t)&numwalls },
|
||||||
{ DS_LOADFN|DS_PROTECTFN, (void *)&sv_postyaxload, 0, 1 },
|
{ DS_LOADFN|DS_PROTECTFN, (void *)&sv_postyaxload, 0, 1 },
|
||||||
#endif
|
#endif
|
||||||
|
{ 0, &Numsprites, sizeof(Numsprites), 1 },
|
||||||
{ 0, &tailspritefree, sizeof(tailspritefree), 1 },
|
{ 0, &tailspritefree, sizeof(tailspritefree), 1 },
|
||||||
{ 0, &headspritesect[0], sizeof(headspritesect[0]), MAXSECTORS+1 },
|
{ 0, &headspritesect[0], sizeof(headspritesect[0]), MAXSECTORS+1 },
|
||||||
{ 0, &prevspritesect[0], sizeof(prevspritesect[0]), MAXSPRITES },
|
{ 0, &prevspritesect[0], sizeof(prevspritesect[0]), MAXSPRITES },
|
||||||
|
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define __savegame_h__
|
#define __savegame_h__
|
||||||
|
|
||||||
#define SV_MAJOR_VER 1
|
#define SV_MAJOR_VER 1
|
||||||
#define SV_MINOR_VER 2
|
#define SV_MINOR_VER 3
|
||||||
|
|
||||||
#pragma pack(push,1)
|
#pragma pack(push,1)
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -53,6 +53,8 @@ typedef struct {
|
||||||
int16_t g_numAnimWalls;
|
int16_t g_numAnimWalls;
|
||||||
int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128];
|
int16_t g_numClouds,clouds[128],cloudx[128],cloudy[128];
|
||||||
int16_t g_numCyclers;
|
int16_t g_numCyclers;
|
||||||
|
|
||||||
|
int32_t numsprites;
|
||||||
int16_t tailspritefree;
|
int16_t tailspritefree;
|
||||||
int16_t headspritesect[MAXSECTORS+1];
|
int16_t headspritesect[MAXSECTORS+1];
|
||||||
int16_t headspritestat[MAXSTATUS+1];
|
int16_t headspritestat[MAXSTATUS+1];
|
||||||
|
|
Loading…
Reference in a new issue