[Scummvm-cvs-logs] SF.net SVN: scummvm: [24426] scummvm/trunk/engines/agos
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Oct 22 02:55:26 CEST 2006
Revision: 24426
http://svn.sourceforge.net/scummvm/?rev=24426&view=rev
Author: kirben
Date: 2006-10-21 17:55:17 -0700 (Sat, 21 Oct 2006)
Log Message:
-----------
Add extra picture opcode code for ELvira 1/2
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/icons.cpp
scummvm/trunk/engines/agos/input.cpp
scummvm/trunk/engines/agos/menus.cpp
scummvm/trunk/engines/agos/script.cpp
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2006-10-21 23:42:59 UTC (rev 24425)
+++ scummvm/trunk/engines/agos/agos.cpp 2006-10-22 00:55:17 UTC (rev 24426)
@@ -324,6 +324,7 @@
_classMode1 = 0;
_classMode2 = 0;
_superRoomNumber = 0;
+ _wallOn = 0;
_boxLineCount = 0;
_boxCR = 0;
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2006-10-21 23:42:59 UTC (rev 24425)
+++ scummvm/trunk/engines/agos/agos.h 2006-10-22 00:55:17 UTC (rev 24426)
@@ -318,6 +318,7 @@
int _agosMenu;
byte _textMenu[10];
uint _superRoomNumber;
+ uint _wallOn;
uint16 _hyperLink, _newLines;
uint16 _oracleMaxScrollY, _noOracleScroll;
@@ -797,6 +798,7 @@
void animate(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette, bool setZone = true);
void setImage(uint16 vga_res_id, bool setZone);
void setWindowImage(uint16 mode, uint16 vga_res_id);
+ void setWindowImageEx(uint16 mode, uint16 vga_res);
void playSpeech(uint speech_id, uint vga_sprite_id);
void skipSpeech();
Modified: scummvm/trunk/engines/agos/icons.cpp
===================================================================
--- scummvm/trunk/engines/agos/icons.cpp 2006-10-21 23:42:59 UTC (rev 24425)
+++ scummvm/trunk/engines/agos/icons.cpp 2006-10-22 00:55:17 UTC (rev 24426)
@@ -568,7 +568,7 @@
ha->priority = 100;
ha->window = window;
ha->verb = 1;
- setWindowImage(6, 103);
+ setWindowImageEx(6, 103);
} else if (getGameType() == GType_ELVIRA2) {
ha->x = 54;
ha->y = 178;
@@ -579,7 +579,7 @@
ha->priority = 100;
ha->window = window;
ha->verb = 1;
- setWindowImage(6, 106);
+ setWindowImageEx(6, 106);
} else {
ha->x = 30 * 8;
ha->y = 170;
@@ -705,10 +705,10 @@
stopAnimateSimon1(128);
} else if (getGameType() == GType_WW) {
setBitFlag(22, false);
- setWindowImage(6, 103);
+ setWindowImageEx(6, 103);
} else if (getGameType() == GType_ELVIRA2) {
setBitFlag(21, false);
- setWindowImage(6, 106);
+ setWindowImageEx(6, 106);
}
}
Modified: scummvm/trunk/engines/agos/input.cpp
===================================================================
--- scummvm/trunk/engines/agos/input.cpp 2006-10-21 23:42:59 UTC (rev 24425)
+++ scummvm/trunk/engines/agos/input.cpp 2006-10-22 00:55:17 UTC (rev 24426)
@@ -183,7 +183,8 @@
if (getGameType() != GType_FF && getGameType() != GType_PP && _keyPressed == 35)
displayBoxStars();
if (processSpecialKeys() != 0) {
- goto out_of_here;
+ if (getGameType() == GType_WW || getGameType() == GType_PP)
+ goto out_of_here;
}
if (_lastHitArea3 == (HitArea *) -1)
goto startOver;
Modified: scummvm/trunk/engines/agos/menus.cpp
===================================================================
--- scummvm/trunk/engines/agos/menus.cpp 2006-10-21 23:42:59 UTC (rev 24425)
+++ scummvm/trunk/engines/agos/menus.cpp 2006-10-22 00:55:17 UTC (rev 24426)
@@ -161,9 +161,9 @@
disableBox(i);
if (getGameType() == GType_WW) {
- setWindowImage(2, 101);
+ setWindowImageEx(2, 101);
} else {
- setWindowImage(2, 102);
+ setWindowImageEx(2, 102);
}
}
@@ -205,9 +205,9 @@
_variableArray[var + 4] = id - 111;
if (getGameType() == GType_WW) {
- setWindowImage(2, 102);
+ setWindowImageEx(2, 102);
} else {
- setWindowImage(2, 103);
+ setWindowImageEx(2, 103);
}
}
Modified: scummvm/trunk/engines/agos/script.cpp
===================================================================
--- scummvm/trunk/engines/agos/script.cpp 2006-10-21 23:42:59 UTC (rev 24425)
+++ scummvm/trunk/engines/agos/script.cpp 2006-10-22 00:55:17 UTC (rev 24426)
@@ -655,20 +655,7 @@
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 @@
_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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list