aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-22 12:10:01 -0400
committerPaul Gilbert2015-08-22 12:10:01 -0400
commitc0915e95a0112a64c85f909afc8b717357c1c94a (patch)
tree0870766ce68a2faa17cc4458467d479829235711 /engines/sherlock/tattoo
parentb21991098c28e002aaa5a91d8c3fafede2ece18d (diff)
downloadscummvm-rg350-c0915e95a0112a64c85f909afc8b717357c1c94a.tar.gz
scummvm-rg350-c0915e95a0112a64c85f909afc8b717357c1c94a.tar.bz2
scummvm-rg350-c0915e95a0112a64c85f909afc8b717357c1c94a.zip
SHERLOCK: RT: Fix Sherlock being drawn behind desk at Hospital
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r--engines/sherlock/tattoo/tattoo_scene.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp
index 2f88f4c715..b639ff878a 100644
--- a/engines/sherlock/tattoo/tattoo_scene.cpp
+++ b/engines/sherlock/tattoo/tattoo_scene.cpp
@@ -45,9 +45,12 @@ struct ShapeEntry {
int _yp;
int _objNum;
- ShapeEntry(TattooPerson *person, int yp) : _shape(nullptr), _person(person), _yp(yp), _isAnimation(false), _objNum(-1) {}
- ShapeEntry(Object *shape, int yp, int objNum) : _shape(shape), _person(nullptr), _yp(yp), _isAnimation(false), _objNum(objNum) {}
- ShapeEntry(int yp) : _shape(nullptr), _person(nullptr), _yp(yp), _isAnimation(true), _objNum(-1) {}
+ ShapeEntry(TattooPerson *person, int yp, int npcIndex) :
+ _shape(nullptr), _person(person), _yp(yp), _isAnimation(false), _objNum(npcIndex + 1000) {}
+ ShapeEntry(Object *shape, int yp, int objNum) :
+ _shape(shape), _person(nullptr), _yp(yp), _isAnimation(false), _objNum(objNum) {}
+ ShapeEntry(int yp) :
+ _shape(nullptr), _person(nullptr), _yp(yp), _isAnimation(true), _objNum(-1) {}
};
typedef Common::List<ShapeEntry> ShapeList;
@@ -170,7 +173,7 @@ void TattooScene::drawAllShapes() {
// Queue all active characters for drawing
for (int idx = 0; idx < MAX_CHARACTERS; ++idx) {
if (people[idx]._type == CHARACTER && people[idx]._walkLoaded)
- shapeList.push_back(ShapeEntry(&people[idx], people[idx]._position.y / FIXED_INT_MULTIPLIER));
+ shapeList.push_back(ShapeEntry(&people[idx], people[idx]._position.y / FIXED_INT_MULTIPLIER, idx));
}
// Sort the list