[Super-tux-commit] supertux/src camera.cpp,1.3,1.4
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-05-24 21:52:25
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30109/src Modified Files: camera.cpp Log Message: Small fix. Don't do back scrolling, in case it is unabled. And don't do vertical scrolling when there are 19 height tiles. It is necessary to explecity say so cause in this case, the actual height of the level is 608, higher than the screen (600). Index: camera.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/camera.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- camera.cpp 24 May 2004 21:28:44 -0000 1.3 +++ camera.cpp 24 May 2004 21:52:14 -0000 1.4 @@ -82,7 +82,7 @@ bool do_y_scrolling = true; - if(player->dying) + if(player->dying || level->height == 19) do_y_scrolling = false; if(do_y_scrolling) { @@ -115,7 +115,7 @@ if((player->dir == ::LEFT && scrollchange == RIGHT) || (player->dir == ::RIGHT && scrollchange == LEFT)) scrollchange = NONE; - if(player->base.x < translation.x + screen->w/3) + if(player->base.x < translation.x + screen->w/3 && level->back_scrolling) scrollchange = LEFT; else if(player->base.x > translation.x + screen->w/3*2) scrollchange = RIGHT; |