Save TROR-related information into map states and bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@2449 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-11 17:37:08 +00:00
parent 6dd048dc84
commit ba9a3f9d1b
5 changed files with 25 additions and 6 deletions

View file

@ -68,7 +68,7 @@ extern "C" {
#define SAMESIZE_ACTOR_T
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
#define BYTEVERSION_JF 237
#define BYTEVERSION_JF 240
#define BYTEVERSION_13 27
#define BYTEVERSION_14 116

View file

@ -5100,6 +5100,11 @@ void G_SaveMapState(mapstate_t *save)
Bmemcpy(&save->headspritestat[0],&headspritestat[0],sizeof(headspritestat));
Bmemcpy(&save->prevspritestat[0],&prevspritestat[0],sizeof(prevspritestat));
Bmemcpy(&save->nextspritestat[0],&nextspritestat[0],sizeof(nextspritestat));
#ifdef YAX_ENABLE
Bmemcpy(&save->numyaxbunches, &numyaxbunches, sizeof(numyaxbunches));
Bmemcpy(save->yax_bunchnum, yax_bunchnum, sizeof(yax_bunchnum));
Bmemcpy(save->yax_nextwall, yax_nextwall, sizeof(yax_nextwall));
#endif
#if !defined SAMESIZE_ACTOR_T
for (i=MAXSPRITES-1; i>=0; i--)
{
@ -5236,6 +5241,11 @@ void G_RestoreMapState(mapstate_t *save)
Bmemcpy(&headspritestat[0],&save->headspritestat[0],sizeof(headspritestat));
Bmemcpy(&prevspritestat[0],&save->prevspritestat[0],sizeof(prevspritestat));
Bmemcpy(&nextspritestat[0],&save->nextspritestat[0],sizeof(nextspritestat));
#ifdef YAX_ENABLE
Bmemcpy(&numyaxbunches, &save->numyaxbunches, sizeof(numyaxbunches));
Bmemcpy(yax_bunchnum, save->yax_bunchnum, sizeof(yax_bunchnum));
Bmemcpy(yax_nextwall, save->yax_nextwall, sizeof(yax_nextwall));
#endif
Bmemcpy(&actor[0],&save->actor[0],sizeof(actor_t)*MAXSPRITES);
#if !defined SAMESIZE_ACTOR_T
for (i=MAXSPRITES-1; i>=0; i--)
@ -5333,7 +5343,9 @@ void G_RestoreMapState(mapstate_t *save)
wall[animwall[x].wallnum].picnum = wall[animwall[x].wallnum].extra;
}
#endif
#ifdef YAX_ENABLE
sv_postyaxload();
#endif
G_ResetInterpolations();
Net_ResetPrediction();

View file

@ -1634,9 +1634,6 @@ static uint32_t calcsz(const dataspec_t *spec)
static void sv_prespriteextsave();
static void sv_postspriteext();
#endif
#ifdef YAX_ENABLE
static void sv_postyaxload();
#endif
static void sv_calcbitptrsize();
static void sv_prescriptsave_once();
static void sv_prescriptload_once();
@ -2268,7 +2265,7 @@ static void sv_postspriteext()
#endif
#ifdef YAX_ENABLE
static void sv_postyaxload()
void sv_postyaxload(void)
{
yax_update(numyaxbunches>0 ? 2 : 1);
}

View file

@ -71,6 +71,11 @@ int32_t G_LoadPlayer(int32_t spot);
int32_t G_LoadSaveHeaderNew(int32_t spot, savehead_t *saveh);
//int32_t G_LoadSaveHeader(char spot,struct savehead_ *saveh);
void ReadSaveGameHeaders(void);
#ifdef YAX_ENABLE
extern void sv_postyaxload(void);
#endif
extern char *bitptr;
enum

View file

@ -77,6 +77,11 @@ typedef struct {
spriteext_t spriteext[MAXSPRITES];
spritetype sprite[MAXSPRITES];
walltype wall[MAXWALLS];
#ifdef YAX_ENABLE
int32_t numyaxbunches;
int16_t yax_bunchnum[MAXSECTORS][2];
int16_t yax_nextwall[MAXWALLS][2];
#endif
} mapstate_t;
extern void G_SaveMapState(mapstate_t *save);