aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
authorKari Salminen2007-06-29 15:58:48 +0000
committerKari Salminen2007-06-29 15:58:48 +0000
commit3a03470caa6b03b3f529762b92e14666e737ce06 (patch)
treec1be3baae04498a1d1ded655004137e447c10a67 /engines/agi
parent49242a9e34b41c3e763128c45b82352ef85cbb8f (diff)
downloadscummvm-rg350-3a03470caa6b03b3f529762b92e14666e737ce06.tar.gz
scummvm-rg350-3a03470caa6b03b3f529762b92e14666e737ce06.tar.bz2
scummvm-rg350-3a03470caa6b03b3f529762b92e14666e737ce06.zip
Set AGI monitor type variable (vMonitor/v26) according to render mode.
svn-id: r27774
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.h12
-rw-r--r--engines/agi/cycle.cpp21
2 files changed, 32 insertions, 1 deletions
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
@@ -247,6 +247,18 @@ enum {
};
/**
+ * 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
*/
enum {
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;