diff options
-rw-r--r-- | engines/glk/conf.cpp | 9 | ||||
-rw-r--r-- | engines/glk/conf.h | 7 | ||||
-rw-r--r-- | engines/glk/glk.cpp | 2 | ||||
-rw-r--r-- | engines/glk/glk.h | 18 | ||||
-rw-r--r-- | engines/glk/glk_types.h | 21 |
5 files changed, 34 insertions, 23 deletions
diff --git a/engines/glk/conf.cpp b/engines/glk/conf.cpp index ae99e6b09a..89b08fb405 100644 --- a/engines/glk/conf.cpp +++ b/engines/glk/conf.cpp @@ -64,7 +64,7 @@ WindowStyle G_STYLES[style_NUMSTYLES] = { Conf *g_conf; -Conf::Conf() { +Conf::Conf(InterpreterType interpType) { g_conf = this; _imageW = g_system->getWidth(); _imageH = g_system->getHeight(); @@ -108,10 +108,13 @@ Conf::Conf() { if (ConfMan.hasKey("maxcols")) _cols = MIN(_cols, strToInt(ConfMan.get("maxcols").c_str())); + const int DEFAULT_MARGIN_X = (interpType == INTERPRETER_FROTZ) ? 2 : 15; + const int DEFAULT_MARGIN_Y = (interpType == INTERPRETER_FROTZ) ? 0 : 15; + get("lockrows", _lockRows); get("lockcols", _lockCols); - get("wmarginx", _wMarginX, 15); - get("wmarginy", _wMarginY, 15); + get("wmarginx", _wMarginX, DEFAULT_MARGIN_X); + get("wmarginy", _wMarginY, DEFAULT_MARGIN_Y); _wMarginSaveX = _wMarginX; _wMarginSaveY = _wMarginY; diff --git a/engines/glk/conf.h b/engines/glk/conf.h index fb684272a6..bf68e343f9 100644 --- a/engines/glk/conf.h +++ b/engines/glk/conf.h @@ -29,6 +29,11 @@ namespace Glk { + + +/** + * Engine configuration + */ class Conf { private: /** @@ -126,7 +131,7 @@ public: /** * Constructor */ - Conf(); + Conf(InterpreterType interpType); }; extern Conf *g_conf; diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp index 9488c6684a..0c90fc79e4 100644 --- a/engines/glk/glk.cpp +++ b/engines/glk/glk.cpp @@ -68,7 +68,7 @@ void GlkEngine::initialize() { DebugMan.addDebugChannel(kDebugSound, "sound", "Sound and Music handling"); initGraphicsMode(); - _conf = new Conf(); + _conf = new Conf(getInterpreterType()); _screen = new Screen(); _clipboard = new Clipboard(); diff --git a/engines/glk/glk.h b/engines/glk/glk.h index 63b5727604..8f973f03cd 100644 --- a/engines/glk/glk.h +++ b/engines/glk/glk.h @@ -43,24 +43,6 @@ class Selection; class Streams; class Windows; -enum InterpreterType { - INTERPRETER_ADVSYS = 0, - INTERPRETER_AGILITY = 1, - INTERPRETER_ALAN2 = 2, - INTERPRETER_ALAN3 = 3, - INTERPRETER_BOCFEL = 4, - INTERPRETER_FROTZ = 5, - INTERPRETER_GEAS = 6, - INTERPRETER_HUGO = 7, - INTERPRETER_JACL = 8, - INTERPRETER_LEVEL9 = 9, - INTERPRETER_MAGNETIC = 10, - INTERPRETER_NITFOL = 11, - INTERPRETER_SCARE = 12, - INTERPRETER_SCOTT = 13, - INTERPRETER_TADS = 14 -}; - enum GlkDebugChannels { kDebugCore = 1 << 0, kDebugScripts = 1 << 1, diff --git a/engines/glk/glk_types.h b/engines/glk/glk_types.h index 1745178a74..4ac9566f58 100644 --- a/engines/glk/glk_types.h +++ b/engines/glk/glk_types.h @@ -33,6 +33,27 @@ typedef int32 glsi32; class Window; /** + * List of the different sub-engines the engine will likely eventually support + */ +enum InterpreterType { + INTERPRETER_ADVSYS = 0, + INTERPRETER_AGILITY = 1, + INTERPRETER_ALAN2 = 2, + INTERPRETER_ALAN3 = 3, + INTERPRETER_BOCFEL = 4, + INTERPRETER_FROTZ = 5, + INTERPRETER_GEAS = 6, + INTERPRETER_HUGO = 7, + INTERPRETER_JACL = 8, + INTERPRETER_LEVEL9 = 9, + INTERPRETER_MAGNETIC = 10, + INTERPRETER_NITFOL = 11, + INTERPRETER_SCARE = 12, + INTERPRETER_SCOTT = 13, + INTERPRETER_TADS = 14 +}; + +/** * These are the compile-time conditionals that reveal various Glk optional modules. */ #define GLK_MODULE_LINE_ECHO |