mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
Fix typo in savegame file name in menu_GameLoad(). Have made this a macro now.
This commit is contained in:
parent
ec2f8715fc
commit
0dbb073b0a
1 changed files with 7 additions and 6 deletions
|
@ -28,6 +28,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define kSaveFileName "savgamea.sav"
|
||||||
#define kMaxSaveSlots 5
|
#define kMaxSaveSlots 5
|
||||||
#define kMaxSaveSlotChars 25
|
#define kMaxSaveSlotChars 25
|
||||||
|
|
||||||
|
@ -1003,13 +1004,13 @@ int menu_NewGameMenu()
|
||||||
|
|
||||||
int nSlot = 0;
|
int nSlot = 0;
|
||||||
|
|
||||||
FILE *fp = fopen("savgamea.sav", "rb");
|
FILE *fp = fopen(kSaveFileName, "rb");
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
memset(nameList, 0, nNameLen);
|
memset(nameList, 0, nNameLen);
|
||||||
memset(&GameStats, 0, sizeof(GameStat));
|
memset(&GameStats, 0, sizeof(GameStat));
|
||||||
|
|
||||||
fp = fopen("savgamea.sav", "wb+");
|
fp = fopen(kSaveFileName, "wb+");
|
||||||
if (fp != NULL)
|
if (fp != NULL)
|
||||||
{
|
{
|
||||||
fwrite(nameList, nNameLen, 1, fp);
|
fwrite(nameList, nNameLen, 1, fp);
|
||||||
|
@ -1189,7 +1190,7 @@ check_keys:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *fp = fopen("savgamea.sav", "rb+");
|
FILE *fp = fopen(kSaveFileName, "rb+");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1286,7 +1287,7 @@ int menu_LoadGameMenu()
|
||||||
|
|
||||||
int nSlot = 0;
|
int nSlot = 0;
|
||||||
|
|
||||||
FILE *fp = fopen("savgamea.sav", "rb");
|
FILE *fp = fopen(kSaveFileName, "rb");
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
memset(nameList, 0, sizeof(nameList));
|
memset(nameList, 0, sizeof(nameList));
|
||||||
|
@ -1410,7 +1411,7 @@ short menu_GameLoad(int nSlot)
|
||||||
{
|
{
|
||||||
memset(&GameStats, 0, sizeof(GameStats));
|
memset(&GameStats, 0, sizeof(GameStats));
|
||||||
|
|
||||||
FILE *fp = fopen("savegamea.sav", "rb");
|
FILE *fp = fopen(kSaveFileName, "rb");
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1446,7 +1447,7 @@ void menu_GameSave(int nSaveSlot)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *fp = fopen("savgamea.sav", "rb+");
|
FILE *fp = fopen(kSaveFileName, "rb+");
|
||||||
if (fp != NULL)
|
if (fp != NULL)
|
||||||
{
|
{
|
||||||
fseek(fp, 125, SEEK_SET); // skip save slot names
|
fseek(fp, 125, SEEK_SET); // skip save slot names
|
||||||
|
|
Loading…
Reference in a new issue