SAGA2: Stub checkRestartGame

This commit is contained in:
a/ 2021-06-09 02:00:13 +09:00 committed by Eugene Sandulenko
parent cb9004e2a0
commit f53042a224
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
3 changed files with 10 additions and 17 deletions

View File

@ -492,25 +492,16 @@ void cleanupGameState(void) {
#include <time.h>
#endif
void checkRestartGame(char *exeName) {
#ifdef DEBUG_FILETIME
int32 d1, d2;
char datebuf[64];
#endif
void checkRestartGame(const char *exeName) {
#if 0
char saveRestart[260];
getSaveFileName(999, saveRestart);
#ifdef DEBUG_FILETIME
d1 = getFileDate(exeName);
d2 = getFileDate(saveRestart);
strftime(datebuf, 64, "%c", localtime(&d1));
WriteStatusF(12, "Date:%s File %s", datebuf, exeName);
strftime(datebuf, 64, "%c", localtime(&d2));
WriteStatusF(13, "Date:%s File %s", datebuf, saveRestart);
#endif
if (!fileExists(saveRestart) ||
(getFileDate(exeName) > getFileDate(saveRestart)))
saveGameState(999, saveRestart);
#endif
warning("STUB: checkRestartGame()");
}

View File

@ -41,7 +41,7 @@ void loadSavedGameState(int16 saveNo);
// Cleanup the game state
void cleanupGameState(void);
void checkRestartGame(char *exeName);
void checkRestartGame(const char *exeName);
void loadRestartGame(void);
void getSaveFileName(int16 saveNo, char *fileName);

View File

@ -185,7 +185,7 @@ void lightsOut(void);
void cleanupGame(void); // auto-cleanup function
void RShowMem(void);
void parseCommandLine(int argc, char *argv[]);
char *getExeFromCommandLine(int argc, char *argv[]);
const char *getExeFromCommandLine(int argc, char *argv[]);
void WriteStatusF2(int16 line, const char *msg, ...);
bool initUserDialog(void);
void cleanupUserDialog(void);
@ -241,7 +241,7 @@ void main_saga2() {
void updateActiveRegions(void);
static void mainLoop(bool &cleanExit, int argc, char *argv[]) {
char *exeFile = getExeFromCommandLine(argc, argv);
const char *exeFile = getExeFromCommandLine(argc, argv);
if (displayEnabled())
displayUpdate();
checkRestartGame(exeFile);
@ -441,7 +441,9 @@ void SystemEventLoop(void) {
// ------------------------------------------------------------------------
// Determines the EXE file executed from command line info
char *getExeFromCommandLine(int argc, char *argv[]) {
const char *getExeFromCommandLine(int argc, char *argv[]) {
if (argv == nullptr)
return "scummvm";
return argv[0];
}