aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-12 23:23:16 -0400
committerPaul Gilbert2015-06-12 23:23:16 -0400
commit803c06beb919b35d29bb65ec2e7e48caca69c730 (patch)
treedcce1cc2ed3ff46c7238e3d801a4567b90f71d8c /engines/sherlock/scalpel
parent6221c1de82bae650158b54a4b04f8f319416ac63 (diff)
downloadscummvm-rg350-803c06beb919b35d29bb65ec2e7e48caca69c730.tar.gz
scummvm-rg350-803c06beb919b35d29bb65ec2e7e48caca69c730.tar.bz2
scummvm-rg350-803c06beb919b35d29bb65ec2e7e48caca69c730.zip
SHERLOCK: RT: Implement startCAnim
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp18
-rw-r--r--engines/sherlock/scalpel/scalpel_map.cpp60
-rw-r--r--engines/sherlock/scalpel/scalpel_people.cpp30
-rw-r--r--engines/sherlock/scalpel/scalpel_scene.cpp74
-rw-r--r--engines/sherlock/scalpel/scalpel_talk.cpp2
-rw-r--r--engines/sherlock/scalpel/scalpel_user_interface.cpp14
6 files changed, 98 insertions, 100 deletions
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 4fe3b0327c..33f8c6b7a2 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -961,7 +961,7 @@ void ScalpelEngine::startScene() {
}
void ScalpelEngine::eraseMirror12() {
- Common::Point pt((*_people)[PLAYER]._position.x / FIXED_INT_MULTIPLIER, (*_people)[PLAYER]._position.y / FIXED_INT_MULTIPLIER);
+ Common::Point pt((*_people)[HOLMES]._position.x / FIXED_INT_MULTIPLIER, (*_people)[HOLMES]._position.y / FIXED_INT_MULTIPLIER);
// If player is in range of the mirror, then restore background from the secondary back buffer
if (Common::Rect(70, 100, 200, 200).contains(pt)) {
@@ -972,13 +972,13 @@ void ScalpelEngine::eraseMirror12() {
void ScalpelEngine::doMirror12() {
People &people = *_people;
- Person &player = people[PLAYER];
+ Person &player = people[HOLMES];
- Common::Point pt((*_people)[PLAYER]._position.x / FIXED_INT_MULTIPLIER, (*_people)[PLAYER]._position.y / FIXED_INT_MULTIPLIER);
+ Common::Point pt((*_people)[HOLMES]._position.x / FIXED_INT_MULTIPLIER, (*_people)[HOLMES]._position.y / FIXED_INT_MULTIPLIER);
int frameNum = player._walkSequences[player._sequenceNumber][player._frameNumber] +
player._walkSequences[player._sequenceNumber][0] - 2;
- switch ((*_people)[PLAYER]._sequenceNumber) {
+ switch ((*_people)[HOLMES]._sequenceNumber) {
case WALK_DOWN:
frameNum -= 7;
break;
@@ -1021,12 +1021,12 @@ void ScalpelEngine::doMirror12() {
if (Common::Rect(80, 100, 145, 138).contains(pt)) {
// Get the frame of Sherlock to draw
- ImageFrame &imageFrame = (*people[PLAYER]._images)[frameNum];
+ ImageFrame &imageFrame = (*people[HOLMES]._images)[frameNum];
// Draw the mirror image of Holmes
- bool flipped = people[PLAYER]._sequenceNumber == WALK_LEFT || people[PLAYER]._sequenceNumber == STOP_LEFT
- || people[PLAYER]._sequenceNumber == WALK_UPRIGHT || people[PLAYER]._sequenceNumber == STOP_UPRIGHT
- || people[PLAYER]._sequenceNumber == WALK_DOWNLEFT || people[PLAYER]._sequenceNumber == STOP_DOWNLEFT;
+ bool flipped = people[HOLMES]._sequenceNumber == WALK_LEFT || people[HOLMES]._sequenceNumber == STOP_LEFT
+ || people[HOLMES]._sequenceNumber == WALK_UPRIGHT || people[HOLMES]._sequenceNumber == STOP_UPRIGHT
+ || people[HOLMES]._sequenceNumber == WALK_DOWNLEFT || people[HOLMES]._sequenceNumber == STOP_DOWNLEFT;
_screen->_backBuffer1.transBlitFrom(imageFrame, pt + Common::Point(38, -imageFrame._frame.h - 25), flipped);
// Redraw the mirror borders to prevent the drawn image of Holmes from appearing outside of the mirror
@@ -1046,7 +1046,7 @@ void ScalpelEngine::doMirror12() {
}
void ScalpelEngine::flushMirror12() {
- Common::Point pt((*_people)[PLAYER]._position.x / FIXED_INT_MULTIPLIER, (*_people)[PLAYER]._position.y / FIXED_INT_MULTIPLIER);
+ Common::Point pt((*_people)[HOLMES]._position.x / FIXED_INT_MULTIPLIER, (*_people)[HOLMES]._position.y / FIXED_INT_MULTIPLIER);
// If player is in range of the mirror, then draw the entire mirror area to the screen
if (Common::Rect(70, 100, 200, 200).contains(pt))
diff --git a/engines/sherlock/scalpel/scalpel_map.cpp b/engines/sherlock/scalpel/scalpel_map.cpp
index a9e566f73c..63cb4a342c 100644
--- a/engines/sherlock/scalpel/scalpel_map.cpp
+++ b/engines/sherlock/scalpel/scalpel_map.cpp
@@ -155,7 +155,7 @@ int ScalpelMap::show() {
_drawMap = true;
_charPoint = -1;
_point = -1;
- people[PLAYER]._position = _lDrawnPos = _overPos;
+ people[HOLMES]._position = _lDrawnPos = _overPos;
// Show place icons
showPlaces();
@@ -233,7 +233,7 @@ int ScalpelMap::show() {
}
if ((events._released || events._rightReleased) && _point != -1) {
- if (people[PLAYER]._walkCount == 0) {
+ if (people[HOLMES]._walkCount == 0) {
people._walkDest = _points[_point] + Common::Point(4, 9);
_charPoint = _point;
@@ -247,7 +247,7 @@ int ScalpelMap::show() {
}
// Check if a scene has beeen selected and we've finished "moving" to it
- if (people[PLAYER]._walkCount == 0) {
+ if (people[HOLMES]._walkCount == 0) {
if (_charPoint >= 1 && _charPoint < (int)_points.size())
exitFlag = true;
}
@@ -266,7 +266,7 @@ int ScalpelMap::show() {
}
freeSprites();
- _overPos = people[PLAYER]._position;
+ _overPos = people[HOLMES]._position;
// Reset font
screen.setFont(oldFont);
@@ -288,7 +288,7 @@ void ScalpelMap::setupSprites() {
_shapes = new ImageFile("mapicon.vgs");
_iconShapes = new ImageFile("overicon.vgs");
_iconSave.create((*_shapes)[4]._width, (*_shapes)[4]._height, _vm->getPlatform());
- Person &p = people[PLAYER];
+ Person &p = people[HOLMES];
p._description = " ";
p._type = CHARACTER;
p._position = Common::Point(12400, 5000);
@@ -353,11 +353,11 @@ void ScalpelMap::showPlaceName(int idx, bool highlighted) {
int width = screen.stringWidth(name);
if (!_cursorIndex) {
- saveIcon(people[PLAYER]._imageFrame, _lDrawnPos);
+ saveIcon(people[HOLMES]._imageFrame, _lDrawnPos);
- bool flipped = people[PLAYER]._sequenceNumber == MAP_DOWNLEFT || people[PLAYER]._sequenceNumber == MAP_LEFT
- || people[PLAYER]._sequenceNumber == MAP_UPLEFT;
- screen._backBuffer1.transBlitFrom(*people[PLAYER]._imageFrame, _lDrawnPos, flipped);
+ bool flipped = people[HOLMES]._sequenceNumber == MAP_DOWNLEFT || people[HOLMES]._sequenceNumber == MAP_LEFT
+ || people[HOLMES]._sequenceNumber == MAP_UPLEFT;
+ screen._backBuffer1.transBlitFrom(*people[HOLMES]._imageFrame, _lDrawnPos, flipped);
}
if (highlighted) {
@@ -390,26 +390,26 @@ void ScalpelMap::updateMap(bool flushScreen) {
else
_savedPos.x = -1;
- people[PLAYER].adjustSprite();
+ people[HOLMES].adjustSprite();
- _lDrawnPos.x = hPos.x = people[PLAYER]._position.x / FIXED_INT_MULTIPLIER - _bigPos.x;
- _lDrawnPos.y = hPos.y = people[PLAYER]._position.y / FIXED_INT_MULTIPLIER - people[PLAYER].frameHeight() - _bigPos.y;
+ _lDrawnPos.x = hPos.x = people[HOLMES]._position.x / FIXED_INT_MULTIPLIER - _bigPos.x;
+ _lDrawnPos.y = hPos.y = people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES].frameHeight() - _bigPos.y;
// Draw the person icon
- saveIcon(people[PLAYER]._imageFrame, hPos);
- if (people[PLAYER]._sequenceNumber == MAP_DOWNLEFT || people[PLAYER]._sequenceNumber == MAP_LEFT
- || people[PLAYER]._sequenceNumber == MAP_UPLEFT)
- screen._backBuffer1.transBlitFrom(*people[PLAYER]._imageFrame, hPos, true);
+ saveIcon(people[HOLMES]._imageFrame, hPos);
+ if (people[HOLMES]._sequenceNumber == MAP_DOWNLEFT || people[HOLMES]._sequenceNumber == MAP_LEFT
+ || people[HOLMES]._sequenceNumber == MAP_UPLEFT)
+ screen._backBuffer1.transBlitFrom(*people[HOLMES]._imageFrame, hPos, true);
else
- screen._backBuffer1.transBlitFrom(*people[PLAYER]._imageFrame, hPos, false);
+ screen._backBuffer1.transBlitFrom(*people[HOLMES]._imageFrame, hPos, false);
if (flushScreen) {
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
} else if (!_drawMap) {
if (hPos.x > 0 && hPos.y >= 0 && hPos.x < SHERLOCK_SCREEN_WIDTH && hPos.y < SHERLOCK_SCREEN_HEIGHT)
- screen.flushImage(people[PLAYER]._imageFrame, Common::Point(people[PLAYER]._position.x / FIXED_INT_MULTIPLIER - _bigPos.x,
- people[PLAYER]._position.y / FIXED_INT_MULTIPLIER - people[PLAYER].frameHeight() - _bigPos.y),
- &people[PLAYER]._oldPosition.x, &people[PLAYER]._oldPosition.y, &people[PLAYER]._oldSize.x, &people[PLAYER]._oldSize.y);
+ screen.flushImage(people[HOLMES]._imageFrame, Common::Point(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER - _bigPos.x,
+ people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES].frameHeight() - _bigPos.y),
+ &people[HOLMES]._oldPosition.x, &people[HOLMES]._oldPosition.y, &people[HOLMES]._oldSize.x, &people[HOLMES]._oldSize.y);
if (osPos.x != -1)
screen.slamArea(osPos.x, osPos.y, osSize.x, osSize.y);
@@ -428,15 +428,15 @@ void ScalpelMap::walkTheStreets() {
const byte *path = _paths.getPath(start, dest);
// Add in destination position
- people[PLAYER]._walkTo.clear();
+ people[HOLMES]._walkTo.clear();
Common::Point destPos = people._walkDest;
// Check for any intermediate points between the two locations
if (path[0] || _charPoint > 50 || _oldCharPoint > 50) {
- people[PLAYER]._sequenceNumber = -1;
+ people[HOLMES]._sequenceNumber = -1;
if (_charPoint == 51 || _oldCharPoint == 51) {
- people[PLAYER].setWalking();
+ people[HOLMES].setWalking();
} else {
bool reversePath = false;
@@ -453,25 +453,25 @@ void ScalpelMap::walkTheStreets() {
} while (*path != 254);
// Load up the path to use
- people[PLAYER]._walkTo.clear();
+ people[HOLMES]._walkTo.clear();
if (reversePath) {
for (int idx = (int)tempPath.size() - 1; idx >= 0; --idx)
- people[PLAYER]._walkTo.push(tempPath[idx]);
+ people[HOLMES]._walkTo.push(tempPath[idx]);
} else {
for (int idx = 0; idx < (int)tempPath.size(); ++idx)
- people[PLAYER]._walkTo.push(tempPath[idx]);
+ people[HOLMES]._walkTo.push(tempPath[idx]);
}
- people._walkDest = people[PLAYER]._walkTo.pop() + Common::Point(12, 6);
- people[PLAYER].setWalking();
+ people._walkDest = people[HOLMES]._walkTo.pop() + Common::Point(12, 6);
+ people[HOLMES].setWalking();
}
} else {
- people[PLAYER]._walkCount = 0;
+ people[HOLMES]._walkCount = 0;
}
// Store the final destination icon position
- people[PLAYER]._walkTo.push(destPos);
+ people[HOLMES]._walkTo.push(destPos);
}
void ScalpelMap::saveIcon(ImageFrame *src, const Common::Point &pt) {
diff --git a/engines/sherlock/scalpel/scalpel_people.cpp b/engines/sherlock/scalpel/scalpel_people.cpp
index b2aa4dcbb1..31be9b4cbc 100644
--- a/engines/sherlock/scalpel/scalpel_people.cpp
+++ b/engines/sherlock/scalpel/scalpel_people.cpp
@@ -52,8 +52,8 @@ void ScalpelPerson::adjustSprite() {
if (!_walkCount) {
// If there any points left for the character to walk to along the
// route to a destination, then move to the next point
- if (!people[PLAYER]._walkTo.empty()) {
- people._walkDest = people[PLAYER]._walkTo.pop();
+ if (!people[HOLMES]._walkTo.empty()) {
+ people._walkDest = people[HOLMES]._walkTo.pop();
setWalking();
} else {
gotoStand();
@@ -179,8 +179,8 @@ void ScalpelPerson::gotoStand() {
if (map._active) {
_sequenceNumber = 0;
- people[PLAYER]._position.x = (map[map._charPoint].x - 6) * FIXED_INT_MULTIPLIER;
- people[PLAYER]._position.y = (map[map._charPoint].y + 10) * FIXED_INT_MULTIPLIER;
+ people[HOLMES]._position.x = (map[map._charPoint].x - 6) * FIXED_INT_MULTIPLIER;
+ people[HOLMES]._position.y = (map[map._charPoint].y + 10) * FIXED_INT_MULTIPLIER;
}
_oldWalkSequence = -1;
@@ -401,14 +401,14 @@ void ScalpelPeople::setTalking(int speaker) {
void ScalpelPeople::synchronize(Serializer &s) {
s.syncAsByte(_holmesOn);
- s.syncAsSint32LE(_data[PLAYER]->_position.x);
- s.syncAsSint32LE(_data[PLAYER]->_position.y);
- s.syncAsSint16LE(_data[PLAYER]->_sequenceNumber);
+ s.syncAsSint32LE(_data[HOLMES]->_position.x);
+ s.syncAsSint32LE(_data[HOLMES]->_position.y);
+ s.syncAsSint16LE(_data[HOLMES]->_sequenceNumber);
s.syncAsSint16LE(_holmesQuotient);
if (s.isLoading()) {
- _hSavedPos = _data[PLAYER]->_position;
- _hSavedFacing = _data[PLAYER]->_sequenceNumber;
+ _hSavedPos = _data[HOLMES]->_position;
+ _hSavedFacing = _data[HOLMES]->_sequenceNumber;
}
}
@@ -442,22 +442,20 @@ void ScalpelPeople::setTalkSequence(int speaker, int sequenceNum) {
}
}
-
bool ScalpelPeople::loadWalk() {
- Resources &res = *_vm->_res;
bool result = false;
- if (_data[PLAYER]->_walkLoaded) {
+ if (_data[HOLMES]->_walkLoaded) {
return false;
} else {
if (_vm->getPlatform() != Common::kPlatform3DO) {
- _data[PLAYER]->_images = new ImageFile("walk.vgs");
+ _data[HOLMES]->_images = new ImageFile("walk.vgs");
} else {
// Load walk.anim on 3DO, which is a cel animation file
- _data[PLAYER]->_images = new ImageFile3DO("walk.anim", kImageFile3DOType_CelAnimation);
+ _data[HOLMES]->_images = new ImageFile3DO("walk.anim", kImageFile3DOType_CelAnimation);
}
- _data[PLAYER]->setImageFrame();
- _data[PLAYER]->_walkLoaded = true;
+ _data[HOLMES]->setImageFrame();
+ _data[HOLMES]->_walkLoaded = true;
result = true;
}
diff --git a/engines/sherlock/scalpel/scalpel_scene.cpp b/engines/sherlock/scalpel/scalpel_scene.cpp
index f053747a56..87fe208520 100644
--- a/engines/sherlock/scalpel/scalpel_scene.cpp
+++ b/engines/sherlock/scalpel/scalpel_scene.cpp
@@ -138,7 +138,7 @@ void ScalpelScene::drawAllShapes() {
void ScalpelScene::checkBgShapes() {
People &people = *_vm->_people;
- Person &holmes = people[PLAYER];
+ Person &holmes = people[HOLMES];
Common::Point pt(holmes._position.x / FIXED_INT_MULTIPLIER, holmes._position.y / FIXED_INT_MULTIPLIER);
// Call the base scene method to handle bg shapes
@@ -229,14 +229,14 @@ void ScalpelScene::doBgAnim() {
vm.eraseMirror12();
// Restore the back buffer from the back buffer 2 in the changed area
- Common::Rect bounds(people[PLAYER]._oldPosition.x, people[PLAYER]._oldPosition.y,
- people[PLAYER]._oldPosition.x + people[PLAYER]._oldSize.x,
- people[PLAYER]._oldPosition.y + people[PLAYER]._oldSize.y);
+ Common::Rect bounds(people[HOLMES]._oldPosition.x, people[HOLMES]._oldPosition.y,
+ people[HOLMES]._oldPosition.x + people[HOLMES]._oldSize.x,
+ people[HOLMES]._oldPosition.y + people[HOLMES]._oldSize.y);
Common::Point pt(bounds.left, bounds.top);
- if (people[PLAYER]._type == CHARACTER)
+ if (people[HOLMES]._type == CHARACTER)
screen.restoreBackground(bounds);
- else if (people[PLAYER]._type == REMOVE)
+ else if (people[HOLMES]._type == REMOVE)
screen._backBuffer->blitFrom(screen._backBuffer2, pt, bounds);
for (uint idx = 0; idx < _bgShapes.size(); ++idx) {
@@ -291,8 +291,8 @@ void ScalpelScene::doBgAnim() {
_canimShapes[idx].adjustObject();
}
- if (people[PLAYER]._type == CHARACTER && people._holmesOn)
- people[PLAYER].adjustSprite();
+ if (people[HOLMES]._type == CHARACTER && people._holmesOn)
+ people[HOLMES].adjustSprite();
// Flag the bg shapes which need to be redrawn
checkBgShapes();
@@ -331,16 +331,16 @@ void ScalpelScene::doBgAnim() {
}
// Draw the person if not animating
- if (people[PLAYER]._type == CHARACTER && people[PLAYER]._walkLoaded) {
+ if (people[HOLMES]._type == CHARACTER && people[HOLMES]._walkLoaded) {
// If Holmes is too far to the right, move him back so he's on-screen
- int xRight = SHERLOCK_SCREEN_WIDTH - 2 - people[PLAYER]._imageFrame->_frame.w;
- int tempX = MIN(people[PLAYER]._position.x / FIXED_INT_MULTIPLIER, xRight);
+ int xRight = SHERLOCK_SCREEN_WIDTH - 2 - people[HOLMES]._imageFrame->_frame.w;
+ int tempX = MIN(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER, xRight);
- bool flipped = people[PLAYER]._sequenceNumber == WALK_LEFT || people[PLAYER]._sequenceNumber == STOP_LEFT ||
- people[PLAYER]._sequenceNumber == WALK_UPLEFT || people[PLAYER]._sequenceNumber == STOP_UPLEFT ||
- people[PLAYER]._sequenceNumber == WALK_DOWNRIGHT || people[PLAYER]._sequenceNumber == STOP_DOWNRIGHT;
- screen._backBuffer->transBlitFrom(*people[PLAYER]._imageFrame,
- Common::Point(tempX, people[PLAYER]._position.y / FIXED_INT_MULTIPLIER - people[PLAYER]._imageFrame->_frame.h), flipped);
+ bool flipped = people[HOLMES]._sequenceNumber == WALK_LEFT || people[HOLMES]._sequenceNumber == STOP_LEFT ||
+ people[HOLMES]._sequenceNumber == WALK_UPLEFT || people[HOLMES]._sequenceNumber == STOP_UPLEFT ||
+ people[HOLMES]._sequenceNumber == WALK_DOWNRIGHT || people[HOLMES]._sequenceNumber == STOP_DOWNRIGHT;
+ screen._backBuffer->transBlitFrom(*people[HOLMES]._imageFrame,
+ Common::Point(tempX, people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES]._imageFrame->_frame.h), flipped);
}
// Draw all static and active shapes are NORMAL and are in front of the person
@@ -390,20 +390,20 @@ void ScalpelScene::doBgAnim() {
_animating = 0;
screen.slamRect(Common::Rect(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCENE_HEIGHT));
} else {
- if (people[PLAYER]._type != INVALID && ((_goToScene == -1 || _canimShapes.empty()))) {
- if (people[PLAYER]._type == REMOVE) {
+ if (people[HOLMES]._type != INVALID && ((_goToScene == -1 || _canimShapes.empty()))) {
+ if (people[HOLMES]._type == REMOVE) {
screen.slamRect(Common::Rect(
- people[PLAYER]._oldPosition.x, people[PLAYER]._oldPosition.y,
- people[PLAYER]._oldPosition.x + people[PLAYER]._oldSize.x,
- people[PLAYER]._oldPosition.y + people[PLAYER]._oldSize.y
+ people[HOLMES]._oldPosition.x, people[HOLMES]._oldPosition.y,
+ people[HOLMES]._oldPosition.x + people[HOLMES]._oldSize.x,
+ people[HOLMES]._oldPosition.y + people[HOLMES]._oldSize.y
));
- people[PLAYER]._type = INVALID;
+ people[HOLMES]._type = INVALID;
} else {
- screen.flushImage(people[PLAYER]._imageFrame,
- Common::Point(people[PLAYER]._position.x / FIXED_INT_MULTIPLIER,
- people[PLAYER]._position.y / FIXED_INT_MULTIPLIER - people[PLAYER].frameHeight()),
- &people[PLAYER]._oldPosition.x, &people[PLAYER]._oldPosition.y,
- &people[PLAYER]._oldSize.x, &people[PLAYER]._oldSize.y);
+ screen.flushImage(people[HOLMES]._imageFrame,
+ Common::Point(people[HOLMES]._position.x / FIXED_INT_MULTIPLIER,
+ people[HOLMES]._position.y / FIXED_INT_MULTIPLIER - people[HOLMES].frameHeight()),
+ &people[HOLMES]._oldPosition.x, &people[HOLMES]._oldPosition.y,
+ &people[HOLMES]._oldSize.x, &people[HOLMES]._oldSize.y);
}
}
@@ -525,8 +525,8 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
if (walkPos.x != -1) {
// Holmes must walk to the walk point before the cAnimation is started
- if (people[PLAYER]._position != walkPos)
- people[PLAYER].walkToCoords(walkPos, walkDir);
+ if (people[HOLMES]._position != walkPos)
+ people[HOLMES].walkToCoords(walkPos, walkDir);
}
if (talk._talkToAbort)
@@ -563,7 +563,7 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
if (cAnim._name.size() > 0 && cAnim._type != NO_SHAPE) {
if (tpPos.x != -1)
- people[PLAYER]._type = REMOVE;
+ people[HOLMES]._type = REMOVE;
Common::String fname = cAnim._name + ".vgs";
if (!res.isInCache(fname)) {
@@ -653,14 +653,14 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
cObj._frameNumber += dir;
}
- people[PLAYER]._type = CHARACTER;
+ people[HOLMES]._type = CHARACTER;
}
// Teleport to ending coordinates if necessary
if (tpPos.x != -1) {
- people[PLAYER]._position = tpPos; // Place the player
- people[PLAYER]._sequenceNumber = tpDir;
- people[PLAYER].gotoStand();
+ people[HOLMES]._position = tpPos; // Place the player
+ people[HOLMES]._sequenceNumber = tpDir;
+ people[HOLMES].gotoStand();
}
if (playRate < 0)
@@ -686,10 +686,10 @@ int ScalpelScene::startCAnim(int cAnimNum, int playRate) {
if (tpPos.x != -1 && !talk._talkToAbort) {
// Teleport to ending coordinates
- people[PLAYER]._position = tpPos;
- people[PLAYER]._sequenceNumber = tpDir;
+ people[HOLMES]._position = tpPos;
+ people[HOLMES]._sequenceNumber = tpDir;
- people[PLAYER].gotoStand();
+ people[HOLMES].gotoStand();
}
events.setCursor(oldCursor);
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 5d2ece611b..ea5a0fb713 100644
--- a/engines/sherlock/scalpel/scalpel_talk.cpp
+++ b/engines/sherlock/scalpel/scalpel_talk.cpp
@@ -456,7 +456,7 @@ OpcodeReturn ScalpelTalk::cmdWalkToCoords(const byte *&str) {
People &people = *_vm->_people;
++str;
- people[PLAYER].walkToCoords(Point32(((str[0] - 1) * 256 + str[1] - 1) * FIXED_INT_MULTIPLIER,
+ people[HOLMES].walkToCoords(Point32(((str[0] - 1) * 256 + str[1] - 1) * FIXED_INT_MULTIPLIER,
str[2] * FIXED_INT_MULTIPLIER), str[3] - 1);
if (_talkToAbort)
return RET_EXIT;
diff --git a/engines/sherlock/scalpel/scalpel_user_interface.cpp b/engines/sherlock/scalpel/scalpel_user_interface.cpp
index cb2bf65342..8dd15e5827 100644
--- a/engines/sherlock/scalpel/scalpel_user_interface.cpp
+++ b/engines/sherlock/scalpel/scalpel_user_interface.cpp
@@ -326,7 +326,7 @@ void ScalpelUserInterface::handleInput() {
} else {
people._walkDest = pt;
people._allowWalkAbort = false;
- people[PLAYER].goAllTheWay();
+ people[HOLMES].goAllTheWay();
}
if (_oldKey != -1) {
@@ -511,7 +511,7 @@ void ScalpelUserInterface::examine() {
scene.startCAnim(_cNum, canimSpeed);
} else if (obj._lookPosition.y != 0) {
// Need to walk to the object to be examined
- people[PLAYER].walkToCoords(obj._lookPosition, obj._lookFacing);
+ people[HOLMES].walkToCoords(obj._lookPosition, obj._lookFacing);
}
if (!talk._talkToAbort) {
@@ -2236,13 +2236,13 @@ void ScalpelUserInterface::checkAction(ActionType &action, const char *const mes
printed = true;
if (pt.x != -1)
// Holmes needs to walk to object before the action is done
- people[PLAYER].walkToCoords(pt, dir);
+ people[HOLMES].walkToCoords(pt, dir);
if (!talk._talkToAbort) {
// Ensure Holmes is on the exact intended location
- people[PLAYER]._position = pt;
- people[PLAYER]._sequenceNumber = dir;
- people[PLAYER].gotoStand();
+ people[HOLMES]._position = pt;
+ people[HOLMES]._sequenceNumber = dir;
+ people[HOLMES].gotoStand();
talk.talkTo(action._names[nameIdx].c_str() + 2);
if (ch == 'T')
@@ -2255,7 +2255,7 @@ void ScalpelUserInterface::checkAction(ActionType &action, const char *const mes
if (doCAnim && !talk._talkToAbort) {
if (pt.x != -1)
// Holmes needs to walk to object before the action is done
- people[PLAYER].walkToCoords(pt, dir);
+ people[HOLMES].walkToCoords(pt, dir);
}
for (int nameIdx = 0; nameIdx < NAMES_COUNT; ++nameIdx) {