diff options
Diffstat (limited to 'engines/glk')
-rw-r--r-- | engines/glk/alan2/acode.h | 28 | ||||
-rw-r--r-- | engines/glk/alan2/alan2.h | 2 | ||||
-rw-r--r-- | engines/glk/alan2/main.cpp | 4 | ||||
-rw-r--r-- | engines/glk/alan2/main.h | 1 | ||||
-rw-r--r-- | engines/glk/alan2/parse.cpp | 2 | ||||
-rw-r--r-- | engines/glk/alan2/term.cpp | 43 | ||||
-rw-r--r-- | engines/glk/alan2/term.h | 36 | ||||
-rw-r--r-- | engines/glk/alan2/types.h | 2 | ||||
-rw-r--r-- | engines/glk/alan2/util.h | 34 | ||||
-rw-r--r-- | engines/glk/alan2/version.h | 1 | ||||
-rw-r--r-- | engines/glk/module.mk | 1 |
11 files changed, 17 insertions, 137 deletions
diff --git a/engines/glk/alan2/acode.h b/engines/glk/alan2/acode.h index 74f0e541e4..09201aae45 100644 --- a/engines/glk/alan2/acode.h +++ b/engines/glk/alan2/acode.h @@ -83,7 +83,7 @@ typedef int WrdKind; /* Parameter Classes */ -typedef enum ClaKind { /* NOTE! These must have the same order as */ +enum ClaKind { /* NOTE! These must have the same order as */ CLA_OBJ = 1, /* the name classes in NAM.H */ CLA_CNT = (int)CLA_OBJ << 1, CLA_ACT = (int)CLA_CNT << 1, @@ -91,26 +91,26 @@ typedef enum ClaKind { /* NOTE! These must have the same order as */ CLA_STR = (int)CLA_NUM << 1, CLA_COBJ = (int)CLA_STR << 1, CLA_CACT = (int)CLA_COBJ << 1 -} ClaKind; +}; /* Verb Qualifiers */ -typedef enum QualClass { +enum QualClass { Q_DEFAULT, Q_AFTER, Q_BEFORE, Q_ONLY -} QualClass; +}; /* The AMACHINE Operations */ -typedef enum OpClass { +enum OpClass { C_CONST, C_STMOP, C_CURVAR -} OpClass; +}; -typedef enum InstClass { +enum InstClass { I_PRINT, /* Print a string from the text file */ I_QUIT, I_LOOK, @@ -178,16 +178,16 @@ typedef enum InstClass { I_DEPEXEC, /* -""- */ I_DEPELSE, /* -""- */ I_DEPEND /* -""- */ -} InstClass; +}; -typedef enum VarClass { +enum VarClass { V_PARAM, V_CURLOC, V_CURACT, V_CURVRB, V_SCORE -} VarClass; +}; #define I_CLASS(x) ((x)>>28) @@ -204,8 +204,8 @@ struct AcdHdr { Aword size; /* 02 - Size of ACD-file in Awords */ /* Options */ Abool pack; /* 03 - Is the text packed ? */ - Aword paglen; /* 04 - Length of a page */ - Aword pagwidth; /* 05 - and width */ + Aword paglen; /* 04 - Unused - Length of a page */ + Aword pagwidth; /* 05 - Unused - and width */ Aword debug; /* 06 - Option debug */ /* Data structures */ Aaddr dict; /* 07 - Dictionary */ @@ -241,7 +241,7 @@ struct AcdHdr { #include "common/pack-end.h" // END STRUCT PACKING /* Error message numbers */ -typedef enum MsgKind { +enum MsgKind { M_HUH, /* Obsolete */ M_WHAT, M_WHAT_ALL, @@ -287,7 +287,7 @@ typedef enum MsgKind { M_QUITACTION, /* INTRODUCED: v2.7, so M_ARTICLE moved */ M_ARTICLE, /* INTRODUCED: v2.6 but replaced the M_NOMSG*/ MSGMAX -} MsgKind; +}; #define M_ARTICLE26 M_QUITACTION #define M_MSGMAX26 M_ARTICLE diff --git a/engines/glk/alan2/alan2.h b/engines/glk/alan2/alan2.h index baf02c8770..7dc0fc5fd3 100644 --- a/engines/glk/alan2/alan2.h +++ b/engines/glk/alan2/alan2.h @@ -20,6 +20,8 @@ * */ +/* Based on Alan2 interpreter version 2.8(6) */ + #ifndef GLK_ALAN2 #define GLK_ALAN2 diff --git a/engines/glk/alan2/main.cpp b/engines/glk/alan2/main.cpp index 5cb800b963..e09ce6b3f5 100644 --- a/engines/glk/alan2/main.cpp +++ b/engines/glk/alan2/main.cpp @@ -36,7 +36,6 @@ #include "glk/alan2/stack.h" #include "glk/alan2/sysdep.h" #include "glk/alan2/types.h" -#include "glk/alan2/term.h" #include "common/file.h" namespace Glk { @@ -92,7 +91,6 @@ Common::WriteStream *logfil; /* Screen formatting info */ int col, lin; -int paglen, pagwidth; Boolean needsp = FALSE; Boolean skipsp = FALSE; @@ -1245,8 +1243,6 @@ static void init() { /* Initialise string attributes */ initstrings(); - getPageSize(); - /* Find first conjunction and use that for ',' handling */ for (i = 0; i < dictsize; i++) if (isConj(i)) { diff --git a/engines/glk/alan2/main.h b/engines/glk/alan2/main.h index afab540706..c7bdefc509 100644 --- a/engines/glk/alan2/main.h +++ b/engines/glk/alan2/main.h @@ -85,7 +85,6 @@ extern const char *advnam; /* Screen formatting info */ extern int col, lin; -extern int paglen, pagwidth; extern Boolean verbose, errflg, trcflg, dbgflg, stpflg, logflg, statusflg; extern Boolean fail; diff --git a/engines/glk/alan2/parse.cpp b/engines/glk/alan2/parse.cpp index 51bf0927d7..b6ef86bd88 100644 --- a/engines/glk/alan2/parse.cpp +++ b/engines/glk/alan2/parse.cpp @@ -28,7 +28,6 @@ #include "glk/alan2/main.h" #include "glk/alan2/params.h" #include "glk/alan2/parse.h" -#include "glk/alan2/term.h" #include "glk/alan2/types.h" namespace Glk { @@ -166,7 +165,6 @@ static void agetline(CONTEXT) { CALL0(quit) } - getPageSize(); anyOutput = FALSE; if (logflg) fprintf(logfil, "%s\n", buf); diff --git a/engines/glk/alan2/term.cpp b/engines/glk/alan2/term.cpp deleted file mode 100644 index df3a245d18..0000000000 --- a/engines/glk/alan2/term.cpp +++ /dev/null @@ -1,43 +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/alan2/main.h" -#include "glk/alan2/term.h" - -namespace Glk { -namespace Alan2 { - -/*====================================================================== - - getPageSize() - - Try to get the current page size from the system, else use the ones - from the header. - - */ -void getPageSize() { - paglen = 0; - pagwidth = 0; -} - -} // End of namespace Alan2 -} // End of namespace Glk diff --git a/engines/glk/alan2/term.h b/engines/glk/alan2/term.h deleted file mode 100644 index 7667abdad3..0000000000 --- a/engines/glk/alan2/term.h +++ /dev/null @@ -1,36 +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_ALAN2_TERM -#define GLK_ALAN2_TERM - -/* Header file for terminal functions in ARUN, the Alan interpreter */ - -namespace Glk { -namespace Alan2 { - -extern void getPageSize(); - -} // End of namespace Alan2 -} // End of namespace Glk - -#endif diff --git a/engines/glk/alan2/types.h b/engines/glk/alan2/types.h index b6be432f7e..27f0aedac3 100644 --- a/engines/glk/alan2/types.h +++ b/engines/glk/alan2/types.h @@ -279,7 +279,7 @@ struct ParamElem { /* PARAMETER */ Aword lastWord; /* d:o to last */ } PACKED_STRUCT; -typedef enum Type {TYPNUM, TYPSTR} Type; +enum Type { TYPNUM, TYPSTR }; struct LitElem { /* LITERAL */ Type type; diff --git a/engines/glk/alan2/util.h b/engines/glk/alan2/util.h deleted file mode 100644 index 21993eb80d..0000000000 --- a/engines/glk/alan2/util.h +++ /dev/null @@ -1,34 +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_ALAN2_UTIL -#define GLK_ALAN2_UTIL - -#include "glk/alan2/types.h" - -namespace Glk { -namespace Alan2 { - -} // End of namespace Alan2 -} // End of namespace Glk - -#endif diff --git a/engines/glk/alan2/version.h b/engines/glk/alan2/version.h index 3268259cae..fddb4b9d29 100644 --- a/engines/glk/alan2/version.h +++ b/engines/glk/alan2/version.h @@ -52,7 +52,6 @@ struct Product { const Version version; }; - } // End of namespace Alan2 } // End of namespace Glk diff --git a/engines/glk/module.mk b/engines/glk/module.mk index 1a5bdea29e..8c1daeeb13 100644 --- a/engines/glk/module.mk +++ b/engines/glk/module.mk @@ -87,7 +87,6 @@ MODULE_OBJS += \ alan2/rules.o \ alan2/stack.o \ alan2/sysdep.o \ - alan2/term.o \ alan2/types.o endif |