checkin of v1.50

This commit is contained in:
Chris Danford
2002-01-16 10:01:32 +00:00
parent 7f3a131195
commit 0add9e0bb3
66 changed files with 3425 additions and 1313 deletions
+10 -49
View File
@@ -12,31 +12,25 @@
#include "RageUtil.h"
#include "Transition.h"
#define SOUND_BACK "Sounds\\back.mp3"
#define SOUND_NEXT "Sounds\\next.mp3"
#include "ThemeManager.h"
Transition::Transition() :
m_TransitionState( closed ),
m_fTransitionTime( DEFAULT_TRANSITION_TIME ),
m_fPercentThroughTransition( 0.0f ),
m_Color(0,0,0,1)
Transition::Transition()
{
m_bPlayCloseWipingRightSound = TRUE;
m_bPlayCloseWipingLeftSound = TRUE;
m_hCloseWipingRightSound = SOUND->LoadSample( SOUND_NEXT );
m_hCloseWipingLeftSound = SOUND->LoadSample( SOUND_BACK );
m_TransitionState = closed,
m_fTransitionTime = DEFAULT_TRANSITION_TIME;
m_fPercentThroughTransition = 0.0f;
m_Color = D3DXCOLOR(0,0,0,1);
}
Transition::~Transition()
{
SOUND->UnloadSample( m_hCloseWipingRightSound );
SOUND->UnloadSample( m_hCloseWipingLeftSound );
}
void Transition::Update( float fDeltaTime )
{
Actor::Update( fDeltaTime );
switch( m_TransitionState )
{
case opening_right:
@@ -44,7 +38,6 @@ void Transition::Update( float fDeltaTime )
case closing_right:
case closing_left:
m_fPercentThroughTransition += fDeltaTime/m_fTransitionTime;
if( m_fPercentThroughTransition > 1.0f ) // the wipe is over
{
m_fPercentThroughTransition = 0.0;
@@ -59,9 +52,11 @@ void Transition::Update( float fDeltaTime )
m_TransitionState = closed;
break;
}
WM->SendMessageToTopWindow( m_MessageToSendWhenDone, 0 );
}
m_fPercentThroughTransition += fDeltaTime/m_fTransitionTime;
break;
}
}
@@ -95,8 +90,6 @@ void Transition::CloseWipingRight( WindowMessage send_when_done )
m_MessageToSendWhenDone = send_when_done;
m_TransitionState = closing_right;
m_fPercentThroughTransition = 0.0;
if( m_bPlayCloseWipingRightSound )
SOUND->PlaySample( m_hCloseWipingRightSound );
}
void Transition::CloseWipingLeft( WindowMessage send_when_done )
@@ -104,37 +97,5 @@ void Transition::CloseWipingLeft( WindowMessage send_when_done )
m_MessageToSendWhenDone = send_when_done;
m_TransitionState = closing_left;
m_fPercentThroughTransition = 0.0;
if( m_bPlayCloseWipingLeftSound )
SOUND->PlaySample( m_hCloseWipingLeftSound );
}
void Transition::SetCloseWipingRightSound( CString sSoundPath )
{
if( sSoundPath == "" )
{
SOUND->UnloadSample( m_hCloseWipingRightSound );
m_bPlayCloseWipingRightSound = FALSE;
}
else
{
SOUND->UnloadSample( m_hCloseWipingRightSound );
m_hCloseWipingRightSound = SOUND->LoadSample( SOUND_NEXT );
m_bPlayCloseWipingRightSound = TRUE;
}
}
void Transition::SetCloseWipingLeftSound( CString sSoundPath )
{
if( sSoundPath == "" )
{
SOUND->UnloadSample( m_hCloseWipingRightSound );
m_bPlayCloseWipingLeftSound = FALSE;
}
else
{
SOUND->UnloadSample( m_hCloseWipingLeftSound );
m_hCloseWipingLeftSound = SOUND->LoadSample( SOUND_NEXT );
m_bPlayCloseWipingLeftSound = TRUE;
}
};