[Scummvm-git-logs] scummvm master -> cf6ae0cd5ece7da5005c5e55378f7f2338c9068c

dreammaster dreammaster at scummvm.org
Sat Oct 29 03:50:54 CEST 2016


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

Summary:
4e903e7ac7 TITANIC: Fix starting queued reverse playing movie clips
cf6ae0cd5e TITANIC: More renaming and debug logging


Commit: 4e903e7ac7d6cd02484b9692aae6dfe0f2af068f
    https://github.com/scummvm/scummvm/commit/4e903e7ac7d6cd02484b9692aae6dfe0f2af068f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-28T21:50:12-04:00

Commit Message:
TITANIC: Fix starting queued reverse playing movie clips

Changed paths:
    engines/titanic/support/avi_surface.cpp



diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 0745881..8d89ef7 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -164,8 +164,8 @@ bool AVISurface::handleEvents(CMovieEventList &events) {
 	_currentFrame += _isReversed ? -1 : 1;
 
 	int newFrame = _currentFrame;
-	if ((info->_isReversed && newFrame <= info->_endFrame) ||
-		(!info->_isReversed && newFrame >= info->_endFrame)) {
+	if ((info->_isReversed && newFrame < info->_endFrame) ||
+		(!info->_isReversed && newFrame > info->_endFrame)) {
 		if (info->_isRepeat) {
 			newFrame = info->_startFrame;
 		} else {
@@ -180,6 +180,7 @@ bool AVISurface::handleEvents(CMovieEventList &events) {
 				// Not empty, so move onto new first one
 				info = _movieRangeInfo.front();
 				newFrame = info->_startFrame;
+				setReversed(info->_isReversed);
 			}
 		}
 	}


Commit: cf6ae0cd5ece7da5005c5e55378f7f2338c9068c
    https://github.com/scummvm/scummvm/commit/cf6ae0cd5ece7da5005c5e55378f7f2338c9068c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-28T21:50:49-04:00

Commit Message:
TITANIC: More renaming and debug logging

Changed paths:
    engines/titanic/carry/carry.cpp
    engines/titanic/npcs/doorbot.cpp
    engines/titanic/npcs/doorbot.h
    engines/titanic/npcs/true_talk_npc.cpp



diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index 7cd1361..58b7996 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -25,6 +25,7 @@
 #include "titanic/npcs/character.h"
 #include "titanic/npcs/succubus.h"
 #include "titanic/pet_control/pet_control.h"
+#include "titanic/titanic.h"
 
 namespace Titanic {
 
@@ -98,6 +99,7 @@ void CCarry::load(SimpleFile *file) {
 
 bool CCarry::MouseDragStartMsg(CMouseDragStartMsg *msg) {
 	CString name = getName();
+	debugC(ERROR_BASIC, kDebugScripts, "MosueDragStartMsg - %s", name.c_str());
 
 	if (_fieldE0) {
 		if (checkStartDragging(msg)) {
@@ -121,6 +123,7 @@ bool CCarry::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
 }
 
 bool CCarry::MouseDragEndMsg(CMouseDragEndMsg *msg) {
+	debugC(ERROR_BASIC, kDebugScripts, "MosueDragEndMsg");
 	showMouse();
 
 	if (msg->_dropTarget) {
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 4e08dda..54d7604 100644
--- a/engines/titanic/npcs/doorbot.cpp
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -49,7 +49,7 @@ int CDoorbot::_v1;
 int CDoorbot::_v2;
 
 CDoorbot::CDoorbot() : CTrueTalkNPC() {
-	_field108 = 0;
+	_introMovieNum = 0;
 	_timerId = 0;
 	_field110 = 0;
 	_field114 = 0;
@@ -60,7 +60,7 @@ void CDoorbot::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(_v1, indent);
 	file->writeNumberLine(_v2, indent);
 
-	file->writeNumberLine(_field108, indent);
+	file->writeNumberLine(_introMovieNum, indent);
 	file->writeNumberLine(_timerId, indent);
 	file->writeNumberLine(_field110, indent);
 	file->writeNumberLine(_field114, indent);
@@ -73,7 +73,7 @@ void CDoorbot::load(SimpleFile *file) {
 	_v1 = file->readNumber();
 	_v2 = file->readNumber();
 
-	_field108 = file->readNumber();
+	_introMovieNum = file->readNumber();
 	_timerId = file->readNumber();
 	_field110 = file->readNumber();
 	_field114 = file->readNumber();
@@ -82,13 +82,13 @@ void CDoorbot::load(SimpleFile *file) {
 }
 
 bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
-	debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d", _npcFlags, _field108);
+	debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d", _npcFlags, _introMovieNum);
 
 	if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
-		switch (_field108) {
+		switch (_introMovieNum) {
 		case 3:
 			startTalking(this, 221482);
-			_field108 = 4;
+			_introMovieNum = 4;
 			break;
 
 		case 6:
@@ -102,7 +102,7 @@ bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
 
 		case 7:
 			startTalking(this, 221467);
-			_field108 = 8;
+			_introMovieNum = 8;
 			break;
 
 		case 9:
@@ -125,7 +125,7 @@ bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
 			endTalking(this, false);
 			startTalking(this, 221474);
 			_npcFlags |= NPCFLAG_DOORBOT_INTRO;
-			_field108 = 0;
+			_introMovieNum = 0;
 		} else if (clipExistsByEnd("Cloak On", msg->_endFrame)) {
 			petShow();
 			setState1C(true);
@@ -230,7 +230,7 @@ bool CDoorbot::DoorbotNeededInElevatorMsg(CDoorbotNeededInElevatorMsg *msg) {
 	setPosition(Point(100, 42));
 
 	if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
-		_field108 = 7;
+		_introMovieNum = 7;
 		_npcFlags |= NPCFLAG_200000;
 		loadFrame(797);
 	} else {
@@ -255,6 +255,8 @@ bool CDoorbot::TimerMsg(CTimerMsg *msg) {
 	if (msg->_action == "NPCIdleAnim") {
 		return CTrueTalkNPC::TimerMsg(msg);
 	} else if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
+		_timerId = 0;
+
 		switch (msg->_actionVal) {
 		case 0:
 			startTalking(this, 221475);
@@ -273,7 +275,7 @@ bool CDoorbot::TimerMsg(CTimerMsg *msg) {
 			playClip("DoubleTake End", 0);
 			playClip("DoubleTake Start", 0);
 			playClip("DoubleTake End", MOVIE_NOTIFY_OBJECT);
-			_field108 = 3;
+			_introMovieNum = 3;
 			break;
 
 		case 4:
@@ -337,11 +339,11 @@ bool CDoorbot::NPCPlayTalkingAnimationMsg(CNPCPlayTalkingAnimationMsg *msg) {
 
 	if (msg->_value2 != 2) {
 		if (_npcFlags & NPCFLAG_200000) {
-			if (_field108 == 8 || _field110) {
+			if (_introMovieNum == 8 || _field110) {
 				msg->_names = NAMES2;
-			} else if (_field108 == 9) {
+			} else if (_introMovieNum == 9) {
 				msg->_names = NAMES3;
-				_field108 = 10;
+				_introMovieNum = 10;
 			}
 		} else if (_npcFlags & (NPCFLAG_100000 | NPCFLAG_400000)) {
 			msg->_names = NAMES1;
@@ -412,7 +414,7 @@ bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg)
 		switch (msg->_dialogueId) {
 		case 10552:
 			playClip("SE Try Buttons", MOVIE_NOTIFY_OBJECT);
-			_field108 = 9;
+			_introMovieNum = 9;
 			break;
 
 		case 10553:
@@ -421,7 +423,7 @@ bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg)
 
 		case 10557:
 			playClip("SE Move To Right", MOVIE_NOTIFY_OBJECT);
-			_field108 = 11;
+			_introMovieNum = 11;
 			break;
 
 		case 10559:
@@ -438,13 +440,13 @@ bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg)
 
 		case 10561:
 			enableMouse();
-			_field108 = 1;
+			_introMovieNum = 1;
 			stopAnimTimer(_timerId);
 			_timerId = addTimer(2, 10000, 0);
 			break;
 
 		case 10562:
-			if (_field108 == 1) {
+			if (_introMovieNum == 1) {
 				stopAnimTimer(_timerId);
 				_timerId = addTimer(2, getRandomNumber(5000), 0);
 			}
@@ -465,7 +467,7 @@ bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg)
 			_timerId = 0;
 			if (_field110 == 2) {
 				playClip("Cloak On", MOVIE_NOTIFY_OBJECT);
-				_field108 = 6;
+				_introMovieNum = 6;
 			} else {
 				_timerId = addTimer(3, 2000, 0);
 			}
@@ -500,7 +502,7 @@ bool CDoorbot::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg)
 
 		case 10571:
 			playClip("Cloak On", MOVIE_NOTIFY_OBJECT);
-			_field108 = 6;
+			_introMovieNum = 6;
 			break;
 
 		default:
@@ -515,9 +517,9 @@ bool CDoorbot::TextInputMsg(CTextInputMsg *msg) {
 	if (!(_npcFlags & NPCFLAG_DOORBOT_INTRO))
 		return CTrueTalkNPC::TextInputMsg(msg);
 
-	if (_field108 == 1) {
+	if (_introMovieNum == 1) {
 		stopAnimTimer(_timerId);
-		_field108 = 2;
+		_introMovieNum = 2;
 		_timerId = 0;
 
 		if (msg->_input == "yes" || msg->_input == "yeah"
@@ -535,7 +537,7 @@ bool CDoorbot::TextInputMsg(CTextInputMsg *msg) {
 }
 
 bool CDoorbot::EnterViewMsg(CEnterViewMsg *msg) {
-	if ((_npcFlags & NPCFLAG_DOORBOT_INTRO) && _field108 == 7)
+	if ((_npcFlags & NPCFLAG_DOORBOT_INTRO) && _introMovieNum == 7)
 		playClip("SE Move And Turn", MOVIE_NOTIFY_OBJECT);
 
 	return true;
@@ -543,7 +545,7 @@ bool CDoorbot::EnterViewMsg(CEnterViewMsg *msg) {
 
 bool CDoorbot::ActMsg(CActMsg *msg) {
 	debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot ActMsg action=%s v108=%d v110=%d v114=%d",
-		msg->_action.c_str(), _field108, _field110, _field114);
+		msg->_action.c_str(), _introMovieNum, _field110, _field114);
 
 	if (msg->_action == "DoorbotPlayerPressedTopButton") {
 		disableMouse();
@@ -556,15 +558,15 @@ bool CDoorbot::ActMsg(CActMsg *msg) {
 		startTalking(this, 221472);
 	} else if (msg->_action == "PlayerPicksUpPhoto") {
 		_field110 = 1;
-		if (!_field114 && _field108 == 4) {
+		if (!_field114 && _introMovieNum == 4) {
 			stopAnimTimer(_timerId);
 			_timerId = 0;
-			_field108 = 5;
+			_introMovieNum = 5;
 			startTalking(this, 221484);
 		}
 	} else if (msg->_action == "PlayerPutsPhotoInPet") {
 		_field110 = 2;
-		if (!_field114 && _field108 == 5) {
+		if (!_field114 && _introMovieNum == 5) {
 			stopAnimTimer(_timerId);
 			_timerId = 0;
 			startTalking(this, 221486);
diff --git a/engines/titanic/npcs/doorbot.h b/engines/titanic/npcs/doorbot.h
index 9095ebc..1cb7ec3 100644
--- a/engines/titanic/npcs/doorbot.h
+++ b/engines/titanic/npcs/doorbot.h
@@ -49,7 +49,7 @@ private:
 	static int _v1;
 	static int _v2;
 private:
-	int _field108;
+	int _introMovieNum;
 	int _timerId;
 	int _field110;
 	int _field114;
diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index b405ad4..15a70b1 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -96,7 +96,8 @@ bool CTrueTalkNPC::DismissBotMsg(CDismissBotMsg *msg) {
 }
 
 bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) {
-	debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechStartedMsg flags=%x", getName().c_str(), _npcFlags);
+	debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechStartedMsg flags=%x dialogueId=%d",
+		getName().c_str(), _npcFlags, msg->_dialogueId);
 
 	_npcFlags |= NPCFLAG_SPEAKING;
 	++_speechCounter;
@@ -128,7 +129,7 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMs
 }
 
 bool CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
-	debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechEndedMsg flags=%x dialogId=%d", getName().c_str(), _npcFlags, msg->_dialogueId);
+	debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechEndedMsg flags=%x dialogueId=%d", getName().c_str(), _npcFlags, msg->_dialogueId);
 	_npcFlags &= ~NPCFLAG_SPEAKING;
 	--_speechCounter;
 	_speechDuration = 0;





More information about the Scummvm-git-logs mailing list