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
+8 -28
View File
@@ -13,19 +13,13 @@
#include "RageUtil.h"
#include "TransitionFade.h"
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define RECTANGLE_WIDTH 20
#define NUM_RECTANGLES (SCREEN_WIDTH/RECTANGLE_WIDTH)
#define FADE_RECTS_WIDE (NUM_RECTANGLES/3) // number of rects from fade start to fade end
#include "ScreenDimensions.h"
TransitionFade::TransitionFade()
{
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
}
TransitionFade::~TransitionFade()
@@ -33,29 +27,15 @@ TransitionFade::~TransitionFade()
}
void TransitionFade::Draw()
void TransitionFade::RenderPrimitives()
{
float fPercentageOpaque;
switch( m_TransitionState )
{
case opened:
fPercentageOpaque = 0.0;
break;
case closed:
fPercentageOpaque = 1.0;
break;
case opening_right:
case opening_left:
fPercentageOpaque = 1.0f - m_fPercentThroughTransition;
break;
case closing_right:
case closing_left:
fPercentageOpaque = m_fPercentThroughTransition;
break;
}
float fPercentageOpaque = GetPercentageOpen();
if( fPercentageOpaque == 0 )
return; // draw nothing
D3DXCOLOR colorTemp = m_Color * fPercentageOpaque;
SCREEN->DrawRect( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT), colorTemp );
m_rect.SetDiffuseColor( colorTemp );
m_rect.Draw();
}