Fix PBCN saving and increment major version

This commit is contained in:
Simon 2011-07-13 12:03:30 +01:00
parent b4dd9ec056
commit 0fbe6e2d3f
2 changed files with 4 additions and 4 deletions

View File

@ -7,8 +7,8 @@
#define PATH_SEP "/"
#endif
#define SAVE_VERSION 51
#define MINOR_VERSION 1
#define SAVE_VERSION 52
#define MINOR_VERSION 0
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter.
//#define BETA

View File

@ -466,7 +466,7 @@ void *build_save(int *size, int x0, int y0, int w, int h, unsigned char bmap[YRE
for (j=0; j<w*h; j++)
{
i = m[j];
if (i && (parts[i-1].type==PT_CLNE || parts[i-1].type==PT_PCLN || parts[i-1].type==PT_BCLN || parts[i-1].type==PT_SPRK || parts[i-1].type==PT_LAVA || parts[i-1].type==PT_PIPE || parts[i-1].type==PT_LIFE))
if (i && (parts[i-1].type==PT_CLNE || parts[i-1].type==PT_PCLN || parts[i-1].type==PT_BCLN || parts[i-1].type==PT_SPRK || parts[i-1].type==PT_LAVA || parts[i-1].type==PT_PIPE || parts[i-1].type==PT_LIFE || parts[i-1].type==PT_PBCN))
d[p++] = parts[i-1].ctype;
}
@ -978,7 +978,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0, unsigned char
int gnum = 0;
i = m[j];
ty = d[pty+j];
if (i && (ty==PT_CLNE || (ty==PT_PCLN && ver>=43) || (ty==PT_BCLN && ver>=44) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43) || (ty==PT_LIFE && ver>=51)))
if (i && (ty==PT_CLNE || (ty==PT_PCLN && ver>=43) || (ty==PT_BCLN && ver>=44) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43) || (ty==PT_LIFE && ver>=51) || (ty==PT_PBCN && ver>=52)))
{
if (p >= size)
goto corrupt;