another attempt to fix animation in intro

This commit is contained in:
Sebastian Krzyszkowiak 2012-05-04 03:27:14 +02:00
parent b4b45886be
commit 472f3f0aa7
2 changed files with 3 additions and 2 deletions

View file

@ -144,7 +144,8 @@ void Intro_Draw(struct Game *game) {
if (game->intro.in_animation) { if (game->intro.in_animation) {
/*PrintConsole(game, "animating");*/ /*PrintConsole(game, "animating");*/
int old = game->intro.position%al_get_display_width(game->display); int old = game->intro.position%al_get_display_width(game->display);
game->intro.position -= tps(game, 600); if (tps(game, 600)) game->intro.position -= tps(game, 600);
else game->intro.position -= 1;
/*PrintConsole(game, "%d", game->intro.position%al_get_display_width(game->display));*/ /*PrintConsole(game, "%d", game->intro.position%al_get_display_width(game->display));*/
if (game->intro.position%al_get_display_width(game->display)>old) { if (game->intro.position%al_get_display_width(game->display)>old) {
/*DrawConsole(game); /*DrawConsole(game);

View file

@ -184,7 +184,7 @@ struct Map {
/*! \brief Resources used by Intro state. */ /*! \brief Resources used by Intro state. */
struct Intro { struct Intro {
float position; int position;
int page; int page;
bool in_animation; /*!< Animation as in page transition animation. */ bool in_animation; /*!< Animation as in page transition animation. */
float anim; float anim;