aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-21 20:52:25 +0200
committerEugene Sandulenko2016-09-21 21:22:22 +0200
commit6286306ace41122a7907f7342e1e413c40947c5d (patch)
tree1828e0b9566912abec761195ba9b8c2822d5a39d
parent726b54d15c91c53193064117a82df33e7c32e78d (diff)
downloadscummvm-rg350-6286306ace41122a7907f7342e1e413c40947c5d.tar.gz
scummvm-rg350-6286306ace41122a7907f7342e1e413c40947c5d.tar.bz2
scummvm-rg350-6286306ace41122a7907f7342e1e413c40947c5d.zip
FULLPIPE: Fix scene09 difficulty. Now cords collision gets properly ignored
-rw-r--r--engines/fullpipe/scenes/scene09.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/fullpipe/scenes/scene09.cpp b/engines/fullpipe/scenes/scene09.cpp
index a50cd3a163..e265e707fd 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;
}