aboutsummaryrefslogtreecommitdiff
path: root/queen
diff options
context:
space:
mode:
authorGregory Montoir2003-11-13 09:30:49 +0000
committerGregory Montoir2003-11-13 09:30:49 +0000
commit35cdf26ba618325055cfe56bd8937472313d5c6d (patch)
tree89faa28cf54c4c8e2838e1916910b839529556cf /queen
parentae75f49b46b387c599d321e3e778b4387fec5abd (diff)
downloadscummvm-rg350-35cdf26ba618325055cfe56bd8937472313d5c6d.tar.gz
scummvm-rg350-35cdf26ba618325055cfe56bd8937472313d5c6d.tar.bz2
scummvm-rg350-35cdf26ba618325055cfe56bd8937472313d5c6d.zip
fix some bugs :
- grayed panel disappearing during cutaway - canceling joe walk before switching to another room svn-id: r11277
Diffstat (limited to 'queen')
-rw-r--r--queen/command.cpp12
-rw-r--r--queen/display.cpp4
-rw-r--r--queen/logic.cpp2
-rw-r--r--queen/walk.cpp1
4 files changed, 11 insertions, 8 deletions
diff --git a/queen/command.cpp b/queen/command.cpp
index 182820736d..3c0bdb56ec 100644
--- a/queen/command.cpp
+++ b/queen/command.cpp
@@ -136,7 +136,7 @@ void Command::clear(bool clearTexts) {
_cmdText.clear();
if (clearTexts) {
- _graphics->textClear(151, 151);
+ _graphics->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS);
}
_parse = false;
_curCmd.init();
@@ -528,7 +528,6 @@ int16 Command::makeJoeWalkTo(int16 x, int16 y, int16 objNum, const Verb &v, bool
// Check to see if object is actually an exit to another
// room. If so, then set up new room
-
ObjectData *objData = _logic->objectData(objNum);
if (objData->x != 0 || objData->y != 0) {
x = objData->x;
@@ -584,7 +583,7 @@ void Command::grabCurrentSelection() {
_selPosX += _logic->display()->horizontalScroll();
- debug(0, "Command::grabCurrentSelection() - _curCmd.noun = %d, _curCmd.verb = %d", _curCmd.noun, _curCmd.verb.value());
+ debug(0, "Command::grabCurrentSelection() - _curCmd.noun = %d, _curCmd.verb = %d, objMax=%d", _curCmd.noun, _curCmd.verb.value(), _logic->currentRoomObjMax());
if (_curCmd.verb.isAction()) {
grabSelectedVerb();
}
@@ -596,6 +595,7 @@ void Command::grabCurrentSelection() {
}
else if (_selPosY < ROOM_ZONE_HEIGHT && _curCmd.verb.isNone()) {
// select without a command, do a WALK
+ _logic->newRoom(0); // cancel makeJoeWalkTo, that should be equivalent to cr10 fix
clear(true);
_logic->joeWalk(2);
}
@@ -888,7 +888,7 @@ bool Command::handleBadCommand(bool walk) {
if ((_selCmd.action.value() == VERB_WALK_TO || _selCmd.action.isNone()) &&
(_selCmd.noun > objMax || _selCmd.noun == 0)) {
if (_selCmd.action.isNone()) {
- _graphics->textClear(151, 151);
+ _graphics->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS);
}
_walk->joeMove(0, _selPosX, _selPosY, false); // XXX inCutaway parameter
return true;
@@ -1554,7 +1554,7 @@ void Command::lookCurrentRoom() {
if (i <= 0) {
_curCmd.oldNoun = _curCmd.noun;
- _graphics->textClear(151, 151);
+ _graphics->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS);
if (!_selCmd.defaultVerb.isNone()) {
_cmdText.displayTemp(INK_CMD_LOCK, true, _selCmd.defaultVerb);
}
@@ -1594,7 +1594,7 @@ void Command::lookCurrentIcon() {
if (_curCmd.action.isNone()) {
_cmdText.clear();
}
- _graphics->textClear(151, 151);
+ _graphics->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS);
lookCurrentItem();
// ensure that registers when move to top screen
diff --git a/queen/display.cpp b/queen/display.cpp
index 8d98516ac2..045e40fc9e 100644
--- a/queen/display.cpp
+++ b/queen/display.cpp
@@ -633,7 +633,9 @@ void Display::screenMode(int comPanel, bool inCutaway) {
}
else {
_fullscreen = 0;
- _panel = (comPanel == 1);
+ if (comPanel == 1) {
+ _panel = true;
+ }
}
}
diff --git a/queen/logic.cpp b/queen/logic.cpp
index ffc9f009d0..e67e53470b 100644
--- a/queen/logic.cpp
+++ b/queen/logic.cpp
@@ -1900,7 +1900,7 @@ uint16 Logic::findObjectRoomNumber(uint16 zoneNum) const {
if (zoneNum > objectMax) {
// this is an area box, check for associated object
uint16 obj = _area[_currentRoom][zoneNum - objectMax].object;
- if (obj != 0) {
+ if (obj != 0 && _objectData[obj].name != 0) {
// there is an object, get its number
noun = obj - _roomData[_currentRoom];
}
diff --git a/queen/walk.cpp b/queen/walk.cpp
index 3215c0bf0e..56fc5cb869 100644
--- a/queen/walk.cpp
+++ b/queen/walk.cpp
@@ -327,6 +327,7 @@ int16 Walk::joeMove(int direction, int16 endx, int16 endy, bool inCutaway) {
}
_graphics->bob(0)->animating = false;
+ // cyx: the NEW_ROOM = 0 is done in Command::grabCurrentSelection()
// XXX if ((CAN==-1) && (walkgameload==0)) NEW_ROOM=0;
// XXX walkgameload=0;
if (_joeMoveBlock) {