* Removed unused info from struct as part of clean up.
* Made botskin being invalid make the entire save invalid.
This commit is contained in:
parent
a81c3ca115
commit
00c62e6d88
22
src/m_menu.c
22
src/m_menu.c
|
@ -6079,6 +6079,18 @@ static void M_DrawLoadGameData(void)
|
||||||
{
|
{
|
||||||
V_DrawSmallScaledPatch(x+2, y+64, 0, savselp[5]);
|
V_DrawSmallScaledPatch(x+2, y+64, 0, savselp[5]);
|
||||||
}
|
}
|
||||||
|
#ifndef PERFECTSAVE // disabled, don't touch
|
||||||
|
else if ((savegameinfo[savetodraw].skinnum == 1)
|
||||||
|
&& (savegameinfo[savetodraw].lives == 99)
|
||||||
|
&& (savegameinfo[savetodraw].gamemap & 8192)
|
||||||
|
&& (savegameinfo[savetodraw].numgameovers == 0)
|
||||||
|
&& (savegameinfo[savetodraw].numemeralds == (1<<7 - 1)) // perfect save
|
||||||
|
{
|
||||||
|
V_DrawFill(x+6, y+64, 72, 50, 134);
|
||||||
|
V_DrawFill(x+6, y+74, 72, 30, 201);
|
||||||
|
V_DrawFill(x+6, y+84, 72, 10, 1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (savegameinfo[savetodraw].lives == -42)
|
if (savegameinfo[savetodraw].lives == -42)
|
||||||
|
@ -6360,15 +6372,9 @@ static void M_ReadSavegameInfo(UINT32 slot)
|
||||||
if (((fake-1) & 8191) >= NUMMAPS) BADSAVE
|
if (((fake-1) & 8191) >= NUMMAPS) BADSAVE
|
||||||
|
|
||||||
if(!mapheaderinfo[(fake-1) & 8191])
|
if(!mapheaderinfo[(fake-1) & 8191])
|
||||||
{
|
|
||||||
savegameinfo[slot].levelname[0] = '\0';
|
savegameinfo[slot].levelname[0] = '\0';
|
||||||
savegameinfo[slot].actnum = 0;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
strcpy(savegameinfo[slot].levelname, mapheaderinfo[(fake-1) & 8191]->lvlttl);
|
strcpy(savegameinfo[slot].levelname, mapheaderinfo[(fake-1) & 8191]->lvlttl);
|
||||||
savegameinfo[slot].actnum = mapheaderinfo[(fake-1) & 8191]->actnum;
|
|
||||||
}
|
|
||||||
|
|
||||||
savegameinfo[slot].gamemap = fake;
|
savegameinfo[slot].gamemap = fake;
|
||||||
|
|
||||||
|
@ -6390,10 +6396,10 @@ static void M_ReadSavegameInfo(UINT32 slot)
|
||||||
savegameinfo[slot].botskin = fake >> 5;
|
savegameinfo[slot].botskin = fake >> 5;
|
||||||
if (savegameinfo[slot].botskin-1 >= numskins
|
if (savegameinfo[slot].botskin-1 >= numskins
|
||||||
|| !R_SkinUsable(-1, savegameinfo[slot].botskin-1))
|
|| !R_SkinUsable(-1, savegameinfo[slot].botskin-1))
|
||||||
savegameinfo[slot].botskin = 0;
|
BADSAVE
|
||||||
|
|
||||||
CHECKPOS
|
CHECKPOS
|
||||||
(void)READUINT8(save_p); // numgameovers
|
savegameinfo[slot].numgameovers = READUINT8(save_p); // numgameovers
|
||||||
CHECKPOS
|
CHECKPOS
|
||||||
savegameinfo[slot].lives = READSINT8(save_p); // lives
|
savegameinfo[slot].lives = READSINT8(save_p); // lives
|
||||||
CHECKPOS
|
CHECKPOS
|
||||||
|
|
|
@ -216,10 +216,10 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char levelname[32];
|
char levelname[32];
|
||||||
UINT8 actnum;
|
|
||||||
UINT8 skinnum;
|
UINT8 skinnum;
|
||||||
UINT8 botskin;
|
UINT8 botskin;
|
||||||
UINT8 numemeralds;
|
UINT8 numemeralds;
|
||||||
|
UINT8 numgameovers;
|
||||||
INT32 lives;
|
INT32 lives;
|
||||||
INT32 continues;
|
INT32 continues;
|
||||||
INT32 gamemap;
|
INT32 gamemap;
|
||||||
|
|
Loading…
Reference in a new issue