Changed the way the scrolling was calculated. Instead of calculating it relatively...
authorRicardo Cruz <rick2@aeiou.pt>
Mon, 3 May 2004 23:44:28 +0000 (23:44 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Mon, 3 May 2004 23:44:28 +0000 (23:44 +0000)
commit34145bb580a8cf8756a67e4b4ee34c0db7aee784
treec1a66d900e7f59bf10ab6d169920cce5378d0974
parente79c912c4cc8f6fa7eae67254c5f35adc1357460
Changed the way the scrolling was calculated. Instead of calculating it relatively to the middle of the screen, calculte it relatively to the borders.
This solution is more clear (IMO) and elegant because; there isn't that ugly code anymore:
scroll_x -= screen.w / 2;
(...)
scroll_x += screen.w / 2;

Besides from that, in case we change the resolution, this makes the playbility to be not affected.

Note: if you think the scrolling is made when Tux is too much in the right or in the left, you can easily change this, by changine the SPACE_X value in world.cpp.

SVN-Revision: 962
src/world.cpp