aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-06 21:51:55 -0400
committerPaul Gilbert2015-08-06 21:51:55 -0400
commitb573e0cf7af9bf194888a132ebe1a96d8deb9d25 (patch)
tree4f9c21be63221eb7567d3a5c135fb303774e6495 /engines
parent59bc9f846d639c2794ec41065092e49e8458c5f9 (diff)
downloadscummvm-rg350-b573e0cf7af9bf194888a132ebe1a96d8deb9d25.tar.gz
scummvm-rg350-b573e0cf7af9bf194888a132ebe1a96d8deb9d25.tar.bz2
scummvm-rg350-b573e0cf7af9bf194888a132ebe1a96d8deb9d25.zip
SHERLOCK: RT: Fix NPC indexes in multiple opcodes
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/tattoo/tattoo_talk.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index 0d385008b3..4fea876586 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -280,10 +280,10 @@ OpcodeReturn TattooTalk::cmdGotoScene(const byte *&str) {
if (str[2] > 100) {
people._savedPos = PositionFacing(160, 100, str[2]);
} else {
- int32 posX = (str[3] - 1) * 256 + str[4] - 1;
+ int posX = (str[3] - 1) * 256 + str[4] - 1;
if (posX > 16384)
posX = -1 * (posX - 16384);
- int32 posY = (str[5] - 1) * 256 + str[6] - 1;
+ int posY = (str[5] - 1) * 256 + str[6] - 1;
people._savedPos = PositionFacing(posX, posY, str[2] - 1);
}
@@ -403,7 +403,7 @@ OpcodeReturn TattooTalk::cmdPlaySong(const byte *&str) {
}
OpcodeReturn TattooTalk::cmdRestorePeopleSequence(const byte *&str) {
- int npcNum = *++str - 1;
+ int npcNum = *++str;
TattooPeople &people = *(TattooPeople *)_vm->_people;
TattooPerson &person = people[npcNum];
person._misc = 0;
@@ -560,14 +560,14 @@ OpcodeReturn TattooTalk::cmdSetNPCPathPauseLookingHolmes(const byte *&str) {
}
OpcodeReturn TattooTalk::cmdSetNPCPosition(const byte *&str) {
- int npcNum = *++str - 1;
+ int npcNum = *++str;
++str;
TattooPeople &people = *(TattooPeople *)_vm->_people;
TattooPerson &person = people[npcNum];
- int32 posX = (str[0] - 1) * 256 + str[1] - 1;
+ int posX = (str[0] - 1) * 256 + str[1] - 1;
if (posX > 16384)
posX = -1 * (posX - 16384);
- int32 posY = (str[2] - 1) * 256 + str[3] - 1;
+ int posY = (str[2] - 1) * 256 + str[3] - 1;
people[npcNum]._position = Point32(posX * FIXED_INT_MULTIPLIER, posY * FIXED_INT_MULTIPLIER);
if (person._seqTo && person._walkLoaded) {
@@ -593,7 +593,7 @@ OpcodeReturn TattooTalk::cmdSetNPCPosition(const byte *&str) {
break;
}
}
- } while(!done);
+ } while (!done);
}
str += 4;
@@ -710,7 +710,7 @@ OpcodeReturn TattooTalk::cmdSetNPCVerbTarget(const byte *&str) {
}
OpcodeReturn TattooTalk::cmdSetNPCWalkGraphics(const byte *&str) {
- int npcNum = *++str - 1;
+ int npcNum = *++str;
TattooPeople &people = *(TattooPeople *)_vm->_people;
Person &person = people[npcNum];