mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Make files with missing skins tell you who the skin is (resolves #1071)
This commit is contained in:
parent
332445ae55
commit
e9e2f20de9
2 changed files with 17 additions and 3 deletions
17
src/m_menu.c
17
src/m_menu.c
|
@ -8432,7 +8432,17 @@ static void M_DrawLoadGameData(void)
|
||||||
if (savegameinfo[savetodraw].lives == -42)
|
if (savegameinfo[savetodraw].lives == -42)
|
||||||
V_DrawRightAlignedThinString(x + 79, y, V_GRAYMAP, "NEW GAME");
|
V_DrawRightAlignedThinString(x + 79, y, V_GRAYMAP, "NEW GAME");
|
||||||
else if (savegameinfo[savetodraw].lives == -666)
|
else if (savegameinfo[savetodraw].lives == -666)
|
||||||
|
{
|
||||||
|
if (savegameinfo[savetodraw].continuescore == -62)
|
||||||
|
{
|
||||||
|
V_DrawRightAlignedThinString(x + 79, y, V_REDMAP, "ADDON NOT LOADED");
|
||||||
|
V_DrawRightAlignedThinString(x + 79, y-10, V_REDMAP, savegameinfo[savetodraw].skinname);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
V_DrawRightAlignedThinString(x + 79, y, V_REDMAP, "CAN'T LOAD!");
|
V_DrawRightAlignedThinString(x + 79, y, V_REDMAP, "CAN'T LOAD!");
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (savegameinfo[savetodraw].gamemap & 8192)
|
else if (savegameinfo[savetodraw].gamemap & 8192)
|
||||||
V_DrawRightAlignedThinString(x + 79, y, V_GREENMAP, "CLEAR!");
|
V_DrawRightAlignedThinString(x + 79, y, V_GREENMAP, "CLEAR!");
|
||||||
else
|
else
|
||||||
|
@ -8665,6 +8675,7 @@ static void M_LoadSelect(INT32 choice)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VERSIONSIZE 16
|
#define VERSIONSIZE 16
|
||||||
|
#define MISSING { savegameinfo[slot].continuescore = -62; savegameinfo[slot].lives = -666; Z_Free(savebuffer); return; }
|
||||||
#define BADSAVE { savegameinfo[slot].lives = -666; Z_Free(savebuffer); return; }
|
#define BADSAVE { savegameinfo[slot].lives = -666; Z_Free(savebuffer); return; }
|
||||||
#define CHECKPOS if (sav_p >= end_p) BADSAVE
|
#define CHECKPOS if (sav_p >= end_p) BADSAVE
|
||||||
// Reads the save file to list lives, level, player, etc.
|
// Reads the save file to list lives, level, player, etc.
|
||||||
|
@ -8761,10 +8772,11 @@ static void M_ReadSavegameInfo(UINT32 slot)
|
||||||
CHECKPOS
|
CHECKPOS
|
||||||
READSTRINGN(sav_p, ourSkinName, SKINNAMESIZE);
|
READSTRINGN(sav_p, ourSkinName, SKINNAMESIZE);
|
||||||
savegameinfo[slot].skinnum = R_SkinAvailable(ourSkinName);
|
savegameinfo[slot].skinnum = R_SkinAvailable(ourSkinName);
|
||||||
|
STRBUFCPY(savegameinfo[slot].skinname, ourSkinName);
|
||||||
|
|
||||||
if (savegameinfo[slot].skinnum >= numskins
|
if (savegameinfo[slot].skinnum >= numskins
|
||||||
|| !R_SkinUsable(-1, savegameinfo[slot].skinnum))
|
|| !R_SkinUsable(-1, savegameinfo[slot].skinnum))
|
||||||
BADSAVE
|
MISSING
|
||||||
|
|
||||||
CHECKPOS
|
CHECKPOS
|
||||||
READSTRINGN(sav_p, botSkinName, SKINNAMESIZE);
|
READSTRINGN(sav_p, botSkinName, SKINNAMESIZE);
|
||||||
|
@ -8772,7 +8784,7 @@ static void M_ReadSavegameInfo(UINT32 slot)
|
||||||
|
|
||||||
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))
|
||||||
BADSAVE
|
MISSING
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECKPOS
|
CHECKPOS
|
||||||
|
@ -8817,6 +8829,7 @@ static void M_ReadSavegameInfo(UINT32 slot)
|
||||||
}
|
}
|
||||||
#undef CHECKPOS
|
#undef CHECKPOS
|
||||||
#undef BADSAVE
|
#undef BADSAVE
|
||||||
|
#undef MISSING
|
||||||
|
|
||||||
//
|
//
|
||||||
// M_ReadSaveStrings
|
// M_ReadSaveStrings
|
||||||
|
|
|
@ -421,6 +421,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
char levelname[32];
|
char levelname[32];
|
||||||
UINT8 skinnum;
|
UINT8 skinnum;
|
||||||
|
char skinname [SKINNAMESIZE+1];
|
||||||
UINT8 botskin;
|
UINT8 botskin;
|
||||||
UINT8 numemeralds;
|
UINT8 numemeralds;
|
||||||
UINT8 numgameovers;
|
UINT8 numgameovers;
|
||||||
|
|
Loading…
Reference in a new issue