aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/alan3
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-06 20:55:47 -0700
committerPaul Gilbert2019-07-06 20:55:47 -0700
commit2a0f8af958ede6df943276ff971bb4b5ff2745c0 (patch)
treefa46e015b85eea1c79cbbc0a06afa872ecf3178f /engines/glk/alan3
parentd9e5c709d4c5548f391aab6835ac27f260aed2bc (diff)
downloadscummvm-rg350-2a0f8af958ede6df943276ff971bb4b5ff2745c0.tar.gz
scummvm-rg350-2a0f8af958ede6df943276ff971bb4b5ff2745c0.tar.bz2
scummvm-rg350-2a0f8af958ede6df943276ff971bb4b5ff2745c0.zip
GLK: ALAN3: Remove deprecated args.cpp
Diffstat (limited to 'engines/glk/alan3')
-rw-r--r--engines/glk/alan3/args.cpp160
-rw-r--r--engines/glk/alan3/args.h47
-rw-r--r--engines/glk/alan3/exe.cpp1
-rw-r--r--engines/glk/alan3/main.cpp5
-rw-r--r--engines/glk/alan3/save.cpp1
5 files changed, 2 insertions, 212 deletions
diff --git a/engines/glk/alan3/args.cpp b/engines/glk/alan3/args.cpp
deleted file mode 100644
index 5a590687aa..0000000000
--- a/engines/glk/alan3/args.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "glk/alan3/args.h"
-#include "glk/alan3/alan3.h"
-#include "glk/alan3/glkio.h"
-#include "glk/alan3/memory.h"
-#include "glk/alan3/options.h"
-#include "glk/alan3/sysdep.h"
-#include "glk/alan3/utils.h"
-
-namespace Glk {
-namespace Alan3 {
-
-/* PUBLIC DATA */
-char *adventureFileName;
-
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-#if 0
-/*======================================================================*/
-char *gameName(char *fullPathName) {
- char *foundGameName = "";
-
- if (fullPathName != NULL) {
- foundGameName = strdup(baseNameStart(fullPathName));
- foundGameName[strlen(foundGameName) - 4] = '\0'; /* Strip off .A3C */
- }
-
- if (foundGameName[0] == '.' && foundGameName[1] == '/')
- strcpy(foundGameName, &foundGameName[2]);
-
- return foundGameName;
-}
-
-
-/*----------------------------------------------------------------------*/
-static char *removeQuotes(char *argument) {
- char *str = strdup(&argument[1]);
- str[strlen(str) - 1] = '\0';
- return str;
-}
-
-
-/*----------------------------------------------------------------------*/
-static bool isQuoted(char *argument) {
- return argument[0] == '"' && strlen(argument) > 2;
-}
-
-
-/*----------------------------------------------------------------------*/
-static char *addAcodeExtension(char *advFilename) {
- if (strlen(advFilename) < strlen(ACODEEXTENSION)
- || compareStrings(&advFilename[strlen(advFilename) - 4], ACODEEXTENSION) != 0) {
- advFilename = (char *)realloc(advFilename, strlen(advFilename) + strlen(ACODEEXTENSION) + 1);
- strcat(advFilename, ACODEEXTENSION);
- }
- return advFilename;
-}
-
-
-
-/*----------------------------------------------------------------------*/
-static void switches(int argc, char *argv[]) {
- int i;
-
- for (i = 1; i < argc; i++) {
- char *argument = argv[i];
-
- if (argument[0] == '-') {
- switch (toLower(argument[1])) {
- case 'i':
- ignoreErrorOption = TRUE;
- break;
- case 't':
- traceSectionOption = TRUE;
- switch (argument[2]) {
- case '9':
- case '8':
- case '7':
- case '6':
- case '5' :
- traceStackOption = TRUE;
- case '4' :
- tracePushOption = TRUE;
- case '3' :
- traceInstructionOption = TRUE;
- case '2' :
- traceSourceOption = TRUE;
- case '\0':
- case '1':
- traceSectionOption = TRUE;
- }
- break;
- case 'd':
- debugOption = TRUE;
- break;
- case 'l':
- transcriptOption = TRUE;
- logOption = FALSE;
- break;
- case 'v':
- verboseOption = TRUE;
- break;
- case 'n':
- statusLineOption = FALSE;
- break;
- case 'c':
- logOption = TRUE;
- transcriptOption = FALSE;
- break;
- case 'r':
- regressionTestOption = TRUE;
- break;
- default:
- printf("Unrecognized switch, -%c\n", argument[1]);
- usage(argv[0]);
- terminate(0);
- }
- } else {
-
- if (isQuoted(argument))
- adventureFileName = removeQuotes(argument);
- else
- adventureFileName = strdup(argument);
-
- adventureFileName = addAcodeExtension(adventureFileName);
-
- adventureName = gameName(adventureFileName);
-
- }
- }
-}
-#endif
-
-/*----------------------------------------------------------------------*/
-bool differentInterpreterName(char *string) {
- return strcasecmp(string, PROGNAME) != 0;
-}
-
-} // End of namespace Alan3
-} // End of namespace Glk
diff --git a/engines/glk/alan3/args.h b/engines/glk/alan3/args.h
deleted file mode 100644
index a80c8a4ab9..0000000000
--- a/engines/glk/alan3/args.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef GLK_ALAN3_
-#define GLK_ALAN3_
-
-/* Argument handling */
-
-#include "glk/alan3/types.h"
-
-namespace Glk {
-namespace Alan3 {
-
-#ifndef PROGNAME
-#define PROGNAME "alan3"
-#endif
-
-/* DATA */
-extern char *adventureFileName;
-
-/* FUNCTIONS */
-extern char *gameName(char fullPathName[]);
-extern void args(int argc, char *argv[]);
-
-} // End of namespace Alan3
-} // End of namespace Glk
-
-#endif
diff --git a/engines/glk/alan3/exe.cpp b/engines/glk/alan3/exe.cpp
index fbb0db53f4..89a4a83d46 100644
--- a/engines/glk/alan3/exe.cpp
+++ b/engines/glk/alan3/exe.cpp
@@ -23,7 +23,6 @@
#include "glk/alan3/exe.h"
#include "glk/alan3/actor.h"
#include "glk/alan3/alan3.h"
-#include "glk/alan3/args.h"
#include "glk/alan3/current.h"
#include "glk/alan3/decode.h"
#include "glk/alan3/event.h"
diff --git a/engines/glk/alan3/main.cpp b/engines/glk/alan3/main.cpp
index 8c815b301a..9d7b4d71f6 100644
--- a/engines/glk/alan3/main.cpp
+++ b/engines/glk/alan3/main.cpp
@@ -22,7 +22,6 @@
#include "glk/alan3/main.h"
#include "glk/alan3/alan_version.h"
-#include "glk/alan3/args.h"
#include "glk/alan3/class.h"
#include "glk/alan3/compatibility.h"
#include "glk/alan3/container.h"
@@ -309,7 +308,7 @@ void checkVersion(ACodeHeader *hdr) {
/* Check version of .ACD file */
if (debugOption && !regressionTestOption) {
printf("<Version of '%s' is %d.%d%s%d!>\n",
- adventureFileName,
+ g_vm->getFilename().c_str(),
(int)hdr->version[0],
(int)hdr->version[1],
decodeState(hdr->version[3]),
@@ -377,7 +376,7 @@ static void checkDebug(CONTEXT) {
/* Make sure he can't debug if not allowed! */
if (!header->debug) {
if (debugOption | traceSectionOption | traceInstructionOption) {
- printf("<Sorry, '%s' is not compiled for debug! Exiting.>\n", adventureFileName);
+ printf("<Sorry, '%s' is not compiled for debug! Exiting.>\n", g_vm->getFilename().c_str());
CALL1(terminate, 0)
}
para();
diff --git a/engines/glk/alan3/save.cpp b/engines/glk/alan3/save.cpp
index 839ce2bdee..b3c8867c88 100644
--- a/engines/glk/alan3/save.cpp
+++ b/engines/glk/alan3/save.cpp
@@ -22,7 +22,6 @@
#include "glk/alan3/save.h"
#include "glk/alan3/acode.h"
-#include "glk/alan3/args.h"
#include "glk/alan3/current.h"
#include "glk/alan3/event.h"
#include "glk/alan3/instance.h"