Files
itgmania212121/stepmania/src/TransitionFade.cpp
T

42 lines
772 B
C++
Raw Normal View History

2001-11-03 10:52:42 +00:00
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
File: TransitionFade.cpp
Desc: Fades out or in.
Copyright (c) 2001 Chris Danford. All rights reserved.
-----------------------------------------------------------------------------
*/
2001-11-03 10:52:42 +00:00
#include "RageUtil.h"
#include "TransitionFade.h"
2002-01-16 10:01:32 +00:00
#include "ScreenDimensions.h"
2001-11-03 10:52:42 +00:00
TransitionFade::TransitionFade()
{
2002-01-16 10:01:32 +00:00
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
2001-11-03 10:52:42 +00:00
}
TransitionFade::~TransitionFade()
{
}
2002-01-16 10:01:32 +00:00
void TransitionFade::RenderPrimitives()
2001-11-03 10:52:42 +00:00
{
2002-01-16 10:01:32 +00:00
float fPercentageOpaque = GetPercentageOpen();
if( fPercentageOpaque == 0 )
return; // draw nothing
2001-11-03 10:52:42 +00:00
2001-12-19 01:50:57 +00:00
D3DXCOLOR colorTemp = m_Color * fPercentageOpaque;
2002-01-16 10:01:32 +00:00
m_rect.SetDiffuseColor( colorTemp );
m_rect.Draw();
2001-11-03 10:52:42 +00:00
}