From cd0d8af8570d281bd8843561aa631f7fe03ee359 Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Tue, 4 May 2004 14:41:14 +0000 Subject: [PATCH] Added a test for a end of level scrolling test... There seems to be an end sequence issue regarding this, doesn't it make use of the scrolling()? SVN-Revision: 971 --- src/world.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/world.cpp b/src/world.cpp index 972f292e4..28c6a1b6d 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -347,8 +347,11 @@ void World::scrolling() scroll_x = tux_pos_x - X_SPACE; } + // this code prevent the screen to scroll before the start or after the level's end if(scroll_x < 0) scroll_x = 0; + if(scroll_x > (level->width-1) * 32) + scroll_x = (level->width-1) * 32; } void -- 2.11.0