From: Ricardo Cruz Date: Tue, 18 May 2004 14:03:53 +0000 (+0000) Subject: I think this fixes image background scrolling. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=adbf9b4d91357c535d193b70b715834cf2438f35;p=supertux.git I think this fixes image background scrolling. Still needs testing. SVN-Revision: 1248 --- diff --git a/src/level.cpp b/src/level.cpp index f42dd9af8..ff38e8df1 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -768,7 +768,7 @@ void Level::draw_bg() for (int x = 0; (x-1)*img_bkgd->w <= screen->w; x++) for (int y = 0; (y-1)*img_bkgd->h <= screen->h; y++) img_bkgd->draw_part(x == 0 ? sx : 0, y == 0 ? sy : 0, - x == 0 ? 0 : (img_bkgd->w * x) - sx, y == 0 ? 0 : (img_bkgd->h * y) - sy + (height*32 - screen->h), + x == 0 ? 0 : (img_bkgd->w * x) - sx, y == 0 ? 0 : (img_bkgd->h * y) - sy, x == 0 ? img_bkgd->w - sx : img_bkgd->w, y == 0 ? img_bkgd->h - sy : img_bkgd->h); }