mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 05:11:08 +00:00
Merge branch 'newfilewhothis' into 'next'
Make files with missing skins tell you who the skin is (resolves #1071) Closes #1071 See merge request STJr/SRB2!2411
This commit is contained in:
commit
0f65f9fc47
2 changed files with 17 additions and 3 deletions
19
src/m_menu.c
19
src/m_menu.c
|
@ -8670,7 +8670,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)
|
||||||
V_DrawRightAlignedThinString(x + 79, y, V_REDMAP, "CAN'T LOAD!");
|
{
|
||||||
|
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!");
|
||||||
|
}
|
||||||
|
}
|
||||||
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
|
||||||
|
@ -8903,6 +8913,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.
|
||||||
|
@ -8999,10 +9010,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);
|
||||||
|
@ -9010,7 +9022,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
|
||||||
|
@ -9055,6 +9067,7 @@ static void M_ReadSavegameInfo(UINT32 slot)
|
||||||
}
|
}
|
||||||
#undef CHECKPOS
|
#undef CHECKPOS
|
||||||
#undef BADSAVE
|
#undef BADSAVE
|
||||||
|
#undef MISSING
|
||||||
|
|
||||||
//
|
//
|
||||||
// M_ReadSaveStrings
|
// M_ReadSaveStrings
|
||||||
|
|
|
@ -422,6 +422,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