From 3a03470caa6b03b3f529762b92e14666e737ce06 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 29 Jun 2007 15:58:48 +0000 Subject: Set AGI monitor type variable (vMonitor/v26) according to render mode. svn-id: r27774 --- engines/agi/agi.h | 12 ++++++++++++ engines/agi/cycle.cpp | 21 ++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'engines/agi') diff --git a/engines/agi/agi.h b/engines/agi/agi.h index 56ae1288b8..bda1f1dbb2 100644 --- a/engines/agi/agi.h +++ b/engines/agi/agi.h @@ -246,6 +246,18 @@ enum { vMonitor }; +/** + * Different monitor types. + * Used with AGI variable 26 i.e. vMonitor. + */ +enum AgiMonitorType { + kAgiMonitorCga = 0, + // kAgiMonitorTandy = 1, // Not sure about this + kAgiMonitorHercules = 2, + kAgiMonitorEga = 3, + // kAgiMonitorVga = 4 // Not sure about this +}; + /** * AGI flags */ diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index 22d2582021..bd8fcb0394 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -367,7 +367,26 @@ int AgiEngine::runGame() { setvar(vComputer, 0); /* IBM PC (4 = Atari ST) */ setvar(vSoundgen, 1); /* IBM PC SOUND */ - setvar(vMonitor, 0x3); /* EGA monitor */ + + // Set monitor type (v26 i.e. vMonitor) + switch (_renderMode) { + case Common::kRenderCGA: + setvar(vMonitor, kAgiMonitorCga); + break; + case Common::kRenderHercG: + case Common::kRenderHercA: + setvar(vMonitor, kAgiMonitorHercules); + break; + // Don't know if Amiga AGI games use a different value than kAgiMonitorEga + // for vMonitor so I just use kAgiMonitorEga for them (As was done before too). + case Common::kRenderAmiga: + case Common::kRenderDefault: + case Common::kRenderEGA: + default: + setvar(vMonitor, kAgiMonitorEga); + break; + } + setvar(vMaxInputChars, 38); _game.inputMode = INPUT_NONE; _game.inputEnabled = 0; -- cgit v1.2.3