Re: [Super-tux-commit] supertux/src world.cpp,1.51,1.52
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-05-03 23:47:33
|
What changed did you made? I only see that you changed the X_SPACE and made Tux to be even more near the border and changed the formatting... Anyway, I already committed something that makes scrolling better, IMO. Ricardo Cruz Em Segunda, 3 de Maio de 2004 20:46, o Ryan Flegel escreveu: > Update of /cvsroot/super-tux/supertux/src > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14650/src > > Modified Files: > world.cpp > Log Message: > - fixed scrolling bug > > Index: world.cpp > =================================================================== > RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v > retrieving revision 1.51 > retrieving revision 1.52 > diff -u -d -r1.51 -r1.52 > --- world.cpp 3 May 2004 12:34:37 -0000 1.51 > +++ world.cpp 3 May 2004 19:46:23 -0000 1.52 > @@ -306,24 +306,24 @@ > } > > // the space that it takes for the screen to start scrolling > -#define X_SPACE 80 > +#define X_SPACE 40 > > /* This functions takes cares of the scrolling */ > void World::keep_in_bounds() > { > -int tux_pos_x = (int)(tux.base.x - (tux.base.width/2)); > + int tux_pos_x = (int)(tux.base.x + (tux.base.width/2)); > > -scroll_x += screen->w/2; > + scroll_x += screen->w/2; > > -if (scroll_x < tux_pos_x - X_SPACE) > - scroll_x = tux_pos_x - X_SPACE; > -else if (scroll_x > tux_pos_x + X_SPACE && level->back_scrolling) > - scroll_x = tux_pos_x + X_SPACE; > + if (scroll_x < tux_pos_x - X_SPACE) > + scroll_x = tux_pos_x - X_SPACE; > + else if (scroll_x > tux_pos_x + X_SPACE && level->back_scrolling) > + scroll_x = tux_pos_x + X_SPACE; > > -scroll_x -= screen->w/2; > + scroll_x -= screen->w/2; > > -if(scroll_x < 0) > - scroll_x = 0; > + if(scroll_x < 0) > + scroll_x = 0; > } > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Super-tux-commit mailing list > Sup...@li... > https://lists.sourceforge.net/lists/listinfo/super-tux-commit -- You should never wear your best trousers when you go out to fight for freedom and liberty. -- Henrik Ibsen |