big checkin - new noteskin format and XY positioning. I probably broke a lot of things.
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: FadingBanner
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "FadingBanner.h"
|
||||
#include "RageUtil.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "RageLog.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "GameState.h"
|
||||
|
||||
|
||||
FadingBanner::FadingBanner()
|
||||
{
|
||||
// these guys get loaded on the Set* methods
|
||||
this->AddSubActor( &m_Banner[0] );
|
||||
this->AddSubActor( &m_Banner[1] );
|
||||
}
|
||||
|
||||
void FadingBanner::SetCroppedSize( float fWidth, float fHeight )
|
||||
{
|
||||
m_Banner[0].SetCroppedSize( fWidth, fHeight );
|
||||
m_Banner[1].SetCroppedSize( fWidth, fHeight );
|
||||
}
|
||||
|
||||
void FadingBanner::Update( float fDeltaTime )
|
||||
{
|
||||
ActorFrame::Update( fDeltaTime );
|
||||
|
||||
}
|
||||
|
||||
void FadingBanner::BeforeChange()
|
||||
{
|
||||
// move the back banner to the front in preparation for a cross fade
|
||||
if( m_Banner[0].GetTexturePath() != "" )
|
||||
{
|
||||
m_Banner[1].Load( m_Banner[0].GetTexturePath() );
|
||||
m_Banner[1].SetScrolling( m_Banner[0].IsScrolling() );
|
||||
}
|
||||
|
||||
m_Banner[1].SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||
m_Banner[1].BeginTweening( 0.25f ); // fade out
|
||||
m_Banner[1].SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||
|
||||
}
|
||||
|
||||
void FadingBanner::SetFromSong( Song* pSong )
|
||||
{
|
||||
ASSERT( pSong != NULL );
|
||||
BeforeChange();
|
||||
m_Banner[0].LoadFromSong( pSong );
|
||||
}
|
||||
|
||||
void FadingBanner::SetFromGroup( const CString &sGroupName )
|
||||
{
|
||||
BeforeChange();
|
||||
m_Banner[0].LoadFromGroup( sGroupName );
|
||||
}
|
||||
|
||||
void FadingBanner::SetRoulette()
|
||||
{
|
||||
BeforeChange();
|
||||
m_Banner[0].LoadRoulette();
|
||||
}
|
||||
Reference in New Issue
Block a user