From 6286306ace41122a7907f7342e1e413c40947c5d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Sep 2016 20:52:25 +0200 Subject: FULLPIPE: Fix scene09 difficulty. Now cords collision gets properly ignored --- engines/fullpipe/scenes/scene09.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'engines') 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; } -- cgit v1.2.3