[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.63,1.64 talk.cpp,1.83,1.84
Gregory Montoir
cyx at users.sourceforge.net
Fri Jan 16 12:27:04 CET 2004
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv28306/queen
Modified Files:
command.cpp talk.cpp
Log Message:
- removed noisy warning in talk code
- set _entryObj only if verb is WALK_TO
- changed setConditions code in Command::openOrCloseAssociatedObject to be
consistent with Command::setConditions ; this isn't like the original, but
more logical to me.
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- command.cpp 16 Jan 2004 15:51:23 -0000 1.63
+++ command.cpp 16 Jan 2004 20:26:30 -0000 1.64
@@ -432,22 +432,20 @@
x = objData->x;
y = objData->y;
}
-
if (v == VERB_WALK_TO) {
_vm->logic()->entryObj(objData->entryObj);
- } else {
- _vm->logic()->entryObj(0);
- }
- if (objData->entryObj > 0 && v != VERB_CLOSE) {
- _vm->logic()->newRoom(_vm->logic()->objectData(objData->entryObj)->room);
- // because this is an exit object, see if there is
- // a walk off point and set (x,y) accordingly
- WalkOffData *wod = _vm->logic()->walkOffPointForObject(objNum);
- if (wod != NULL) {
- x = wod->x;
- y = wod->y;
+ if (objData->entryObj > 0 && v != VERB_CLOSE) {
+ _vm->logic()->newRoom(_vm->logic()->objectData(objData->entryObj)->room);
+ // because this is an exit object, see if there is
+ // a walk off point and set (x,y) accordingly
+ WalkOffData *wod = _vm->logic()->walkOffPointForObject(objNum);
+ if (wod != NULL) {
+ x = wod->x;
+ y = wod->y;
+ }
}
} else {
+ _vm->logic()->entryObj(0);
_vm->logic()->newRoom(0);
}
@@ -915,16 +913,15 @@
CmdListData *cmdList = &_cmdList[1];
uint16 com = 0;
uint16 i;
- for (i = 1; i <= _numCmdList; ++i, ++cmdList) {
+ for (i = 1; i <= _numCmdList && com == 0; ++i, ++cmdList) {
if (cmdList->match(action, otherObj, 0)) {
if (cmdList->setConditions) {
- warning("using Command::openOrCloseAssociatedObject() with setConditions");
CmdGameState *cmdGs = _cmdGameState;
+ warning("Command::openOrCloseAssociatedObject() setConditions slot=%d", cmdGs[i].gameStateSlot);
uint16 j;
for (j = 1; j <= _numCmdGameState; ++j) {
- // FIXME: weird, why using cmdGs[i] instead of cmdGs[j] ?
- if (cmdGs[j].id == i && cmdGs[i].gameStateSlot > 0) {
- if (_vm->logic()->gameState(cmdGs[i].gameStateSlot) == cmdGs[i].gameStateValue) {
+ if (cmdGs[j].id == i && cmdGs[j].gameStateSlot > 0) {
+ if (_vm->logic()->gameState(cmdGs[j].gameStateSlot) == cmdGs[j].gameStateValue) {
com = i;
break;
}
@@ -935,12 +932,12 @@
break;
}
}
- }
-
- debug(6, "Command::openOrCloseAssociatedObject() - com=%X", com);
+ }
if (com != 0) {
+ debug(6, "Command::openOrCloseAssociatedObject() com=%X", com);
+
cmdList = &_cmdList[com];
ObjectData *objData = _vm->logic()->objectData(otherObj);
Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- talk.cpp 16 Jan 2004 15:51:23 -0000 1.83
+++ talk.cpp 16 Jan 2004 20:26:30 -0000 1.84
@@ -377,9 +377,6 @@
else
ptr = getString(ptr, NULL, MAX_STRING_LENGTH, 4);
}
-
- if (str[0] == '\0')
- warning("Failed to find string with ID %i", id);
}
byte *Talk::loadDialogFile(const char *filename) {
More information about the Scummvm-git-logs
mailing list