aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/script.cpp
diff options
context:
space:
mode:
authorTravis Howell2006-10-22 00:55:17 +0000
committerTravis Howell2006-10-22 00:55:17 +0000
commitbce0a11065570c7bb2373c6330071143f0489815 (patch)
treeff9f9f816191b022bfdddabeb3ca3a6ca8006a3d /engines/agos/script.cpp
parent7ca5752fbc6e54abcc1b2529edb5dbee71f4d22f (diff)
downloadscummvm-rg350-bce0a11065570c7bb2373c6330071143f0489815.tar.gz
scummvm-rg350-bce0a11065570c7bb2373c6330071143f0489815.tar.bz2
scummvm-rg350-bce0a11065570c7bb2373c6330071143f0489815.zip
Add extra picture opcode code for ELvira 1/2
svn-id: r24426
Diffstat (limited to 'engines/agos/script.cpp')
-rw-r--r--engines/agos/script.cpp44
1 files changed, 30 insertions, 14 deletions
diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp
index 22225165f2..90e014b28a 100644
--- a/engines/agos/script.cpp
+++ b/engines/agos/script.cpp
@@ -655,20 +655,7 @@ void AGOSEngine::o_picture() {
uint mode = getVarOrByte();
_picture8600 = (vga_res == 8600);
-
- if (mode == 4) {
- vc29_stopAllSounds();
-
- if (!_initMouse) {
- _initMouse = 1;
- vc33_setMouseOn();
- }
- }
-
- if (_lockWord & 0x10)
- error("o_picture: _lockWord & 0x10");
-
- setWindowImage(mode, vga_res);
+ setWindowImageEx(mode, vga_res);
}
void AGOSEngine::o_loadZone() {
@@ -1541,4 +1528,33 @@ void AGOSEngine::stopAnimateSimon2(uint a, uint b) {
_lockWord &= ~0x8000;
}
+void AGOSEngine::setWindowImageEx(uint16 mode, uint16 vga_res) {
+ if (!_initMouse) {
+ _initMouse = 1;
+ vc33_setMouseOn();
+ }
+
+ if (mode == 4) {
+ vc29_stopAllSounds();
+
+ if (getGameType() == GType_ELVIRA1) {
+ if (_variableArray[299] == 0) {
+ _variableArray[293] = 0;
+ _wallOn = 0;
+ }
+ } else if (getGameType() == GType_ELVIRA1) {
+ if (_variableArray[70] == 0) {
+ _variableArray[71] = 0;
+ _wallOn = 0;
+ }
+ }
+
+ }
+
+ if (_lockWord & 0x10)
+ error("setWindowImageEx: _lockWord & 0x10");
+
+ setWindowImage(mode, vga_res);
+}
+
} // End of namespace AGOS