[Scummvm-git-logs] scummvm master -> 903cffca281c3ba44bd9d79d34dfc4eadf1a42b3

dreammaster dreammaster at scummvm.org
Wed Apr 5 02:53:41 CEST 2017


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:
903cffca28 TITANIC: Change debug level constants to have a DEBUG_ prefix


Commit: 903cffca281c3ba44bd9d79d34dfc4eadf1a42b3
    https://github.com/scummvm/scummvm/commit/903cffca281c3ba44bd9d79d34dfc4eadf1a42b3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-04T20:53:31-04:00

Commit Message:
TITANIC: Change debug level constants to have a DEBUG_ prefix

Changed paths:
    engines/titanic/carry/carry.cpp
    engines/titanic/core/game_object.cpp
    engines/titanic/npcs/doorbot.cpp
    engines/titanic/npcs/true_talk_npc.cpp
    engines/titanic/pet_control/pet_conversations.cpp
    engines/titanic/star_control/star_control_sub12.cpp
    engines/titanic/support/direct_draw.cpp
    engines/titanic/titanic.h


diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index fd5b593..47eea18 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -98,7 +98,7 @@ void CCarry::load(SimpleFile *file) {
 
 bool CCarry::MouseDragStartMsg(CMouseDragStartMsg *msg) {
 	CString name = getName();
-	debugC(ERROR_BASIC, kDebugScripts, "MosueDragStartMsg - %s", name.c_str());
+	debugC(DEBUG_BASIC, kDebugScripts, "MosueDragStartMsg - %s", name.c_str());
 
 	if (_canTake) {
 		if (checkStartDragging(msg)) {
@@ -122,7 +122,7 @@ bool CCarry::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
 }
 
 bool CCarry::MouseDragEndMsg(CMouseDragEndMsg *msg) {
-	debugC(ERROR_BASIC, kDebugScripts, "MouseDragEndMsg");
+	debugC(DEBUG_BASIC, kDebugScripts, "MouseDragEndMsg");
 	showMouse();
 
 	if (msg->_dropTarget) {
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index 50c5dc6..f99e2cc 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -645,7 +645,7 @@ void CGameObject::playMovie(int startFrame, int endFrame, int initialFrame, uint
 }
 
 void CGameObject::playClip(const CString &name, uint flags) {
-	debugC(ERROR_DETAILED, kDebugScripts, "playClip - %s", name.c_str());
+	debugC(DEBUG_DETAILED, kDebugScripts, "playClip - %s", name.c_str());
 
 	_frameNumber = -1;
 	CMovieClip *clip = _movieClips.findByName(name);
@@ -654,7 +654,7 @@ void CGameObject::playClip(const CString &name, uint flags) {
 }
 
 void CGameObject::playClip(uint startFrame, uint endFrame) {
-	debugC(ERROR_DETAILED, kDebugScripts, "playClip - %d to %d", startFrame, endFrame);
+	debugC(DEBUG_DETAILED, kDebugScripts, "playClip - %d to %d", startFrame, endFrame);
 
 	CMovieClip *clip = new CMovieClip("", startFrame, endFrame);
 	CGameManager *gameManager = getGameManager();
diff --git a/engines/titanic/npcs/doorbot.cpp b/engines/titanic/npcs/doorbot.cpp
index 03d723a..a1534fa 100644
--- a/engines/titanic/npcs/doorbot.cpp
+++ b/engines/titanic/npcs/doorbot.cpp
@@ -82,7 +82,7 @@ void CDoorbot::load(SimpleFile *file) {
 }
 
 bool CDoorbot::MovieEndMsg(CMovieEndMsg *msg) {
-	debugC(ERROR_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d, start=%d, end=%d",
+	debugC(DEBUG_DETAILED, kDebugScripts, "CDoorbot MovieEndMsg flags=%x v=%d, start=%d, end=%d",
 		_npcFlags, _introMovieNum, msg->_startFrame, msg->_endFrame);
 
 	if (_npcFlags & NPCFLAG_DOORBOT_INTRO) {
@@ -555,7 +555,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",
+	debugC(DEBUG_DETAILED, kDebugScripts, "CDoorbot ActMsg action=%s v108=%d v110=%d v114=%d",
 		msg->_action.c_str(), _introMovieNum, _field110, _field114);
 
 	if (msg->_action == "DoorbotPlayerPressedTopButton") {
diff --git a/engines/titanic/npcs/true_talk_npc.cpp b/engines/titanic/npcs/true_talk_npc.cpp
index 768ce46..f70a2f8 100644
--- a/engines/titanic/npcs/true_talk_npc.cpp
+++ b/engines/titanic/npcs/true_talk_npc.cpp
@@ -96,7 +96,7 @@ bool CTrueTalkNPC::DismissBotMsg(CDismissBotMsg *msg) {
 }
 
 bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMsg *msg) {
-	debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechStartedMsg flags=%x dialogueId=%d",
+	debugC(DEBUG_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechStartedMsg flags=%x dialogueId=%d",
 		getName().c_str(), _npcFlags, msg->_dialogueId);
 
 	_npcFlags |= NPCFLAG_SPEAKING;
@@ -129,7 +129,7 @@ bool CTrueTalkNPC::TrueTalkNotifySpeechStartedMsg(CTrueTalkNotifySpeechStartedMs
 }
 
 bool CTrueTalkNPC::TrueTalkNotifySpeechEndedMsg(CTrueTalkNotifySpeechEndedMsg *msg) {
-	debugC(ERROR_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechEndedMsg flags=%x dialogueId=%d", getName().c_str(), _npcFlags, msg->_dialogueId);
+	debugC(DEBUG_DETAILED, kDebugScripts, "%s TrueTalkNotifySpeechEndedMsg flags=%x dialogueId=%d", getName().c_str(), _npcFlags, msg->_dialogueId);
 	_npcFlags &= ~NPCFLAG_SPEAKING;
 	--_speechCounter;
 	_speechDuration = 0;
diff --git a/engines/titanic/pet_control/pet_conversations.cpp b/engines/titanic/pet_control/pet_conversations.cpp
index f7cfedf..6db804e 100644
--- a/engines/titanic/pet_control/pet_conversations.cpp
+++ b/engines/titanic/pet_control/pet_conversations.cpp
@@ -545,7 +545,7 @@ void CPetConversations::npcDialChange(uint dialNum, uint oldLevel, uint newLevel
 	assert(oldLevel <= 100 && newLevel <= 100);
 
 	if (newLevel != oldLevel) {
-		debugC(ERROR_DETAILED, kDebugScripts, "Dial %d change from %d to %d",
+		debugC(DEBUG_DETAILED, kDebugScripts, "Dial %d change from %d to %d",
 			dialNum, oldLevel, newLevel);
 		uint src = ascending[0], dest = ascending[1];
 		if (newLevel < oldLevel) {
diff --git a/engines/titanic/star_control/star_control_sub12.cpp b/engines/titanic/star_control/star_control_sub12.cpp
index 1f6df61..21546ed 100644
--- a/engines/titanic/star_control/star_control_sub12.cpp
+++ b/engines/titanic/star_control/star_control_sub12.cpp
@@ -25,6 +25,7 @@
 #include "titanic/star_control/star_control_sub22.h"
 #include "titanic/star_control/dmatrix.h"
 #include "titanic/star_control/fmatrix.h"
+#include "titanic/titanic.h"
 
 namespace Titanic {
 
@@ -218,6 +219,8 @@ FVector CStarControlSub12::proc31(int index, const FVector &v) {
 }
 
 void CStarControlSub12::setViewportPosition(const FPoint &angles) {
+	debug(DEBUG_INTERMEDIATE, "setViewportPosition %f %f", angles._x, angles._y);
+
 	if (isLocked())
 		return;
 
diff --git a/engines/titanic/support/direct_draw.cpp b/engines/titanic/support/direct_draw.cpp
index faed140..9fbfe0c 100644
--- a/engines/titanic/support/direct_draw.cpp
+++ b/engines/titanic/support/direct_draw.cpp
@@ -33,7 +33,7 @@ DirectDraw::DirectDraw() : _windowed(false), _width(0), _height(0),
 }
 
 void DirectDraw::setDisplayMode(int width, int height, int bpp, int refreshRate) {
-	debugC(ERROR_BASIC, kDebugGraphics, "DirectDraw::SetDisplayMode (%d x %d), %d bpp",
+	debugC(DEBUG_BASIC, kDebugGraphics, "DirectDraw::SetDisplayMode (%d x %d), %d bpp",
 		width, height, bpp);
 	assert(bpp == 16);
 
@@ -42,7 +42,7 @@ void DirectDraw::setDisplayMode(int width, int height, int bpp, int refreshRate)
 }
 
 void DirectDraw::diagnostics() {
-	debugC(ERROR_BASIC, kDebugGraphics, "Running DirectDraw Diagnostic...");
+	debugC(DEBUG_BASIC, kDebugGraphics, "Running DirectDraw Diagnostic...");
 }
 
 DirectDrawSurface *DirectDraw::createSurfaceFromDesc(const DDSurfaceDesc &desc) {
@@ -61,7 +61,7 @@ DirectDrawManager::DirectDrawManager(TitanicEngine *vm, bool windowed) {
 }
 
 void DirectDrawManager::initVideo(int width, int height, int bpp, int numBackSurfaces) {
-	debugC(ERROR_BASIC, kDebugGraphics, "Initialising video surfaces");
+	debugC(DEBUG_BASIC, kDebugGraphics, "Initialising video surfaces");
 	_directDraw._width = width;
 	_directDraw._numBackSurfaces = numBackSurfaces;
 	_directDraw._height = height;
@@ -75,7 +75,7 @@ void DirectDrawManager::initVideo(int width, int height, int bpp, int numBackSur
 }
 
 void DirectDrawManager::initFullScreen() {
-	debugC(ERROR_BASIC, kDebugGraphics, "Creating surfaces");
+	debugC(DEBUG_BASIC, kDebugGraphics, "Creating surfaces");
 	_directDraw.setDisplayMode(_directDraw._width, _directDraw._height,
 		_directDraw._bpp, 0);
 
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index 6bc999c..90537e7 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -63,9 +63,9 @@ enum TitanicDebugChannels {
 #define SCREEN_WIDTH 640
 #define SCREEN_HEIGHT 480
 
-#define ERROR_BASIC 1
-#define ERROR_INTERMEDIATE 2
-#define ERROR_DETAILED 3
+#define DEBUG_BASIC 1
+#define DEBUG_INTERMEDIATE 2
+#define DEBUG_DETAILED 3
 
 #define TOTAL_ITEMS 46
 #define TOTAL_ROOMS 34





More information about the Scummvm-git-logs mailing list