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).
SVN-Revision: 1314
bool do_y_scrolling = true;
- if(player->dying)
+ if(player->dying || level->height == 19)
do_y_scrolling = false;
if(do_y_scrolling) {
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;