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

sev- sev at scummvm.org
Wed Sep 21 21:22:32 CEST 2016


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

Summary:
1810aaf313 FULLPIPE: Added more debug to scene09
726b54d15c FULLPIPE: Added more debug output to scene09. Clarified pixel data type.
6286306ace FULLPIPE: Fix scene09 difficulty. Now cords collision gets properly ignored
d373ddfd3f FULLPIPE: Fix crash on scene09 reentry


Commit: 1810aaf3137c0da45fe515211583031e7c2e9b76
    https://github.com/scummvm/scummvm/commit/1810aaf3137c0da45fe515211583031e7c2e9b76
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-21T21:22:22+02:00

Commit Message:
FULLPIPE: Added more debug to scene09

Changed paths:
    engines/fullpipe/scenes/scene09.cpp



diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index 209cf18..cb90061 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -379,6 +379,11 @@ void sceneHandler09_checkHangerCollide() {
 				hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y);
 
 				if (hit) {
+					for (int k = 0; k < 20; k++) {
+						debugCN(2, kDebugSceneLogic, "%c", k == g_vars->scene09_hangerOffsets[j].x ? '@' : g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + k, ball->_oy + -15) ? '-' : ' ');
+					}
+					debugC(2, kDebugSceneLogic, "");
+
 					sceneHandler09_ballExplode(b);
 					break;
 				}


Commit: 726b54d15c91c53193064117a82df33e7c32e78d
    https://github.com/scummvm/scummvm/commit/726b54d15c91c53193064117a82df33e7c32e78d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-21T21:22:22+02:00

Commit Message:
FULLPIPE: Added more debug output to scene09. Clarified pixel data type.

Changed paths:
    engines/fullpipe/scenes/scene06.cpp
    engines/fullpipe/scenes/scene09.cpp
    engines/fullpipe/scenes/scene14.cpp
    engines/fullpipe/statics.cpp
    engines/fullpipe/statics.h



diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 4d1b263..cfdc23c 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -475,7 +475,7 @@ void sceneHandler06_catchBall() {
 }
 
 void sceneHandler06_checkBallTarget(int par) {
-	int pixel;
+	uint32 pixel;
 
 	if (g_vars->scene06_ballY <= 475) {
 		if (g_vars->scene06_mumsy->getPixelAtPos(g_vars->scene06_ballX, g_vars->scene06_ballY, &pixel)) {
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index cb90061..a50cd3a 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -379,6 +379,9 @@ void sceneHandler09_checkHangerCollide() {
 				hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y);
 
 				if (hit) {
+					uint32 pixel;
+					g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y, &pixel);
+					debugC(2, kDebugSceneLogic, "%x", pixel);
 					for (int k = 0; k < 20; k++) {
 						debugCN(2, kDebugSceneLogic, "%c", k == g_vars->scene09_hangerOffsets[j].x ? '@' : g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + k, ball->_oy + -15) ? '-' : ' ');
 					}
diff --git a/engines/fullpipe/scenes/scene14.cpp b/engines/fullpipe/scenes/scene14.cpp
index 0e07209..f6841a8 100644
--- a/engines/fullpipe/scenes/scene14.cpp
+++ b/engines/fullpipe/scenes/scene14.cpp
@@ -810,7 +810,7 @@ int sceneHandler14(ExCommand *cmd) {
 
 	case 29:
 		if (g_vars->scene14_arcadeIsOn) {
-			int pixel;
+			uint32 pixel;
 
 			if (g_vars->scene14_dudeCanKick && g_fp->_aniMan->getPixelAtPos(cmd->_sceneClickX, cmd->_sceneClickY, &pixel) && !g_fp->_aniMan->_movement) {
 				sceneHandler14_dudeDecline();
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index d976e2f..79432d4 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -462,7 +462,7 @@ bool StaticANIObject::isPixelHitAtPos(int x, int y) {
 	return getPixelAtPos(x, y, 0, true);
 }
 
-bool StaticANIObject::getPixelAtPos(int x, int y, int *pixel, bool hitOnly) {
+bool StaticANIObject::getPixelAtPos(int x, int y, uint32 *pixel, bool hitOnly) {
 	bool res = false;
 	Picture *pic;
 
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index 6206fef..9c7cab5 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -257,7 +257,7 @@ public:
 	MessageQueue *changeStatics1(int msgNum);
 	void changeStatics2(int objId);
 
-	bool getPixelAtPos(int x, int y, int *pixel, bool hitOnly = false);
+	bool getPixelAtPos(int x, int y, uint32 *pixel, bool hitOnly = false);
 	bool isPixelHitAtPos(int x, int y);
 };
 


Commit: 6286306ace41122a7907f7342e1e413c40947c5d
    https://github.com/scummvm/scummvm/commit/6286306ace41122a7907f7342e1e413c40947c5d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-21T21:22:22+02:00

Commit Message:
FULLPIPE: Fix scene09 difficulty. Now cords collision gets properly ignored

Changed paths:
    engines/fullpipe/scenes/scene09.cpp



diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index a50cd3a..e265e70 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -376,17 +376,14 @@ void sceneHandler09_checkHangerCollide() {
 
 		for (int i = 0; i < g_vars->scene09_numMovingHangers; i++) {
 			for (int j = 0; j < 4; j++) {
-				hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y);
+				int x1 = newx + g_vars->scene09_hangerOffsets[j].x;
+				int y1 = ball->_oy + g_vars->scene09_hangerOffsets[j].y;
 
-				if (hit) {
-					uint32 pixel;
-					g_vars->scene09_hangers[i]->ani->getPixelAtPos(newx + g_vars->scene09_hangerOffsets[j].x, ball->_oy + g_vars->scene09_hangerOffsets[j].y, &pixel);
-					debugC(2, kDebugSceneLogic, "%x", pixel);
-					for (int k = 0; k < 20; k++) {
-						debugCN(2, kDebugSceneLogic, "%c", k == g_vars->scene09_hangerOffsets[j].x ? '@' : g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(newx + k, ball->_oy + -15) ? '-' : ' ');
-					}
-					debugC(2, kDebugSceneLogic, "");
+				// Check 2 pixels to compensate cord width
+				hit = g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(x1, y1)
+							&& g_vars->scene09_hangers[i]->ani->isPixelHitAtPos(x1 + 10, y1);
 
+				if (hit) {
 					sceneHandler09_ballExplode(b);
 					break;
 				}


Commit: d373ddfd3fbc9342361bc1ace76e2dcd1fa3fc98
    https://github.com/scummvm/scummvm/commit/d373ddfd3fbc9342361bc1ace76e2dcd1fa3fc98
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-21T21:22:22+02:00

Commit Message:
FULLPIPE: Fix crash on scene09 reentry

Changed paths:
    engines/fullpipe/scenes/scene09.cpp



diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index e265e70..f556785 100644
--- a/engines/fullpipe/scenes/scene09.cpp
+++ b/engines/fullpipe/scenes/scene09.cpp
@@ -106,9 +106,6 @@ void scene09_initScene(Scene *sc) {
 		g_vars->scene09_hangers.push_back(hng);
 	}
 
-	for (uint i = 0; i < g_vars->scene09_sceneBalls.size(); i++)
-		delete g_vars->scene09_sceneBalls[i];
-
 	g_vars->scene09_sceneBalls.clear();
 
 	StaticANIObject *newball = new StaticANIObject(sc->getStaticANIObject1ById(ANI_BALL9, -1));





More information about the Scummvm-git-logs mailing list