From 2f32cc864236e9378f2a3aca30944a6f860d8413 Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Fri, 21 Nov 2008 16:04:44 +0000 Subject: [PATCH] J : * Make scrolling depend on dt --- projects/mtg/include/GameStateDeckViewer.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/mtg/include/GameStateDeckViewer.h b/projects/mtg/include/GameStateDeckViewer.h index 2923c5682..1d593194a 100644 --- a/projects/mtg/include/GameStateDeckViewer.h +++ b/projects/mtg/include/GameStateDeckViewer.h @@ -265,7 +265,6 @@ class GameStateDeckViewer: public GameState, public JGuiListener virtual void Update(float dt) { - hudAlpha = 255-(last_user_activity * 500); if (hudAlpha < 0) hudAlpha = 0; if (sellMenu){ @@ -356,11 +355,11 @@ class GameStateDeckViewer: public GameState, public JGuiListener }else if (mStage == STAGE_TRANSITION_RIGHT || mStage == STAGE_TRANSITION_LEFT) { //mAlpha = 128; if (mStage == STAGE_TRANSITION_RIGHT){ - mRotation -= 0.05f; + mRotation -= dt * 10; }else if(mStage == STAGE_TRANSITION_LEFT){ - mRotation += 0.05f; + mRotation += dt * 10; } - if (fabs(mRotation) > 1.0f){ + while (fabs(mRotation) > 1.0f){ rotateCards(mStage); mRotation = 0; mStage = STAGE_WAITING;