[Scummvm-cvs-logs] SF.net SVN: scummvm: [24562] scummvm/trunk/engines/agos
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Oct 29 08:02:04 CET 2006
Revision: 24562
http://svn.sourceforge.net/scummvm/?rev=24562&view=rev
Author: kirben
Date: 2006-10-29 00:01:55 -0700 (Sun, 29 Oct 2006)
Log Message:
-----------
Add opcode and opcode stub for Elvira 2. Remove unused opcode code
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/debug.h
scummvm/trunk/engines/agos/rooms.cpp
scummvm/trunk/engines/agos/script_e2.cpp
scummvm/trunk/engines/agos/script_ww.cpp
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2006-10-28 14:40:43 UTC (rev 24561)
+++ scummvm/trunk/engines/agos/agos.h 2006-10-29 07:01:55 UTC (rev 24562)
@@ -694,6 +694,7 @@
int changeExitStates(SubSuperRoom *sr, int n, int d, uint16 s);
uint16 getExitState(Item *item, uint16 x, uint16 d);
void setExitState(Item *i, uint16 n, uint16 d, uint16 s);
+ void setSRExit(Item *i, int n, int d, uint16 s);
void moveDirn_e2(Item *i, uint x);
// Waxworks specific
@@ -1154,7 +1155,6 @@
void oe2_setOValue();
void oe2_ink();
void oe2_printStats();
- void oe2_unk162();
void oe2_setSuperRoom();
void oe2_getSuperRoom();
void oe2_setExitOpen();
@@ -1163,7 +1163,9 @@
void oe2_ifExitOpen();
void oe2_ifExitClosed();
void oe2_ifExitLocked();
+ void oe2_unk174();
void oe2_getDollar2();
+ void oe2_setSRExit();
void oe2_unk177();
void oe2_unk178();
void oe2_isAdjNoun();
@@ -1181,7 +1183,6 @@
void oww_whereTo();
void oww_menu();
void oww_textMenu();
- void oww_screenTextMsg();
void oww_boxMessage();
void oww_boxMsg();
void oww_boxLongText();
Modified: scummvm/trunk/engines/agos/debug.h
===================================================================
--- scummvm/trunk/engines/agos/debug.h 2006-10-28 14:40:43 UTC (rev 24561)
+++ scummvm/trunk/engines/agos/debug.h 2006-10-29 07:01:55 UTC (rev 24562)
@@ -467,9 +467,9 @@
"T|SHOW_STRING_NL",
/* 64 */
"T|SHOW_STRING",
- "I|UNK_65",
- "I|UNK_66",
- "|UNK_67",
+ NULL,
+ NULL,
+ NULL,
/* 68 */
"x|END",
"x|DONE",
@@ -517,8 +517,8 @@
"|CLS",
/* 104 */
"B|CLOSE_WINDOW",
- "B|UNK_105",
- "W|UNK_106",
+ "B|SET_AGOS_MENU",
+ NULL,
"WWWWWIW|ADD_BOX",
/* 108 */
"W|DEL_BOX",
@@ -587,9 +587,9 @@
NULL,
/* 160 */
"B|SET_INK",
- "|UNK_161",
- "TB|UNK_162",
+ "|PRINT_STATS",
NULL,
+ NULL,
/* 164 */
NULL,
"W|SET_SUPER_ROOM",
@@ -606,7 +606,7 @@
"W|UNK_174",
"|getDollar2",
/* 176 */
- "IWBB|UNK_176",
+ "IWBB|SET_SUPER_ROOM_EXIT",
"B|UNK_177",
"B|UNK_178",
"IWWJ|IS_ADJ_NOUN",
@@ -750,8 +750,8 @@
"|CLS",
/* 104 */
"B|CLOSE_WINDOW",
- "B|MENU",
- "BB|TEXT_MENU",
+ "B|SET_AGOS_MENU",
+ "BB|SET_TEXT_MENU",
"WWWWWIW|ADD_BOX",
/* 108 */
"W|DEL_BOX",
@@ -820,14 +820,14 @@
NULL,
/* 160 */
"B|SET_INK",
- "|UNK_161",
- "TB|PRINT_STR",
NULL,
+ NULL,
+ NULL,
/* 164 */
NULL,
- "W|SET_SUPER_ROOM",
- "BV|GET_SUPER_ROOM",
NULL,
+ NULL,
+ NULL,
/* 168 */
NULL,
NULL,
@@ -836,12 +836,12 @@
/* 172 */
NULL,
NULL,
- "W|UNK_174",
+ NULL,
"|getDollar2",
/* 176 */
- "IWBB|UNK_176",
- "B|UNK_177",
- "B|UNK_178",
+ NULL,
+ NULL,
+ NULL,
"IWWJ|IS_ADJ_NOUN",
/* 180 */
"B|SET_BIT2",
Modified: scummvm/trunk/engines/agos/rooms.cpp
===================================================================
--- scummvm/trunk/engines/agos/rooms.cpp 2006-10-28 14:40:43 UTC (rev 24561)
+++ scummvm/trunk/engines/agos/rooms.cpp 2006-10-29 07:01:55 UTC (rev 24562)
@@ -282,6 +282,23 @@
changeExitStates(sr, n, d, s);
}
+void AGOSEngine::setSRExit(Item *i, int n, int d, uint16 s) {
+ uint16 *c;
+ uint16 mask = 3;
+
+ SubSuperRoom *sr = (SubSuperRoom *)findChildOfType(i, 4);
+ if (sr) {
+ n--;
+ c = sr->roomExitStates;
+ c += n;
+ d <<= 1;
+ mask <<= d;
+ s <<= d;
+ *c &= ~mask;
+ *c |= s;
+ }
+}
+
void AGOSEngine::moveDirn_e2(Item *i, uint x) {
SubSuperRoom *sr;
Item *d, *p;
Modified: scummvm/trunk/engines/agos/script_e2.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_e2.cpp 2006-10-28 14:40:43 UTC (rev 24561)
+++ scummvm/trunk/engines/agos/script_e2.cpp 2006-10-29 07:01:55 UTC (rev 24562)
@@ -65,7 +65,6 @@
op[149] = &AGOSEngine::oe2_ifDoorClosed;
op[150] = &AGOSEngine::oe2_ifDoorLocked;
op[161] = &AGOSEngine::oe2_printStats;
- op[162] = &AGOSEngine::oe2_unk162;
op[165] = &AGOSEngine::oe2_setSuperRoom;
op[166] = &AGOSEngine::oe2_getSuperRoom;
op[167] = &AGOSEngine::oe2_setExitOpen;
@@ -75,7 +74,9 @@
op[171] = &AGOSEngine::oe2_ifExitOpen;
op[172] = &AGOSEngine::oe2_ifExitClosed;
op[173] = &AGOSEngine::oe2_ifExitLocked;
+ op[174] = &AGOSEngine::oe2_unk174;
op[175] = &AGOSEngine::oe2_getDollar2;
+ op[176] = &AGOSEngine::oe2_setSRExit;
op[177] = &AGOSEngine::oe2_unk177;
op[178] = &AGOSEngine::oe2_unk178;
op[179] = &AGOSEngine::oe2_isAdjNoun;
@@ -321,13 +322,6 @@
mouseOn();
}
-void AGOSEngine::oe2_unk162() {
- // 162: print string?
- showMessageFormat("%s\n", getStringPtrByID(getNextStringID()));
- uint a = getVarOrByte();
- debug(0, "oe2_unk162: stub (%d)", a);
-}
-
void AGOSEngine::oe2_setSuperRoom() {
// 165: set super room
_superRoomNumber = getVarOrWord();
@@ -386,6 +380,12 @@
setScriptCondition(getExitState(i, n, d) == 3);
}
+void AGOSEngine::oe2_unk174() {
+ // 174:
+ uint a = getVarOrWord();
+ debug(0, "oe2_unk174: stub (%d)", a);
+}
+
void AGOSEngine::oe2_getDollar2() {
// 175
_showPreposition = true;
@@ -411,6 +411,15 @@
_showPreposition = false;
}
+void AGOSEngine::oe2_setSRExit() {
+ // 176: set super room exit
+ Item *i = getNextItemPtr();
+ uint n = getVarOrWord();
+ uint d = getVarOrByte();
+ uint s = getVarOrByte();
+ setSRExit(i, n, d, s);
+}
+
void AGOSEngine::oe2_unk177() {
// 177: set unknown vga event
uint a = getVarOrByte();
Modified: scummvm/trunk/engines/agos/script_ww.cpp
===================================================================
--- scummvm/trunk/engines/agos/script_ww.cpp 2006-10-28 14:40:43 UTC (rev 24561)
+++ scummvm/trunk/engines/agos/script_ww.cpp 2006-10-29 07:01:55 UTC (rev 24562)
@@ -66,7 +66,6 @@
op[148] = &AGOSEngine::oe2_ifDoorOpen;
op[149] = &AGOSEngine::oe2_ifDoorClosed;
op[150] = &AGOSEngine::oe2_ifDoorLocked;
- op[162] = &AGOSEngine::oww_screenTextMsg;
op[175] = &AGOSEngine::oe2_getDollar2;
op[179] = &AGOSEngine::oe2_isAdjNoun;
op[180] = &AGOSEngine::oe2_b2Set;
@@ -169,12 +168,6 @@
_textMenu[slot] = getVarOrByte();
}
-void AGOSEngine::oww_screenTextMsg() {
- // 162: print string
- showMessageFormat("%s\n", getStringPtrByID(getNextStringID()));
- getVarOrByte();
-}
-
void AGOSEngine::oww_boxMessage() {
// 184: print message to box
boxTextMessage((const char *)getStringPtrByID(getNextStringID()));
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