From 7b35eeec84ee77c7461b9c94f7fb729cae2a3731 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 22 Mar 2003 19:55:22 +0000 Subject: [PATCH] TransitionKeepAlive is no longer used; remove it --- stepmania/src/TransitionKeepAlive.cpp | 118 -------------------------- stepmania/src/TransitionKeepAlive.h | 40 --------- 2 files changed, 158 deletions(-) delete mode 100644 stepmania/src/TransitionKeepAlive.cpp delete mode 100644 stepmania/src/TransitionKeepAlive.h diff --git a/stepmania/src/TransitionKeepAlive.cpp b/stepmania/src/TransitionKeepAlive.cpp deleted file mode 100644 index 22880d7074..0000000000 --- a/stepmania/src/TransitionKeepAlive.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include "global.h" -/* ------------------------------------------------------------------------------ - Class: TransitionKeepAlive - - Desc: See header. - - Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. - Chris Danford ------------------------------------------------------------------------------ -*/ - - -#include "TransitionKeepAlive.h" -#include "RageUtil.h" -#include "GameConstantsAndTypes.h" -#include "PrefsManager.h" -#include "RageSoundManager.h" -#include "ThemeManager.h" -#include "RageLog.h" - -#define STOP_MUSIC_ON_NEXT THEME->GetMetricB("TransitionKeepAlive","StopMusicOnNext") -#define KEEP_ALIVE_TYPE THEME->GetMetricI("TransitionKeepAlive","KeepAliveType") -enum KeepAliveType // for use with the metric above -{ - KEEP_ALIVE_TYPE_MAX = 0, - KEEP_ALIVE_TYPE_5TH, -}; - - -KeepAliveType g_KeepAliveType; // hack: This is just a cache so we don't have to read the ThemeMetric on every update - - -const float KEEP_ALIVE_FORWARD_TRANSITION_TIME = 0.8f; -const float KEEP_ALIVE_BACKWARD_TRANSITION_TIME = 0.4f; - - -TransitionKeepAlive::TransitionKeepAlive() -{ - g_KeepAliveType = (KeepAliveType)KEEP_ALIVE_TYPE; - - m_sprLogo.Load( THEME->GetPathTo("Graphics","keep alive") ); - m_sprLogo.SetXY( CENTER_X, CENTER_Y ); -} - -void TransitionKeepAlive::Update( float fDeltaTime ) -{ - // hack: Smooth out the big hickups. - fDeltaTime = min( fDeltaTime, 1/15.0f ); - - Transition::Update( fDeltaTime ); -} - - -void TransitionKeepAlive::DrawPrimitives() -{ - // draw keep alive graphic - switch( g_KeepAliveType ) - { - case KEEP_ALIVE_TYPE_MAX: - { - float fPercentClosed = 1 - this->GetPercentageOpen(); - fPercentClosed = min( 1, fPercentClosed*2 ); - const float fPercentColor = fPercentClosed; - const float fPercentAlpha = min( fPercentClosed * 2, 1 ); - - m_sprLogo.SetDiffuse( RageColor(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) ); - m_sprLogo.SetZoomY( fPercentClosed ); - if( fPercentClosed > 0 ) - m_sprLogo.Draw(); - } - break; - case KEEP_ALIVE_TYPE_5TH: - { - float fPercentClosed = 1 - this->GetPercentageOpen(); - m_sprLogo.SetDiffuse( RageColor(1,1,1,fPercentClosed) ); - m_sprLogo.Draw(); - } - break; - default: - ASSERT(0); - break; - } - -} - - -void TransitionKeepAlive::OpenWipingRight( ScreenMessage send_when_done ) -{ - this->SetTransitionTime( KEEP_ALIVE_FORWARD_TRANSITION_TIME ); - - Transition::OpenWipingRight( send_when_done ); -} - -void TransitionKeepAlive::OpenWipingLeft( ScreenMessage send_when_done ) -{ - if( STOP_MUSIC_ON_NEXT ) - SOUNDMAN->StopMusic(); - - this->SetTransitionTime( KEEP_ALIVE_BACKWARD_TRANSITION_TIME ); - - Transition::OpenWipingLeft( send_when_done ); -} - -void TransitionKeepAlive::CloseWipingRight(ScreenMessage send_when_done ) -{ - this->SetTransitionTime( KEEP_ALIVE_FORWARD_TRANSITION_TIME ); - - Transition::CloseWipingRight( send_when_done ); -} - -void TransitionKeepAlive::CloseWipingLeft( ScreenMessage send_when_done ) -{ - this->SetTransitionTime( KEEP_ALIVE_BACKWARD_TRANSITION_TIME ); - - Transition::CloseWipingLeft( send_when_done ); -} - diff --git a/stepmania/src/TransitionKeepAlive.h b/stepmania/src/TransitionKeepAlive.h deleted file mode 100644 index 8df6d4bb97..0000000000 --- a/stepmania/src/TransitionKeepAlive.h +++ /dev/null @@ -1,40 +0,0 @@ -/* ------------------------------------------------------------------------------ - Class: TransitionKeepAlive - - Desc: The transition between menu screens. "Let's Move On" - - Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. ------------------------------------------------------------------------------ -*/ - -#ifndef _TransitionKeepAlive_H_ -#define _TransitionKeepAlive_H_ - - -#include "Sprite.h" -#include "Transition.h" - - -class TransitionKeepAlive : public Transition -{ -public: - TransitionKeepAlive(); - - virtual void Update( float fDeltaTime ); - virtual void DrawPrimitives(); - - virtual void OpenWipingRight( ScreenMessage send_when_done = SM_None ); - virtual void OpenWipingLeft( ScreenMessage send_when_done = SM_None ); - virtual void CloseWipingRight(ScreenMessage send_when_done = SM_None ); - virtual void CloseWipingLeft( ScreenMessage send_when_done = SM_None ); - -protected: - Sprite m_sprLogo; - Quad m_rect; -}; - - - - -#endif