SW change breaking compatibility with existing saved games:

Remove startofdynamicinterpolations and short_startofdynamicinterpolations.
This commit is contained in:
NY00123 2020-04-14 00:09:18 +03:00 committed by Christoph Oelckers
parent 18602d41c9
commit bf0ace3748
4 changed files with 6 additions and 10 deletions

View file

@ -34,7 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS BEGIN_SW_NS
#define MAXINTERPOLATIONS 1024 #define MAXINTERPOLATIONS 1024
int numinterpolations = 0, startofdynamicinterpolations = 0; int numinterpolations = 0;
int oldipos[MAXINTERPOLATIONS]; int oldipos[MAXINTERPOLATIONS];
int bakipos[MAXINTERPOLATIONS]; int bakipos[MAXINTERPOLATIONS];
int *curipos[MAXINTERPOLATIONS]; int *curipos[MAXINTERPOLATIONS];
@ -61,7 +61,7 @@ void stopinterpolation(int *posptr)
{ {
int i; int i;
for (i = numinterpolations - 1; i >= startofdynamicinterpolations; i--) for (i = numinterpolations - 1; i >= 0; i--)
{ {
if (curipos[i] == posptr) if (curipos[i] == posptr)
{ {

View file

@ -26,13 +26,13 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS BEGIN_SW_NS
#define SHORT_MAXINTERPOLATIONS 256 #define SHORT_MAXINTERPOLATIONS 256
extern short short_numinterpolations, short_startofdynamicinterpolations; extern short short_numinterpolations;
extern short short_oldipos[SHORT_MAXINTERPOLATIONS]; extern short short_oldipos[SHORT_MAXINTERPOLATIONS];
extern short short_bakipos[SHORT_MAXINTERPOLATIONS]; extern short short_bakipos[SHORT_MAXINTERPOLATIONS];
extern short *short_curipos[SHORT_MAXINTERPOLATIONS]; extern short *short_curipos[SHORT_MAXINTERPOLATIONS];
#define MAXINTERPOLATIONS 1024 #define MAXINTERPOLATIONS 1024
extern int numinterpolations, startofdynamicinterpolations; extern int numinterpolations;
extern int oldipos[MAXINTERPOLATIONS]; extern int oldipos[MAXINTERPOLATIONS];
extern int bakipos[MAXINTERPOLATIONS]; extern int bakipos[MAXINTERPOLATIONS];
extern int *curipos[MAXINTERPOLATIONS]; extern int *curipos[MAXINTERPOLATIONS];

View file

@ -34,7 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS BEGIN_SW_NS
#define SHORT_MAXINTERPOLATIONS 256 #define SHORT_MAXINTERPOLATIONS 256
short short_numinterpolations = 0, short_startofdynamicinterpolations = 0; short short_numinterpolations = 0;
short short_oldipos[SHORT_MAXINTERPOLATIONS]; short short_oldipos[SHORT_MAXINTERPOLATIONS];
short short_bakipos[SHORT_MAXINTERPOLATIONS]; short short_bakipos[SHORT_MAXINTERPOLATIONS];
short *short_curipos[SHORT_MAXINTERPOLATIONS]; short *short_curipos[SHORT_MAXINTERPOLATIONS];
@ -61,7 +61,7 @@ void short_stopinterpolation(short *posptr)
{ {
int i; int i;
for (i = short_numinterpolations - 1; i >= short_startofdynamicinterpolations; i--) for (i = short_numinterpolations - 1; i >= 0; i--)
{ {
if (short_curipos[i] == posptr) if (short_curipos[i] == posptr)
{ {

View file

@ -594,7 +594,6 @@ bool GameInterface::SaveGame(FSaveGameNode *sv)
// long interpolations // long interpolations
MWRITE(&numinterpolations,sizeof(numinterpolations),1,fil); MWRITE(&numinterpolations,sizeof(numinterpolations),1,fil);
MWRITE(&startofdynamicinterpolations,sizeof(startofdynamicinterpolations),1,fil);
MWRITE(oldipos,sizeof(oldipos),1,fil); MWRITE(oldipos,sizeof(oldipos),1,fil);
MWRITE(bakipos,sizeof(bakipos),1,fil); MWRITE(bakipos,sizeof(bakipos),1,fil);
for (i = numinterpolations - 1; i >= 0; i--) for (i = numinterpolations - 1; i >= 0; i--)
@ -605,7 +604,6 @@ bool GameInterface::SaveGame(FSaveGameNode *sv)
// short interpolations // short interpolations
MWRITE(&short_numinterpolations,sizeof(short_numinterpolations),1,fil); MWRITE(&short_numinterpolations,sizeof(short_numinterpolations),1,fil);
MWRITE(&short_startofdynamicinterpolations,sizeof(short_startofdynamicinterpolations),1,fil);
MWRITE(short_oldipos,sizeof(short_oldipos),1,fil); MWRITE(short_oldipos,sizeof(short_oldipos),1,fil);
MWRITE(short_bakipos,sizeof(short_bakipos),1,fil); MWRITE(short_bakipos,sizeof(short_bakipos),1,fil);
for (i = short_numinterpolations - 1; i >= 0; i--) for (i = short_numinterpolations - 1; i >= 0; i--)
@ -983,7 +981,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
// long interpolations // long interpolations
MREAD(&numinterpolations,sizeof(numinterpolations),1,fil); MREAD(&numinterpolations,sizeof(numinterpolations),1,fil);
MREAD(&startofdynamicinterpolations,sizeof(startofdynamicinterpolations),1,fil);
MREAD(oldipos,sizeof(oldipos),1,fil); MREAD(oldipos,sizeof(oldipos),1,fil);
MREAD(bakipos,sizeof(bakipos),1,fil); MREAD(bakipos,sizeof(bakipos),1,fil);
for (i = numinterpolations - 1; i >= 0; i--) for (i = numinterpolations - 1; i >= 0; i--)
@ -992,7 +989,6 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
// short interpolations // short interpolations
MREAD(&short_numinterpolations,sizeof(short_numinterpolations),1,fil); MREAD(&short_numinterpolations,sizeof(short_numinterpolations),1,fil);
MREAD(&short_startofdynamicinterpolations,sizeof(short_startofdynamicinterpolations),1,fil);
MREAD(short_oldipos,sizeof(short_oldipos),1,fil); MREAD(short_oldipos,sizeof(short_oldipos),1,fil);
MREAD(short_bakipos,sizeof(short_bakipos),1,fil); MREAD(short_bakipos,sizeof(short_bakipos),1,fil);
for (i = short_numinterpolations - 1; i >= 0; i--) for (i = short_numinterpolations - 1; i >= 0; i--)