[Scummvm-cvs-logs] scummvm master -> 76419173b556a094828160dfe37b944bb10bf9c0

dreammaster dreammaster at scummvm.org
Thu Jul 2 03:53:24 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:
76419173b5 SHERLOCK: RT: Fix infinite empty talk dialog in intro


Commit: 76419173b556a094828160dfe37b944bb10bf9c0
    https://github.com/scummvm/scummvm/commit/76419173b556a094828160dfe37b944bb10bf9c0
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-01T21:50:32-04:00

Commit Message:
SHERLOCK: RT: Fix infinite empty talk dialog in intro

Changed paths:
    engines/sherlock/journal.cpp
    engines/sherlock/scalpel/scalpel_talk.cpp
    engines/sherlock/scalpel/scalpel_talk.h
    engines/sherlock/talk.cpp
    engines/sherlock/talk.h
    engines/sherlock/tattoo/tattoo_talk.cpp



diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index bcac69f..6a4347a 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -547,7 +547,7 @@ void Journal::loadJournalFile(bool alreadyLoaded) {
 					replyP += (*replyP & 127) + 1;
 				} else if (c == opcodes[OP_GOTO_SCENE]) {
 					replyP += 5;
-				} else if (c == opcodes[OP_CARRIAGE_RETURN]) {
+				} else if (c == opcodes[OP_END_TEXT_WINDOW]) {
 					journalString += "\n";
 				}
 			} else {
@@ -632,7 +632,7 @@ void Journal::loadJournalFile(bool alreadyLoaded) {
 
 			// Put a space in the output for a control character, unless it's
 			// immediately coming after another control character
-			if (ctrlSpace && c != opcodes[OP_ASSIGN_PORTRAIT_LOCATION] && c != opcodes[OP_CARRIAGE_RETURN] && 
+			if (ctrlSpace && c != opcodes[OP_ASSIGN_PORTRAIT_LOCATION] && c != opcodes[OP_END_TEXT_WINDOW] &&
 					!commentJustPrinted) {
 				journalString += " ";
 				ctrlSpace = false;
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp
index 2669754..ed529df 100644
--- a/engines/sherlock/scalpel/scalpel_talk.cpp
+++ b/engines/sherlock/scalpel/scalpel_talk.cpp
@@ -69,7 +69,7 @@ const byte SCALPEL_OPCODES[] = {
 	158,	// OP_REMOVE_ITEM_FROM_INVENTORY
 	159,	// OP_ENABLE_END_KEY
 	160,	// OP_DISABLE_END_KEY
-	161,	// OP_CARRIAGE_RETURN
+	161,	// OP_END_TEXT_WINDOW
 	0,		// OP_MOUSE_ON_OFF
 	0,		// OP_SET_WALK_CONTROL
 	0,		// OP_SET_TALK_SEQUENCE
@@ -103,8 +103,7 @@ const byte SCALPEL_OPCODES[] = {
 	0,		// OP_RESTORE_PEOPLE_SEQUENCE
 	0,		// OP_NPC_VERB_TARGET
 	0,		// OP_TURN_SOUNDS_OFF
-	0,		// OP_NULL
-	0		// OP_END_TEXT_WINDOW
+	0		// OP_NULL
 };
 
 /*----------------------------------------------------------------*/
@@ -148,14 +147,14 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) {
 		(OpcodeMethod)&ScalpelTalk::cmdEnableEndKey,
 		(OpcodeMethod)&ScalpelTalk::cmdDisableEndKey,
 		
-		(OpcodeMethod)&ScalpelTalk::cmdCarriageReturn,
+		(OpcodeMethod)&ScalpelTalk::cmdEndTextWindow,
 		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
 		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
-		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
+		nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr
 	};
 
 	_opcodeTable = OPCODE_METHODS;
@@ -525,10 +524,6 @@ OpcodeReturn ScalpelTalk::cmdSummonWindow(const byte *&str) {
 	return RET_SUCCESS;
 }
 
-OpcodeReturn ScalpelTalk::cmdCarriageReturn(const byte *&str) {
-	return RET_SUCCESS;
-}
-
 void ScalpelTalk::talkWait(const byte *&str) {
 	UserInterface &ui = *_vm->_ui;
 	bool pauseFlag = _pauseFlag;
diff --git a/engines/sherlock/scalpel/scalpel_talk.h b/engines/sherlock/scalpel/scalpel_talk.h
index 01e7c05..24188d8 100644
--- a/engines/sherlock/scalpel/scalpel_talk.h
+++ b/engines/sherlock/scalpel/scalpel_talk.h
@@ -50,7 +50,6 @@ private:
 	OpcodeReturn cmdRemovePortrait(const byte *&str);
 	OpcodeReturn cmdSfxCommand(const byte *&str);
 	OpcodeReturn cmdSummonWindow(const byte *&str);
-	OpcodeReturn cmdCarriageReturn(const byte *&str);
 	OpcodeReturn cmdWalkToCoords(const byte *&str);
 protected:
 	/**
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 11ae9b4..abd41b9 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -857,7 +857,7 @@ void Talk::doScript(const Common::String &script) {
 		}
 
 		// Open window if it wasn't already open, and text has already been printed
-		if ((_openTalkWindow && _wait) || (_openTalkWindow && str[0] >= _opcodes[0] && str[0] != _opcodes[OP_CARRIAGE_RETURN])) {
+		if ((_openTalkWindow && _wait) || (_openTalkWindow && str[0] >= _opcodes[0] && str[0] != _opcodes[OP_END_TEXT_WINDOW])) {
 			if (!ui._slideWindows) {
 				screen.slamRect(Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
 			} else {
@@ -1128,6 +1128,10 @@ OpcodeReturn Talk::cmdEnableEndKey(const byte *&str) {
 	return RET_SUCCESS;
 }
 
+OpcodeReturn Talk::cmdEndTextWindow(const byte *&str) {
+	return RET_SUCCESS;
+}
+
 OpcodeReturn Talk::cmdHolmesOff(const byte *&str) {
 	People &people = *_vm->_people;
 	people[HOLMES]._type = REMOVE;
diff --git a/engines/sherlock/talk.h b/engines/sherlock/talk.h
index ef11551..4230a03 100644
--- a/engines/sherlock/talk.h
+++ b/engines/sherlock/talk.h
@@ -71,7 +71,7 @@ enum {
 	OP_REMOVE_ITEM_FROM_INVENTORY = 30,
 	OP_ENABLE_END_KEY			= 31,
 	OP_DISABLE_END_KEY			= 32,
-	OP_CARRIAGE_RETURN			= 33,
+	OP_END_TEXT_WINDOW			= 33,
 	
 	OP_MOUSE_OFF_ON				= 34,
 	OP_SET_WALK_CONTROL			= 35,
@@ -106,8 +106,7 @@ enum {
 	OP_RESTORE_PEOPLE_SEQUENCE	= 64,
 	OP_NPC_VERB_TARGET			= 65,
 	OP_TURN_SOUNDS_OFF			= 66,
-	OP_NULL						= 67,
-	OP_END_TEXT_WINDOW			= 68
+	OP_NULL						= 67
 };
 
 enum OpcodeReturn { RET_EXIT = -1, RET_SUCCESS = 0, RET_CONTINUE = 1 };
@@ -229,6 +228,7 @@ protected:
 	OpcodeReturn cmdCallTalkFile(const byte *&str);
 	OpcodeReturn cmdDisableEndKey(const byte *&str);
 	OpcodeReturn cmdEnableEndKey(const byte *&str);
+	OpcodeReturn cmdEndTextWindow(const byte *&str);
 	OpcodeReturn cmdHolmesOff(const byte *&str);
 	OpcodeReturn cmdHolmesOn(const byte *&str);
 	OpcodeReturn cmdPause(const byte *&str);
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index f875554..84a7924 100644
--- a/engines/sherlock/tattoo/tattoo_talk.cpp
+++ b/engines/sherlock/tattoo/tattoo_talk.cpp
@@ -70,7 +70,7 @@ const byte TATTOO_OPCODES[] = {
 	200,	// OP_REMOVE_ITEM_FROM_INVENTORY
 	201,	// OP_ENABLE_END_KEY
 	202,	// OP_DISABLE_END_KEY
-	0,		// OP_CARRIAGE_RETURN
+	203,	// OP_END_TEXT_WINDOW
 	174,	// OP_MOUSE_ON_OFF
 	175,	// OP_SET_WALK_CONTROL
 	180,	// OP_SET_TALK_SEQUENCE
@@ -104,8 +104,7 @@ const byte TATTOO_OPCODES[] = {
 	224,	// OP_RESTORE_PEOPLE_SEQUENCE
 	226,	// OP_NPC_VERB_TARGET
 	227,	// OP_TURN_SOUNDS_OFF
-	225,	// OP_NULL
-	203		// OP_END_TEXT_WINDOW
+	225		// OP_NULL
 };
 
 /*----------------------------------------------------------------*/
@@ -149,7 +148,7 @@ TattooTalk::TattooTalk(SherlockEngine *vm) : Talk(vm), _talkWidget(vm) {
 
 		(OpcodeMethod)&TattooTalk::cmdEnableEndKey,
 		(OpcodeMethod)&TattooTalk::cmdDisableEndKey,
-		nullptr,
+		(OpcodeMethod)&TattooTalk::cmdEndTextWindow,
 		(OpcodeMethod)&TattooTalk::cmdWalkHomesAndNPCToCoords,
 		(OpcodeMethod)&TattooTalk::cmdSetNPCTalkFile,
 		(OpcodeMethod)&TattooTalk::cmdSetNPCOff,
@@ -174,8 +173,7 @@ TattooTalk::TattooTalk(SherlockEngine *vm) : Talk(vm), _talkWidget(vm) {
 		nullptr,
 		(OpcodeMethod)&TattooTalk::cmdRestorePeopleSequence,
 		(OpcodeMethod)&TattooTalk::cmdSetNPCVerbTarget,
-		(OpcodeMethod)&TattooTalk::cmdTurnSoundsOff,
-		nullptr
+		(OpcodeMethod)&TattooTalk::cmdTurnSoundsOff
 	};
 
 	_opcodes = TATTOO_OPCODES;






More information about the Scummvm-git-logs mailing list