[Scummvm-cvs-logs] scummvm master -> 89bbc9c292ea3dd91ed1660cd8f775c4b4fad0f0

bluegr bluegr at gmail.com
Sun Jan 6 20:55:48 CET 2013


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:
05bf234b26 MT-32: Only show MUNT debug messages for debug level 4 and above (bug #3599702)
89bbc9c292 DRASCULA: Fix shadowing warnings (thanks LordHoto), and rename some variables


Commit: 05bf234b2691ea7cbf2ad9ae841d26d91f415f7d
    https://github.com/scummvm/scummvm/commit/05bf234b2691ea7cbf2ad9ae841d26d91f415f7d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-06T11:54:40-08:00

Commit Message:
MT-32: Only show MUNT debug messages for debug level 4 and above (bug #3599702)

This avoids showing warnings in the intro of FOTAQ when using the MT-32 emulator

Changed paths:
    audio/softsynth/mt32.cpp



diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index e2f1f36..38cdaf1 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -64,6 +64,10 @@ protected:
 
 	// Callback for debug messages, in vprintf() format
 	void printDebug(const char *fmt, va_list list) {
+		// Only show MUNT debug messages for debug level 4 and above
+		if (gDebugLevel < 4)
+			return;
+
 		char buf[512];
 
 		vsnprintf(buf, 512, fmt, list);


Commit: 89bbc9c292ea3dd91ed1660cd8f775c4b4fad0f0
    https://github.com/scummvm/scummvm/commit/89bbc9c292ea3dd91ed1660cd8f775c4b4fad0f0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-01-06T11:54:40-08:00

Commit Message:
DRASCULA: Fix shadowing warnings (thanks LordHoto), and rename some variables

Changed paths:
    engines/drascula/animation.cpp
    engines/drascula/drascula.cpp
    engines/drascula/drascula.h
    engines/drascula/interface.cpp
    engines/drascula/objects.cpp
    engines/drascula/rooms.cpp



diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp
index 53cba9a..7009752 100644
--- a/engines/drascula/animation.cpp
+++ b/engines/drascula/animation.cpp
@@ -862,14 +862,14 @@ void DrasculaEngine::animation_23_2() {
 	int animX, animY;
 
 	// Animation offsets - without earplugs
-	int x1[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260,
-				1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223};
-	int y1[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76,
-				76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1};
+	int johnFrameX[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260,
+						1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223};
+	int johnFrameY[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76,
+						76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1};
 
 	// Animation offsets - with earplugs
-	int x2[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137};
-	int y2[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73};
+	int john2FrameX[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137};
+	int john2FrameY[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73};
 
 	loadPic("an24.alg", frontSurface);
 
@@ -922,9 +922,9 @@ void DrasculaEngine::animation_23_2() {
 	for (int n = 0; n < maxN; n++) {
 		copyRect(p_x, p_y, p_x, p_y, animX, animY, bgSurface, screenSurface);
 		if (flags[29] == 0)
-			copyRect(x1[n], y1[n], p_x, p_y, animX, animY, backSurface, screenSurface);
+			copyRect(johnFrameX[n], johnFrameY[n], p_x, p_y, animX, animY, backSurface, screenSurface);
 		else
-			copyRect(x2[n], y2[n], p_x, p_y, animX, animY, backSurface, screenSurface);
+			copyRect(john2FrameX[n], john2FrameY[n], p_x, p_y, animX, animY, backSurface, screenSurface);
 		updateRefresh();
 		updateScreen(p_x, p_y, p_x, p_y, animX, animY, screenSurface);
 		updateEvents();
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 7733a0f..804881c 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -670,8 +670,8 @@ bool DrasculaEngine::verify1() {
 		removeObject();
 	else {
 		for (l = 0; l < numRoomObjs; l++) {
-			if (mouseX >= x1[l] && mouseY >= y1[l]
-					&& mouseX <= x2[l] && mouseY <= y2[l] && doBreak == 0) {
+			if (mouseX >= _objectX1[l] && mouseY >= _objectY1[l]
+					&& mouseX <= _objectX2[l] && mouseY <= _objectY2[l] && doBreak == 0) {
 				if (exitRoom(l))
 					return true;
 				if (doBreak == 1)
@@ -684,8 +684,8 @@ bool DrasculaEngine::verify1() {
 			doBreak = 1;
 
 		for (l = 0; l < numRoomObjs; l++) {
-			if (mouseX > x1[l] && mouseY > y1[l]
-					&& mouseX < x2[l] && mouseY < y2[l] && doBreak == 0) {
+			if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+					&& mouseX < _objectX2[l] && mouseY < _objectY2[l] && doBreak == 0) {
 				roomX = roomObjX[l];
 				roomY = roomObjY[l];
 				trackFinal = trackObj[l];
@@ -718,8 +718,8 @@ bool DrasculaEngine::verify2() {
 				return true;
 		} else {
 			for (l = 0; l < numRoomObjs; l++) {
-				if (mouseX > x1[l] && mouseY > y1[l]
-						&& mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) {
+				if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+						&& mouseX < _objectX2[l] && mouseY < _objectY2[l] && visible[l] == 1) {
 					trackFinal = trackObj[l];
 					walkToObject = 1;
 					gotoObject(roomObjX[l], roomObjY[l]);
diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h
index 3259fa6..e547503 100644
--- a/engines/drascula/drascula.h
+++ b/engines/drascula/drascula.h
@@ -417,7 +417,7 @@ public:
 	int inventoryObjects[43];
 	char _targetSurface[40][20];
 	int _destX[40], _destY[40], trackCharacter_alkeva[40], roomExits[40];
-	int x1[40], y1[40], x2[40], y2[40];
+	int _objectX1[40], _objectY1[40], _objectX2[40], _objectY2[40];
 	int takeObject, pickedObject;
 	bool _subtitlesDisabled;
 	bool _menuBar, _menuScreen, _hasName;
diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp
index b116562..70212db 100644
--- a/engines/drascula/interface.cpp
+++ b/engines/drascula/interface.cpp
@@ -167,8 +167,8 @@ void DrasculaEngine::showMap() {
 	_hasName = false;
 
 	for (int l = 0; l < numRoomObjs; l++) {
-		if (mouseX > x1[l] && mouseY > y1[l]
-				&& mouseX < x2[l] && mouseY < y2[l]
+		if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+				&& mouseX < _objectX2[l] && mouseY < _objectY2[l]
 				&& visible[l] == 1) {
 			strcpy(textName, objName[l]);
 			_hasName = true;
diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp
index 07b8464..f9f68c3 100644
--- a/engines/drascula/objects.cpp
+++ b/engines/drascula/objects.cpp
@@ -100,8 +100,8 @@ void DrasculaEngine::checkObjects() {
 	int l, veo = 0;
 
 	for (l = 0; l < numRoomObjs; l++) {
-		if (mouseX > x1[l] && mouseY > y1[l]
-				&& mouseX < x2[l] && mouseY < y2[l]
+		if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
+				&& mouseX < _objectX2[l] && mouseY < _objectY2[l]
 				&& visible[l] == 1 && isDoor[l] == 0) {
 			strcpy(textName, objName[l]);
 			_hasName = true;
diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp
index ffac20a..9f707ea 100644
--- a/engines/drascula/rooms.cpp
+++ b/engines/drascula/rooms.cpp
@@ -1712,10 +1712,10 @@ void DrasculaEngine::enterRoom(int roomIndex) {
 	for (l = 0; l < numRoomObjs; l++) {
 		p.parseInt(objectNum[l]);
 		p.parseString(objName[l]);
-		p.parseInt(x1[l]);
-		p.parseInt(y1[l]);
-		p.parseInt(x2[l]);
-		p.parseInt(y2[l]);
+		p.parseInt(_objectX1[l]);
+		p.parseInt(_objectY1[l]);
+		p.parseInt(_objectX2[l]);
+		p.parseInt(_objectY2[l]);
 		p.parseInt(roomObjX[l]);
 		p.parseInt(roomObjY[l]);
 		p.parseInt(trackObj[l]);






More information about the Scummvm-git-logs mailing list