[Scummvm-cvs-logs] SF.net SVN: scummvm:[55067] scummvm/trunk/engines/hugo
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Thu Dec 30 22:07:38 CET 2010
Revision: 55067
http://scummvm.svn.sourceforge.net/scummvm/?rev=55067&view=rev
Author: strangerke
Date: 2010-12-30 21:07:38 +0000 (Thu, 30 Dec 2010)
Log Message:
-----------
HUGO: Fix several bugs reported by D. Gray
Modified Paths:
--------------
scummvm/trunk/engines/hugo/mouse.cpp
scummvm/trunk/engines/hugo/object.cpp
scummvm/trunk/engines/hugo/parser_v3d.cpp
Modified: scummvm/trunk/engines/hugo/mouse.cpp
===================================================================
--- scummvm/trunk/engines/hugo/mouse.cpp 2010-12-30 17:37:27 UTC (rev 55066)
+++ scummvm/trunk/engines/hugo/mouse.cpp 2010-12-30 21:07:38 UTC (rev 55067)
@@ -118,7 +118,7 @@
else if (gameStatus.inventoryObjId == objId)
gameStatus.inventoryObjId = -1; // Same icon - deselect it
else
- _vm->_object->useObject(objId); // Use status.objid on object
+ _vm->_object->useObject(objId); // Use status.objid on object
} else { // Clicked over viewport object
object_t *obj = &_vm->_object->_objects[objId];
int16 x, y;
@@ -130,12 +130,12 @@
_vm->_object->useObject(objId);
break;
case 0: // Immediate use
- _vm->_object->useObject(objId); // Pick up or use object
+ _vm->_object->useObject(objId); // Pick up or use object
break;
default: // Walk to view point if possible
if (!_vm->_route->startRoute(GO_GET, objId, obj->viewx, obj->viewy)) {
- if (_vm->_hero->cycling == INVISIBLE)// If invisible do
- _vm->_object->useObject(objId); // immediate use
+ if (_vm->_hero->cycling == INVISIBLE) // If invisible do
+ _vm->_object->useObject(objId); // immediate use
else
Utils::Box(BOX_ANY, "%s", _vm->_textMouse[kMsNoWayText]); // Can't get there
}
Modified: scummvm/trunk/engines/hugo/object.cpp
===================================================================
--- scummvm/trunk/engines/hugo/object.cpp 2010-12-30 17:37:27 UTC (rev 55066)
+++ scummvm/trunk/engines/hugo/object.cpp 2010-12-30 21:07:38 UTC (rev 55067)
@@ -100,12 +100,8 @@
// Get or use objid directly
if ((obj->genericCmd & TAKE) || obj->objValue) // Get collectible item
sprintf(_line, "%s %s", _vm->_arrayVerbs[_vm->_take][0], _vm->_arrayNouns[obj->nounIndex][0]);
- else if (obj->genericCmd & LOOK) // Look item
- sprintf(_line, "%s %s", _vm->_arrayVerbs[_vm->_look][0], _vm->_arrayNouns[obj->nounIndex][0]);
- else if (obj->genericCmd & DROP) // Drop item
- sprintf(_line, "%s %s", _vm->_arrayVerbs[_vm->_drop][0], _vm->_arrayNouns[obj->nounIndex][0]);
else if (obj->cmdIndex != 0) // Use non-collectible item if able
- sprintf(_line, "%s %s", _vm->_arrayVerbs[_vm->_cmdList[obj->cmdIndex][1].verbIndex][0], _vm->_arrayNouns[obj->nounIndex][0]);
+ sprintf(_line, "%s %s", _vm->_arrayVerbs[_vm->_cmdList[obj->cmdIndex][0].verbIndex][0], _vm->_arrayNouns[obj->nounIndex][0]);
else if ((verb = _vm->useBG(_vm->_arrayNouns[obj->nounIndex][0])) != 0)
sprintf(_line, "%s %s", verb, _vm->_arrayNouns[obj->nounIndex][0]);
else
@@ -142,10 +138,10 @@
}
}
- if (_vm->getGameStatus().inventoryState == I_ACTIVE) // If inventory active, remove it
+ if (_vm->getGameStatus().inventoryState == I_ACTIVE) // If inventory active, remove it
_vm->getGameStatus().inventoryState = I_UP;
- _vm->getGameStatus().inventoryObjId = -1; // Deselect any dragged icon
- _vm->_parser->lineHandler(); // and process command
+ _vm->getGameStatus().inventoryObjId = -1; // Deselect any dragged icon
+ _vm->_parser->lineHandler(); // and process command
}
/**
Modified: scummvm/trunk/engines/hugo/parser_v3d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser_v3d.cpp 2010-12-30 17:37:27 UTC (rev 55066)
+++ scummvm/trunk/engines/hugo/parser_v3d.cpp 2010-12-30 21:07:38 UTC (rev 55067)
@@ -277,7 +277,7 @@
Utils::Box(BOX_ANY, "%s", _vm->_textData[obj->stateDataIndex[obj->state]]);
} else {
if ((LOOK & obj->genericCmd) == LOOK) {
- if (_vm->_textData[obj->dataIndex])
+ if (obj->dataIndex != 0)
Utils::Box(BOX_ANY, "%s", _vm->_textData[obj->dataIndex]);
else
return false;
@@ -290,7 +290,7 @@
Utils::Box(BOX_ANY, "%s", _vm->_textParser[kTBHave]);
else if ((TAKE & obj->genericCmd) == TAKE)
takeObject(obj);
- else if (obj->cmdIndex != 0) // No comment if possible commands
+ else if (obj->cmdIndex) // No comment if possible commands
return false;
else if (!obj->verbOnlyFl && (TAKE & obj->genericCmd) == TAKE) // Make sure not taking object in context!
Utils::Box(BOX_ANY, "%s", _vm->_textParser[kTBNoUse]);
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