[Scummvm-git-logs] scummvm master -> 83aeb75d5a46d0340c5884001f85a4812cdb7f6a

rvanlaar noreply at scummvm.org
Mon Jul 8 10:44:43 UTC 2024


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:
83aeb75d5a DIRECTOR: Fix argument order for setting debug channels


Commit: 83aeb75d5a46d0340c5884001f85a4812cdb7f6a
    https://github.com/scummvm/scummvm/commit/83aeb75d5a46d0340c5884001f85a4812cdb7f6a
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-07-08T12:44:40+02:00

Commit Message:
DIRECTOR: Fix argument order for setting debug channels

In a few occasions the debug channel and debug level arguments were swapped

Changed paths:
    engines/director/lingo/lingo-code.cpp
    engines/director/sprite.cpp
    engines/director/window.cpp


diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index dc0d7bff3f7..5c955dbe02e 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -1703,7 +1703,7 @@ void LC::call(const Symbol &funcSym, int nargs, bool allowRetVal) {
 			// Lingo supports providing a different number of arguments than expected,
 			// and several games rely on this behaviour.
 			if (funcSym.nargs > nargs) {
-				debugC(kDebugLingoExec, 1, "Incorrect number of arguments for handler '%s' (%d, expected %d to %d). Adding extra %d voids",
+				debugC(1, kDebugLingoExec, "Incorrect number of arguments for handler '%s' (%d, expected %d to %d). Adding extra %d voids",
 							funcSym.name->c_str(), nargs, funcSym.nargs, funcSym.maxArgs, funcSym.nargs - nargs);
 				while (nargs < funcSym.nargs) {
 					Datum d;
diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp
index 1a10df5d676..793ea05cbe3 100644
--- a/engines/director/sprite.cpp
+++ b/engines/director/sprite.cpp
@@ -536,7 +536,7 @@ void Sprite::setCast(CastMemberID memberID, bool replaceDims) {
 		}
 
 	} else {
-		if (_castId.member != 0 && debugChannelSet(kDebugImages, 4))
+		if (_castId.member != 0 && debugChannelSet(4, kDebugImages))
 			warning("Sprite::setCast(): %s is null", memberID.asString().c_str());
 	}
 }
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 43f7501906c..6ec6194ab32 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -316,7 +316,7 @@ void Window::inkBlitFrom(Channel *channel, Common::Rect destRect, Graphics::Mana
 	} else if (pd.srf) {
 		pd.inkBlitSurface(srcRect, channel->getMask());
 	} else {
-		if (debugChannelSet(kDebugImages, 4)) {
+		if (debugChannelSet(4, kDebugImages)) {
 			CastType castType = channel->_sprite->_cast ? channel->_sprite->_cast->_type : kCastTypeNull;
 			warning("Window::inkBlitFrom(): No source surface: spriteType: %d (%s), castType: %d (%s), castId: %s",
 				channel->_sprite->_spriteType, spriteType2str(channel->_sprite->_spriteType), castType, castType2str(castType),
@@ -621,7 +621,7 @@ Common::Path Window::getSharedCastPath() {
 void Window::freezeLingoState() {
 	_frozenLingoStates.push_back(_lingoState);
 	_lingoState = new LingoState;
-	debugC(kDebugLingoExec, 3, "Freezing Lingo state, depth %d", _frozenLingoStates.size());
+	debugC(3, kDebugLingoExec, "Freezing Lingo state, depth %d", _frozenLingoStates.size());
 }
 
 void Window::thawLingoState() {
@@ -634,7 +634,7 @@ void Window::thawLingoState() {
 		return;
 	}
 	delete _lingoState;
-	debugC(kDebugLingoExec, 3, "Thawing Lingo state, depth %d", _frozenLingoStates.size());
+	debugC(3, kDebugLingoExec, "Thawing Lingo state, depth %d", _frozenLingoStates.size());
 	_lingoState = _frozenLingoStates.back();
 	_frozenLingoStates.pop_back();
 }
@@ -646,7 +646,7 @@ void Window::freezeLingoPlayState() {
 	}
 	_lingoPlayState = _lingoState;
 	_lingoState = new LingoState;
-	debugC(kDebugLingoExec, 3, "Freezing Lingo play state");
+	debugC(3, kDebugLingoExec, "Freezing Lingo play state");
 }
 
 bool Window::thawLingoPlayState() {
@@ -659,7 +659,7 @@ bool Window::thawLingoPlayState() {
 		return false;
 	}
 	delete _lingoState;
-	debugC(kDebugLingoExec, 3, "Thawing Lingo play state");
+	debugC(3, kDebugLingoExec, "Thawing Lingo play state");
 	_lingoState = _lingoPlayState;
 	_lingoPlayState = nullptr;
 	return true;




More information about the Scummvm-git-logs mailing list