[Scummvm-cvs-logs] SF.net SVN: scummvm: [24261] scummvm/trunk/engines/agos
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Tue Oct 10 13:45:07 CEST 2006
Revision: 24261
http://svn.sourceforge.net/scummvm/?rev=24261&view=rev
Author: kirben
Date: 2006-10-10 04:44:58 -0700 (Tue, 10 Oct 2006)
Log Message:
-----------
Fix guard response in Elvira 1
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/contain.cpp
scummvm/trunk/engines/agos/debug.h
scummvm/trunk/engines/agos/items.cpp
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2006-10-10 11:25:45 UTC (rev 24260)
+++ scummvm/trunk/engines/agos/agos.cpp 2006-10-10 11:44:58 UTC (rev 24261)
@@ -559,7 +559,7 @@
return 0;
}
-const static uint16 initialVideoWindows_Simon[24] = {
+const static uint16 initialVideoWindows_Simon[20] = {
0, 0, 20, 200,
0, 0, 3, 136,
17, 0, 3, 136,
@@ -567,7 +567,7 @@
0, 0, 20, 134
};
-const static uint16 initialVideoWindows_Common[24] = {
+const static uint16 initialVideoWindows_Common[20] = {
3, 0, 14, 136,
0, 0, 3, 136,
17, 0, 3, 136,
@@ -713,7 +713,7 @@
_stringIdLocalMin = 1;
- for (int i = 0; i < 24; i++) {
+ for (int i = 0; i < 20; i++) {
if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2)
_videoWindows[i] = initialVideoWindows_Simon[i];
else
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2006-10-10 11:25:45 UTC (rev 24260)
+++ scummvm/trunk/engines/agos/agos.h 2006-10-10 11:44:58 UTC (rev 24261)
@@ -1036,6 +1036,8 @@
void moveDirn_e2(Item *i, uint x);
void moveDirn_ww(Item *i, uint x);
+ int contains(Item *a, Item *b);
+
int sizeContents(Item *x);
int sizeOfRec(Item *o, int d);
int sizeRec(Item *x, int d);
@@ -1056,6 +1058,8 @@
void oe1_isNotAt();
void oe1_sibling();
void oe1_notSibling();
+ void oe1_isIn();
+ void oe1_isNotIn();
void oe1_isPlayer();
void oe1_canPut();
void oe1_copyof();
Modified: scummvm/trunk/engines/agos/contain.cpp
===================================================================
--- scummvm/trunk/engines/agos/contain.cpp 2006-10-10 11:25:45 UTC (rev 24260)
+++ scummvm/trunk/engines/agos/contain.cpp 2006-10-10 11:44:58 UTC (rev 24261)
@@ -60,6 +60,16 @@
linkItem(x, y);
}
+int AGOSEngine::contains(Item *a, Item *b) {
+ while (derefItem(b->parent)) {
+ if (derefItem(b->parent) == a)
+ return 1;
+ b = derefItem(b->parent);
+ }
+
+ return 0;
+}
+
int AGOSEngine::sizeContents(Item *x) {
return sizeRec(x, 0);
}
Modified: scummvm/trunk/engines/agos/debug.h
===================================================================
--- scummvm/trunk/engines/agos/debug.h 2006-10-10 11:25:45 UTC (rev 24260)
+++ scummvm/trunk/engines/agos/debug.h 2006-10-10 11:44:58 UTC (rev 24261)
@@ -55,8 +55,8 @@
/* 20 */
"WWJ|IS_LEF",
"WWJ|IS_GEF",
- NULL,
- NULL,
+ "WWJ|IS_IN",
+ "WWJ|IS_NOT_IN",
/* 24 */
NULL,
NULL,
Modified: scummvm/trunk/engines/agos/items.cpp
===================================================================
--- scummvm/trunk/engines/agos/items.cpp 2006-10-10 11:25:45 UTC (rev 24260)
+++ scummvm/trunk/engines/agos/items.cpp 2006-10-10 11:44:58 UTC (rev 24261)
@@ -189,6 +189,8 @@
op[19] = &AGOSEngine::o_notEqf;
op[20] = &AGOSEngine::o_ltf;
op[21] = &AGOSEngine::o_gtf;
+ op[22] = &AGOSEngine::oe1_isIn;
+ op[23] = &AGOSEngine::oe1_isNotIn;
op[29] = &AGOSEngine::o_chance;
op[30] = &AGOSEngine::oe1_isPlayer;
@@ -1818,6 +1820,20 @@
setScriptCondition(item1->parent != item2->parent);
}
+void AGOSEngine::oe1_isIn() {
+ // 22: is in
+ Item *item1 = getNextItemPtr();
+ Item *item2 = getNextItemPtr();
+ setScriptCondition(contains(item1, item2) != 0);
+}
+
+void AGOSEngine::oe1_isNotIn() {
+ // 23: is not in
+ Item *item1 = getNextItemPtr();
+ Item *item2 = getNextItemPtr();
+ setScriptCondition(contains(item1, item2) == 0);
+}
+
void AGOSEngine::oe1_isPlayer() {
// 30: is player
setScriptCondition(isPlayer(getNextItemPtr()));
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