[Scummvm-cvs-logs] scummvm master -> b573e0cf7af9bf194888a132ebe1a96d8deb9d25

dreammaster dreammaster at scummvm.org
Fri Aug 7 03:52:49 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b573e0cf7a SHERLOCK: RT: Fix NPC indexes in multiple opcodes


Commit: b573e0cf7af9bf194888a132ebe1a96d8deb9d25
    https://github.com/scummvm/scummvm/commit/b573e0cf7af9bf194888a132ebe1a96d8deb9d25
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-08-06T21:51:55-04:00

Commit Message:
SHERLOCK: RT: Fix NPC indexes in multiple opcodes

Changed paths:
    engines/sherlock/tattoo/tattoo_talk.cpp



diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index 0d38500..4fea876 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];
 






More information about the Scummvm-git-logs mailing list