Initial checkin

This commit is contained in:
Chris Danford
2001-11-03 10:52:42 +00:00
parent 2f65fb99f0
commit 7caffe0c93
54 changed files with 7057 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
#include "stdafx.h"
//-----------------------------------------------------------------------------
// File: TransitionFade.cpp
//
// Desc: "Window blinds"-type transition.
//
// Copyright (c) 2001 Chris Danford. All rights reserved.
//-----------------------------------------------------------------------------
#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
TransitionFade::TransitionFade()
{
}
TransitionFade::~TransitionFade()
{
}
void TransitionFade::Draw()
{
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;
}
m_Color.a = fPercentageOpaque;
int alpha = (int)( fPercentageOpaque * 255 );
SCREEN->DrawRect( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT), m_Color );
}