aboutsummaryrefslogtreecommitdiff
path: root/engines/glk
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-06 16:01:10 -0700
committerPaul Gilbert2019-07-06 16:01:10 -0700
commit54b838cd6077e07f16e24d82cd9b7636f5a5b55d (patch)
tree91453b14c7b559899d2dbe2b28ee76ee955075f9 /engines/glk
parent43bc2e4853e985536a54f00b4e7aa9e87a9b37b6 (diff)
downloadscummvm-rg350-54b838cd6077e07f16e24d82cd9b7636f5a5b55d.tar.gz
scummvm-rg350-54b838cd6077e07f16e24d82cd9b7636f5a5b55d.tar.bz2
scummvm-rg350-54b838cd6077e07f16e24d82cd9b7636f5a5b55d.zip
GLK: ALAN2: Cleanup of unused variables
Diffstat (limited to 'engines/glk')
-rw-r--r--engines/glk/alan2/alan2.cpp2
-rw-r--r--engines/glk/alan2/debug.cpp4
-rw-r--r--engines/glk/alan2/main.cpp18
-rw-r--r--engines/glk/alan2/main.h1
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;