diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/alan2/alan2.cpp | 2 | ||||
-rw-r--r-- | engines/glk/alan2/debug.cpp | 4 | ||||
-rw-r--r-- | engines/glk/alan2/main.cpp | 18 | ||||
-rw-r--r-- | engines/glk/alan2/main.h | 1 |
4 files changed, 5 insertions, 20 deletions
diff --git a/engines/glk/alan2/alan2.cpp b/engines/glk/alan2/alan2.cpp index 0ad524bd47..7e942b15e5 100644 --- a/engines/glk/alan2/alan2.cpp +++ b/engines/glk/alan2/alan2.cpp @@ -71,8 +71,6 @@ bool Alan2::initialize() { // Set up the code file to point to the already opened game file codfil = &_gameFile; - strncpy(codfnm, getFilename().c_str(), 255); - codfnm[255] = '\0'; if (_gameFile.size() < 8) { GUIErrorMessage(_("This is too short to be a valid Alan2 file.")); diff --git a/engines/glk/alan2/debug.cpp b/engines/glk/alan2/debug.cpp index af72c315f5..b819eba54f 100644 --- a/engines/glk/alan2/debug.cpp +++ b/engines/glk/alan2/debug.cpp @@ -319,7 +319,9 @@ void debug() { break; } case 'X': - dbgflg = FALSE; /* Fall through to 'G' */ + dbgflg = FALSE; + restoreInfo(); + return; case 'G': restoreInfo(); return; diff --git a/engines/glk/alan2/main.cpp b/engines/glk/alan2/main.cpp index be6a60c3ac..5cb800b963 100644 --- a/engines/glk/alan2/main.cpp +++ b/engines/glk/alan2/main.cpp @@ -97,15 +97,6 @@ int paglen, pagwidth; Boolean needsp = FALSE; Boolean skipsp = FALSE; -/* Restart jump buffer */ -//jmp_buf restart_label; - - -/* PRIVATE DATA */ -//static jmp_buf jmpbuf; /* Error return long jump buffer */ - - - /*====================================================================== terminate() @@ -1017,12 +1008,7 @@ static void eventchk() { \*----------------------------------------------------------------------*/ - Common::SeekableReadStream *codfil; -char codfnm[256]; -static char txtfnm[256]; -static char logfnm[256]; - /*---------------------------------------------------------------------- @@ -1373,8 +1359,8 @@ static void movactor(CONTEXT) { static void openFiles() { // If logging open log file if (logflg) { - sprintf(logfnm, "%s.log", advnam); - logfil = g_system->getSavefileManager()->openForSaving(logfnm); + Common::String filename = Common::String::format("%s.log", advnam); + logfil = g_system->getSavefileManager()->openForSaving(filename); logflg = logfil != nullptr; } diff --git a/engines/glk/alan2/main.h b/engines/glk/alan2/main.h index a77a0c5813..3473ebf0f2 100644 --- a/engines/glk/alan2/main.h +++ b/engines/glk/alan2/main.h @@ -82,7 +82,6 @@ extern Common::SeekableReadStream *codfil; /* File names */ extern const char *advnam; -extern char codfnm[256]; /* Screen formatting info */ extern int col, lin; |