From 472f3f0aa7a07124522fa7636ac09134a1250eee Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Fri, 4 May 2012 03:27:14 +0200 Subject: [PATCH] another attempt to fix animation in intro --- src/intro.c | 3 ++- src/main.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intro.c b/src/intro.c index 4b1c744..b8dc6ea 100644 --- a/src/intro.c +++ b/src/intro.c @@ -144,7 +144,8 @@ void Intro_Draw(struct Game *game) { if (game->intro.in_animation) { /*PrintConsole(game, "animating");*/ 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));*/ if (game->intro.position%al_get_display_width(game->display)>old) { /*DrawConsole(game); diff --git a/src/main.h b/src/main.h index d6784ea..eea142b 100644 --- a/src/main.h +++ b/src/main.h @@ -184,7 +184,7 @@ struct Map { /*! \brief Resources used by Intro state. */ struct Intro { - float position; + int position; int page; bool in_animation; /*!< Animation as in page transition animation. */ float anim;