Replaced most D3DX dependencies. Added Brendan's not-yet-functional networking code.
This commit is contained in:
@@ -3,10 +3,7 @@ X denotes task complete or no longer required to do.
|
||||
- denotes task to do, but also being worked upon by other dev.
|
||||
H denotes task on hold.
|
||||
|
||||
TODO As of: 12:28:AM 03/10/02
|
||||
|
||||
- Improve Ez2 and Para Graphics.
|
||||
- Clean up any messy code that is found ready for release.
|
||||
|
||||
TODO As of: 07:47:PM 12/09/02
|
||||
|
||||
|
||||
@@ -2,6 +2,20 @@
|
||||
Fix
|
||||
/////////////////////////
|
||||
|
||||
You'll notice that if you add up the Perfects and Greats, they are far less than the max combo. Where did they go? Apparently Jumps count for 2 steps during normal game play, but ONLY for max combo.
|
||||
|
||||
test BGChange grabbing from random movies
|
||||
|
||||
change banner loading on select music to cache banners for active section
|
||||
|
||||
change andy's link on the downloads page to say "para"
|
||||
|
||||
- Load banner/title graphics for songs in the current section.
|
||||
> when you press Esc it validates the choice. For me, Esc would not save.
|
||||
> Same thing for Esc starting the Demonstration mode. Start demo with
|
||||
- credits
|
||||
- add marathon and long ver balloons
|
||||
|
||||
super shuffle doesn't correctly handle holds (Ayla Part 2)
|
||||
|
||||
There's a major Oni course bug (at least in Pump mode):
|
||||
|
||||
+39
-39
@@ -20,7 +20,7 @@ Actor::Actor()
|
||||
{
|
||||
m_iNumTweenStates = 0;
|
||||
|
||||
m_size = D3DXVECTOR2( 1, 1 );
|
||||
m_size = RageVector2( 1, 1 );
|
||||
|
||||
m_start.Init();
|
||||
m_current.Init();
|
||||
@@ -35,7 +35,7 @@ Actor::Actor()
|
||||
m_fWagRadians = 0.2f;
|
||||
m_fWagPeriod = 2.0f;
|
||||
m_fWagTimer = 0.0f;
|
||||
m_vSpinVelocity = D3DXVECTOR3(0,0,0);
|
||||
m_vSpinVelocity = RageVector3(0,0,0);
|
||||
m_fVibrationDistance = 5.0f;
|
||||
m_bVisibleThisFrame = FALSE;
|
||||
|
||||
@@ -81,13 +81,13 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
break;
|
||||
case glowing:
|
||||
float fCurvedPercent;
|
||||
fCurvedPercent = sinf( m_fPercentBetweenColors * D3DX_PI );
|
||||
fCurvedPercent = sinf( m_fPercentBetweenColors * PI );
|
||||
m_temp.glow = m_effect_colorGlow1*fCurvedPercent + m_effect_colorGlow2*(1.0f-fCurvedPercent);
|
||||
break;
|
||||
case wagging:
|
||||
m_temp.rotation.z = m_fWagRadians * sinf(
|
||||
(m_fWagTimer / m_fWagPeriod) // percent through wag
|
||||
* 2.0f * D3DX_PI );
|
||||
* 2.0f * PI );
|
||||
break;
|
||||
case spinning:
|
||||
// nothing needs to be here
|
||||
@@ -100,19 +100,19 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
m_bVisibleThisFrame = !m_bVisibleThisFrame;
|
||||
if( !m_bVisibleThisFrame )
|
||||
for(int i=0; i<4; i++)
|
||||
m_temp.diffuse[i] = D3DXCOLOR(0,0,0,0); // don't draw the frame
|
||||
m_temp.diffuse[i] = RageColor(0,0,0,0); // don't draw the frame
|
||||
break;
|
||||
case bouncing:
|
||||
{
|
||||
float fPercentThroughBounce = m_fTimeIntoBounce / m_fBouncePeriod;
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*D3DX_PI );
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*PI );
|
||||
m_temp.pos += m_vectBounce * fPercentOffset;
|
||||
}
|
||||
break;
|
||||
case bobbing:
|
||||
{
|
||||
float fPercentThroughBounce = m_fTimeIntoBounce / m_fBouncePeriod;
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*D3DX_PI*2 );
|
||||
float fPercentOffset = sinf( fPercentThroughBounce*PI*2 );
|
||||
m_temp.pos += m_vectBounce * fPercentOffset;
|
||||
}
|
||||
break;
|
||||
@@ -127,7 +127,7 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
||||
DISPLAY->Scale( m_temp.scale.x, m_temp.scale.y, 1 );
|
||||
|
||||
// super slow, and most Actors don't have any rotation
|
||||
// D3DXMatrixRotationYawPitchRoll( &matTemp, rotation.y, rotation.x, rotation.z ); // add in the rotation
|
||||
// RageMatrixRotationYawPitchRoll( &matTemp, rotation.y, rotation.x, rotation.z ); // add in the rotation
|
||||
// matNewWorld = matTemp * matNewWorld;
|
||||
|
||||
// replace with...
|
||||
@@ -179,12 +179,12 @@ void Actor::UpdateTweening( float fDeltaTime )
|
||||
float fPercentAlongPath = 0.f;
|
||||
switch( TI.m_TweenType )
|
||||
{
|
||||
case TWEEN_LINEAR: fPercentAlongPath = fPercentThroughTween; break;
|
||||
case TWEEN_BIAS_BEGIN: fPercentAlongPath = 1 - (1-fPercentThroughTween) * (1-fPercentThroughTween); break;
|
||||
case TWEEN_BIAS_END: fPercentAlongPath = fPercentThroughTween * fPercentThroughTween; break;
|
||||
case TWEEN_BOUNCE_BEGIN:fPercentAlongPath = 1 - sinf( 1.1f + fPercentThroughTween*(D3DX_PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_BOUNCE_END: fPercentAlongPath = sinf( 1.1f + (1-fPercentThroughTween)*(D3DX_PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_SPRING: fPercentAlongPath = 1 - cosf( fPercentThroughTween*D3DX_PI*2.5f )/(1+fPercentThroughTween*3); break;
|
||||
case TWEEN_LINEAR: fPercentAlongPath = fPercentThroughTween; break;
|
||||
case TWEEN_BIAS_BEGIN: fPercentAlongPath = 1 - (1-fPercentThroughTween) * (1-fPercentThroughTween); break;
|
||||
case TWEEN_BIAS_END: fPercentAlongPath = fPercentThroughTween * fPercentThroughTween; break;
|
||||
case TWEEN_BOUNCE_BEGIN:fPercentAlongPath = 1 - sinf( 1.1f + fPercentThroughTween*(PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_BOUNCE_END: fPercentAlongPath = sinf( 1.1f + (1-fPercentThroughTween)*(PI-1.1f) ) / 0.89f; break;
|
||||
case TWEEN_SPRING: fPercentAlongPath = 1 - cosf( fPercentThroughTween*PI*2.5f )/(1+fPercentThroughTween*3); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
@@ -233,9 +233,9 @@ void Actor::Update( float fDeltaTime )
|
||||
break;
|
||||
case spinning:
|
||||
m_current.rotation += m_vSpinVelocity;
|
||||
if( m_current.rotation.x > 1000*D3DX_PI*2 ) m_current.rotation.x -= 1000*D3DX_PI*2;
|
||||
if( m_current.rotation.y > 1000*D3DX_PI*2 ) m_current.rotation.y -= 1000*D3DX_PI*2;
|
||||
if( m_current.rotation.z > 1000*D3DX_PI*2 ) m_current.rotation.z -= 1000*D3DX_PI*2;
|
||||
if( m_current.rotation.x > 1000*PI*2 ) m_current.rotation.x -= 1000*PI*2;
|
||||
if( m_current.rotation.y > 1000*PI*2 ) m_current.rotation.y -= 1000*PI*2;
|
||||
if( m_current.rotation.z > 1000*PI*2 ) m_current.rotation.z -= 1000*PI*2;
|
||||
break;
|
||||
case vibrating:
|
||||
break;
|
||||
@@ -296,16 +296,16 @@ void Actor::SetTweenZoomToHeight( float zoom ) { SetTweenZoomX( zoom/GetUnzoomed
|
||||
void Actor::SetTweenRotationX( float r ) { LatestTween().rotation.x = r; }
|
||||
void Actor::SetTweenRotationY( float r ) { LatestTween().rotation.y = r; }
|
||||
void Actor::SetTweenRotationZ( float r ) { LatestTween().rotation.z = r; }
|
||||
void Actor::SetTweenDiffuse( D3DXCOLOR c ) { for(int i=0; i<4; i++) LatestTween().diffuse[i] = c; };
|
||||
void Actor::SetTweenDiffuseUpperLeft( D3DXCOLOR c ) { LatestTween().diffuse[0] = c; };
|
||||
void Actor::SetTweenDiffuseUpperRight( D3DXCOLOR c ) { LatestTween().diffuse[1] = c; };
|
||||
void Actor::SetTweenDiffuseLowerLeft( D3DXCOLOR c ) { LatestTween().diffuse[2] = c; };
|
||||
void Actor::SetTweenDiffuseLowerRight( D3DXCOLOR c ) { LatestTween().diffuse[3] = c; };
|
||||
void Actor::SetTweenDiffuseTopEdge( D3DXCOLOR c ) { LatestTween().diffuse[0] = LatestTween().diffuse[1] = c; };
|
||||
void Actor::SetTweenDiffuseRightEdge( D3DXCOLOR c ) { LatestTween().diffuse[1] = LatestTween().diffuse[3] = c; };
|
||||
void Actor::SetTweenDiffuseBottomEdge( D3DXCOLOR c ) { LatestTween().diffuse[2] = LatestTween().diffuse[3] = c; };
|
||||
void Actor::SetTweenDiffuseLeftEdge( D3DXCOLOR c ) { LatestTween().diffuse[0] = LatestTween().diffuse[2] = c; };
|
||||
void Actor::SetTweenGlow( D3DXCOLOR c ) { LatestTween().glow = c; };
|
||||
void Actor::SetTweenDiffuse( RageColor c ) { for(int i=0; i<4; i++) LatestTween().diffuse[i] = c; };
|
||||
void Actor::SetTweenDiffuseUpperLeft( RageColor c ) { LatestTween().diffuse[0] = c; };
|
||||
void Actor::SetTweenDiffuseUpperRight( RageColor c ) { LatestTween().diffuse[1] = c; };
|
||||
void Actor::SetTweenDiffuseLowerLeft( RageColor c ) { LatestTween().diffuse[2] = c; };
|
||||
void Actor::SetTweenDiffuseLowerRight( RageColor c ) { LatestTween().diffuse[3] = c; };
|
||||
void Actor::SetTweenDiffuseTopEdge( RageColor c ) { LatestTween().diffuse[0] = LatestTween().diffuse[1] = c; };
|
||||
void Actor::SetTweenDiffuseRightEdge( RageColor c ) { LatestTween().diffuse[1] = LatestTween().diffuse[3] = c; };
|
||||
void Actor::SetTweenDiffuseBottomEdge( RageColor c ) { LatestTween().diffuse[2] = LatestTween().diffuse[3] = c; };
|
||||
void Actor::SetTweenDiffuseLeftEdge( RageColor c ) { LatestTween().diffuse[0] = LatestTween().diffuse[2] = c; };
|
||||
void Actor::SetTweenGlow( RageColor c ) { LatestTween().glow = c; };
|
||||
|
||||
|
||||
void Actor::ScaleTo( LPRECT pRect, StretchType st )
|
||||
@@ -314,8 +314,8 @@ void Actor::ScaleTo( LPRECT pRect, StretchType st )
|
||||
float rect_width = (float)RECTWIDTH(*pRect);
|
||||
float rect_height = (float)RECTHEIGHT(*pRect);
|
||||
|
||||
if( rect_width < 0 ) SetRotationY( D3DX_PI );
|
||||
if( rect_height < 0 ) SetRotationX( D3DX_PI );
|
||||
if( rect_width < 0 ) SetRotationY( PI );
|
||||
if( rect_height < 0 ) SetRotationX( PI );
|
||||
|
||||
// center of the rectangle
|
||||
float rect_cx = pRect->left + rect_width/2;
|
||||
@@ -368,10 +368,10 @@ void Actor::StretchTo( LPRECT pRect )
|
||||
void Actor::SetEffectNone()
|
||||
{
|
||||
m_Effect = no_effect;
|
||||
//m_color = D3DXCOLOR( 1.0,1.0,1.0,1.0 );
|
||||
//m_color = RageColor( 1.0,1.0,1.0,1.0 );
|
||||
}
|
||||
|
||||
void Actor::SetEffectBlinking( float fDeltaPercentPerSecond, D3DXCOLOR Color, D3DXCOLOR Color2 )
|
||||
void Actor::SetEffectBlinking( float fDeltaPercentPerSecond, RageColor Color, RageColor Color2 )
|
||||
{
|
||||
m_Effect = blinking;
|
||||
m_effect_colorDiffuse1 = Color;
|
||||
@@ -380,7 +380,7 @@ void Actor::SetEffectBlinking( float fDeltaPercentPerSecond, D3DXCOLOR Color, D3
|
||||
m_fDeltaPercentPerSecond = fDeltaPercentPerSecond;
|
||||
}
|
||||
|
||||
void Actor::SetEffectCamelion( float fDeltaPercentPerSecond, D3DXCOLOR Color, D3DXCOLOR Color2 )
|
||||
void Actor::SetEffectCamelion( float fDeltaPercentPerSecond, RageColor Color, RageColor Color2 )
|
||||
{
|
||||
m_Effect = camelion;
|
||||
m_effect_colorDiffuse1 = Color;
|
||||
@@ -389,7 +389,7 @@ void Actor::SetEffectCamelion( float fDeltaPercentPerSecond, D3DXCOLOR Color, D3
|
||||
m_fDeltaPercentPerSecond = fDeltaPercentPerSecond;
|
||||
}
|
||||
|
||||
void Actor::SetEffectGlowing( float fDeltaPercentPerSecond, D3DXCOLOR Color, D3DXCOLOR Color2 )
|
||||
void Actor::SetEffectGlowing( float fDeltaPercentPerSecond, RageColor Color, RageColor Color2 )
|
||||
{
|
||||
m_Effect = glowing;
|
||||
m_effect_colorGlow1 = Color;
|
||||
@@ -405,7 +405,7 @@ void Actor::SetEffectWagging( float fWagRadians, float fWagPeriod )
|
||||
m_fWagPeriod = fWagPeriod;
|
||||
}
|
||||
|
||||
void Actor::SetEffectSpinning( D3DXVECTOR3 vectRotationVelocity )
|
||||
void Actor::SetEffectSpinning( RageVector3 vectRotationVelocity )
|
||||
{
|
||||
m_Effect = spinning;
|
||||
m_vSpinVelocity = vectRotationVelocity;
|
||||
@@ -422,7 +422,7 @@ void Actor::SetEffectFlickering()
|
||||
m_Effect = flickering;
|
||||
}
|
||||
|
||||
void Actor::SetEffectBouncing( D3DXVECTOR3 vectBounce, float fPeriod )
|
||||
void Actor::SetEffectBouncing( RageVector3 vectBounce, float fPeriod )
|
||||
{
|
||||
m_Effect = bouncing;
|
||||
|
||||
@@ -432,7 +432,7 @@ void Actor::SetEffectBouncing( D3DXVECTOR3 vectBounce, float fPeriod )
|
||||
|
||||
}
|
||||
|
||||
void Actor::SetEffectBobbing( D3DXVECTOR3 vectBob, float fPeriod )
|
||||
void Actor::SetEffectBobbing( RageVector3 vectBob, float fPeriod )
|
||||
{
|
||||
m_Effect = bobbing;
|
||||
|
||||
@@ -489,9 +489,9 @@ void Actor::Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds,
|
||||
mod.pos.x += (CONTAINS("left")?-SCREEN_WIDTH:0) + (CONTAINS("right")?+SCREEN_HEIGHT:0);
|
||||
mod.pos.y += (CONTAINS("top")?-SCREEN_WIDTH:0) + (CONTAINS("bottom")?+SCREEN_HEIGHT:0);
|
||||
mod.pos.z += 0;
|
||||
mod.rotation.x += (CONTAINS("spinx")?-D3DX_PI*2:0);
|
||||
mod.rotation.y += (CONTAINS("spiny")?-D3DX_PI*2:0);
|
||||
mod.rotation.z += (CONTAINS("spinz")?-D3DX_PI*2:0);
|
||||
mod.rotation.x += (CONTAINS("spinx")?-PI*2:0);
|
||||
mod.rotation.y += (CONTAINS("spiny")?-PI*2:0);
|
||||
mod.rotation.z += (CONTAINS("spinz")?-PI*2:0);
|
||||
mod.scale.x *= (CONTAINS("foldx")?0:1) * (CONTAINS("zoomx")?3:1);
|
||||
mod.scale.y *= (CONTAINS("foldy")?0:1) * (CONTAINS("zoomy")?3:1);
|
||||
for( int i=0; i<4; i++ )
|
||||
|
||||
+67
-64
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef ACTOR_H
|
||||
#define ACTOR_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: Actor
|
||||
@@ -10,7 +11,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <d3dx8math.h>
|
||||
#include "RageTypes.h"
|
||||
|
||||
|
||||
const int MAX_TWEEN_STATES = 10;
|
||||
@@ -85,20 +86,20 @@ public:
|
||||
virtual void SetRotationY( float rot ) { m_current.rotation.y = rot; }
|
||||
virtual void SetRotationZ( float rot ) { m_current.rotation.z = rot; }
|
||||
|
||||
virtual void SetDiffuse( D3DXCOLOR c ) { for(int i=0; i<4; i++) m_current.diffuse[i] = c; };
|
||||
virtual void SetDiffuses( int i, D3DXCOLOR c ) { m_current.diffuse[i] = c; };
|
||||
virtual void SetDiffuseUpperLeft( D3DXCOLOR c ) { m_current.diffuse[0] = c; };
|
||||
virtual void SetDiffuseUpperRight( D3DXCOLOR c ) { m_current.diffuse[1] = c; };
|
||||
virtual void SetDiffuseLowerLeft( D3DXCOLOR c ) { m_current.diffuse[2] = c; };
|
||||
virtual void SetDiffuseLowerRight( D3DXCOLOR c ) { m_current.diffuse[3] = c; };
|
||||
virtual void SetDiffuseTopEdge( D3DXCOLOR c ) { m_current.diffuse[0] = m_current.diffuse[1] = c; };
|
||||
virtual void SetDiffuseRightEdge( D3DXCOLOR c ) { m_current.diffuse[1] = m_current.diffuse[3] = c; };
|
||||
virtual void SetDiffuseBottomEdge( D3DXCOLOR c ) { m_current.diffuse[2] = m_current.diffuse[3] = c; };
|
||||
virtual void SetDiffuseLeftEdge( D3DXCOLOR c ) { m_current.diffuse[0] = m_current.diffuse[2] = c; };
|
||||
virtual D3DXCOLOR GetDiffuse() { return m_current.diffuse[0]; };
|
||||
virtual D3DXCOLOR GetDiffuses( int i ) { return m_current.diffuse[i]; };
|
||||
virtual void SetGlow( D3DXCOLOR c ) { m_current.glow = c; };
|
||||
virtual D3DXCOLOR GetGlow() { return m_current.glow; };
|
||||
virtual void SetDiffuse( RageColor c ) { for(int i=0; i<4; i++) m_current.diffuse[i] = c; };
|
||||
virtual void SetDiffuses( int i, RageColor c ) { m_current.diffuse[i] = c; };
|
||||
virtual void SetDiffuseUpperLeft( RageColor c ) { m_current.diffuse[0] = c; };
|
||||
virtual void SetDiffuseUpperRight( RageColor c ) { m_current.diffuse[1] = c; };
|
||||
virtual void SetDiffuseLowerLeft( RageColor c ) { m_current.diffuse[2] = c; };
|
||||
virtual void SetDiffuseLowerRight( RageColor c ) { m_current.diffuse[3] = c; };
|
||||
virtual void SetDiffuseTopEdge( RageColor c ) { m_current.diffuse[0] = m_current.diffuse[1] = c; };
|
||||
virtual void SetDiffuseRightEdge( RageColor c ) { m_current.diffuse[1] = m_current.diffuse[3] = c; };
|
||||
virtual void SetDiffuseBottomEdge( RageColor c ) { m_current.diffuse[2] = m_current.diffuse[3] = c; };
|
||||
virtual void SetDiffuseLeftEdge( RageColor c ) { m_current.diffuse[0] = m_current.diffuse[2] = c; };
|
||||
virtual RageColor GetDiffuse() { return m_current.diffuse[0]; };
|
||||
virtual RageColor GetDiffuses( int i ) { return m_current.diffuse[i]; };
|
||||
virtual void SetGlow( RageColor c ) { m_current.glow = c; };
|
||||
virtual RageColor GetGlow() { return m_current.glow; };
|
||||
|
||||
|
||||
|
||||
@@ -118,16 +119,16 @@ public:
|
||||
virtual void SetTweenRotationX( float r );
|
||||
virtual void SetTweenRotationY( float r );
|
||||
virtual void SetTweenRotationZ( float r );
|
||||
virtual void SetTweenDiffuse( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseUpperLeft( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseUpperRight( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseLowerLeft( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseLowerRight( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseTopEdge( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseRightEdge( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseBottomEdge( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenDiffuseLeftEdge( D3DXCOLOR colorDiffuse );
|
||||
virtual void SetTweenGlow( D3DXCOLOR c );
|
||||
virtual void SetTweenDiffuse( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseUpperLeft( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseUpperRight( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseLowerLeft( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseLowerRight( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseTopEdge( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseRightEdge( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseBottomEdge( RageColor colorDiffuse );
|
||||
virtual void SetTweenDiffuseLeftEdge( RageColor colorDiffuse );
|
||||
virtual void SetTweenGlow( RageColor c );
|
||||
|
||||
|
||||
|
||||
@@ -153,21 +154,21 @@ public:
|
||||
// effects
|
||||
void SetEffectNone();
|
||||
void SetEffectBlinking( float fDeltaPercentPerSecond = 2.5,
|
||||
D3DXCOLOR Color = D3DXCOLOR(0.5f,0.5f,0.5f,1),
|
||||
D3DXCOLOR Color2 = D3DXCOLOR(1,1,1,1) );
|
||||
RageColor Color = RageColor(0.5f,0.5f,0.5f,1),
|
||||
RageColor Color2 = RageColor(1,1,1,1) );
|
||||
void SetEffectCamelion( float fDeltaPercentPerSecond = 2.5,
|
||||
D3DXCOLOR Color = D3DXCOLOR(0,0,0,1),
|
||||
D3DXCOLOR Color2 = D3DXCOLOR(1,1,1,1) );
|
||||
RageColor Color = RageColor(0,0,0,1),
|
||||
RageColor Color2 = RageColor(1,1,1,1) );
|
||||
void SetEffectGlowing( float fDeltaPercentPerSecond = 2.5,
|
||||
D3DXCOLOR Color = D3DXCOLOR(1,1,1,0.2f),
|
||||
D3DXCOLOR Color2 = D3DXCOLOR(1,1,1,0.8f) );
|
||||
RageColor Color = RageColor(1,1,1,0.2f),
|
||||
RageColor Color2 = RageColor(1,1,1,0.8f) );
|
||||
void SetEffectWagging( float fWagRadians = 0.2,
|
||||
float fWagPeriod = 2.0 );
|
||||
void SetEffectSpinning( D3DXVECTOR3 vectRotationVelocity );
|
||||
void SetEffectSpinning( RageVector3 vectRotationVelocity );
|
||||
void SetEffectVibrating( float fVibrationDistance = 5.0 );
|
||||
void SetEffectFlickering();
|
||||
void SetEffectBouncing( D3DXVECTOR3 vectBounceDir, float fPeriod );
|
||||
void SetEffectBobbing( D3DXVECTOR3 vectBobDir, float fPeriod );
|
||||
void SetEffectBouncing( RageVector3 vectBounceDir, float fPeriod );
|
||||
void SetEffectBobbing( RageVector3 vectBobDir, float fPeriod );
|
||||
Effect GetEffect() { return m_Effect; };
|
||||
|
||||
|
||||
@@ -188,12 +189,12 @@ public:
|
||||
protected:
|
||||
|
||||
/*
|
||||
D3DXVECTOR2 m_size; // width, height
|
||||
D3DXVECTOR3 m_pos; // X-Y coordinate of where the center point will appear on screen
|
||||
D3DXVECTOR3 m_rotation; // X, Y, and Z m_rotation
|
||||
D3DXVECTOR2 m_scale; // X and Y zooming
|
||||
D3DXCOLOR m_colorDiffuse[4]; // 4 corner colors - left to right, top to bottom
|
||||
D3DXCOLOR m_colorGlow;
|
||||
RageVector2 m_size; // width, height
|
||||
RageVector3 m_pos; // X-Y coordinate of where the center point will appear on screen
|
||||
RageVector3 m_rotation; // X, Y, and Z m_rotation
|
||||
RageVector2 m_scale; // X and Y zooming
|
||||
RageColor m_colorDiffuse[4]; // 4 corner colors - left to right, top to bottom
|
||||
RageColor m_colorGlow;
|
||||
*/
|
||||
//
|
||||
// Stuff for tweening
|
||||
@@ -203,20 +204,20 @@ protected:
|
||||
struct TweenState
|
||||
{
|
||||
// start and end position for tweening
|
||||
D3DXVECTOR3 pos;
|
||||
D3DXVECTOR3 rotation;
|
||||
D3DXVECTOR2 scale;
|
||||
D3DXCOLOR diffuse[4];
|
||||
D3DXCOLOR glow;
|
||||
RageVector3 pos;
|
||||
RageVector3 rotation;
|
||||
RageVector2 scale;
|
||||
RageColor diffuse[4];
|
||||
RageColor glow;
|
||||
|
||||
void Init()
|
||||
{
|
||||
pos = D3DXVECTOR3( 0, 0, 0 );
|
||||
rotation = D3DXVECTOR3( 0, 0, 0 );
|
||||
scale = D3DXVECTOR2( 1, 1 );
|
||||
pos = RageVector3( 0, 0, 0 );
|
||||
rotation = RageVector3( 0, 0, 0 );
|
||||
scale = RageVector2( 1, 1 );
|
||||
for(int i=0; i<4; i++)
|
||||
diffuse[i] = D3DXCOLOR( 1, 1, 1, 1 );
|
||||
glow = D3DXCOLOR( 1, 1, 1, 0 );
|
||||
diffuse[i] = RageColor( 1, 1, 1, 1 );
|
||||
glow = RageColor( 1, 1, 1, 0 );
|
||||
};
|
||||
};
|
||||
|
||||
@@ -228,7 +229,7 @@ protected:
|
||||
float m_fTweenTime; // seconds between Start and End positions/zooms
|
||||
};
|
||||
|
||||
D3DXVECTOR2 m_size;
|
||||
RageVector2 m_size;
|
||||
TweenState m_current;
|
||||
TweenState m_start;
|
||||
TweenState m_TweenStates[MAX_TWEEN_STATES];
|
||||
@@ -241,12 +242,12 @@ protected:
|
||||
// Temporary variables that are filled just before drawing
|
||||
//
|
||||
TweenState m_temp;
|
||||
/* D3DXVECTOR2 m_temp_size;
|
||||
D3DXVECTOR3 m_temp_pos;
|
||||
D3DXVECTOR3 m_temp_rotation;
|
||||
D3DXVECTOR2 m_temp_scale;
|
||||
D3DXCOLOR m_temp_colorDiffuse[4];
|
||||
D3DXCOLOR m_temp_colorGlow;
|
||||
/* RageVector2 m_temp_size;
|
||||
RageVector3 m_temp_pos;
|
||||
RageVector3 m_temp_rotation;
|
||||
RageVector2 m_temp_scale;
|
||||
RageColor m_temp_colorDiffuse[4];
|
||||
RageColor m_temp_colorGlow;
|
||||
*/
|
||||
|
||||
//
|
||||
@@ -263,10 +264,10 @@ protected:
|
||||
|
||||
|
||||
// Counting variables for camelion and glowing:
|
||||
D3DXCOLOR m_effect_colorDiffuse1;
|
||||
D3DXCOLOR m_effect_colorDiffuse2;
|
||||
D3DXCOLOR m_effect_colorGlow1;
|
||||
D3DXCOLOR m_effect_colorGlow2;
|
||||
RageColor m_effect_colorDiffuse1;
|
||||
RageColor m_effect_colorDiffuse2;
|
||||
RageColor m_effect_colorGlow1;
|
||||
RageColor m_effect_colorGlow2;
|
||||
float m_fPercentBetweenColors;
|
||||
bool m_bTweeningTowardEndColor; // TRUE is fading toward end_color, FALSE if fading toward start_color
|
||||
float m_fDeltaPercentPerSecond; // percentage change in tweening per second
|
||||
@@ -277,7 +278,7 @@ protected:
|
||||
float m_fWagTimer; // num of seconds into this wag
|
||||
|
||||
// spinning:
|
||||
D3DXVECTOR3 m_vSpinVelocity; // delta per second
|
||||
RageVector3 m_vSpinVelocity; // delta per second
|
||||
|
||||
// vibrating:
|
||||
float m_fVibrationDistance;
|
||||
@@ -286,7 +287,7 @@ protected:
|
||||
bool m_bVisibleThisFrame;
|
||||
|
||||
// bouncing:
|
||||
D3DXVECTOR3 m_vectBounce;
|
||||
RageVector3 m_vectBounce;
|
||||
float m_fBouncePeriod;
|
||||
float m_fTimeIntoBounce;
|
||||
|
||||
@@ -299,3 +300,5 @@ protected:
|
||||
bool m_bBlendAdd;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -41,7 +41,7 @@ void ActorFrame::Update( float fDeltaTime )
|
||||
}
|
||||
|
||||
|
||||
void ActorFrame::SetDiffuse( D3DXCOLOR c )
|
||||
void ActorFrame::SetDiffuse( RageColor c )
|
||||
{
|
||||
Actor::SetDiffuse( c );
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef ACTORFRAME_H
|
||||
#define ACTORFRAME_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: ActorFrame
|
||||
@@ -10,13 +11,8 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include <d3dx8math.h>
|
||||
#include "Actor.h"
|
||||
|
||||
|
||||
|
||||
class ActorFrame : public Actor
|
||||
{
|
||||
public:
|
||||
@@ -26,8 +22,10 @@ public:
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
|
||||
virtual void SetDiffuse( D3DXCOLOR c );
|
||||
virtual void SetDiffuse( RageColor c );
|
||||
|
||||
protected:
|
||||
CArray<Actor*,Actor*> m_SubActors;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -124,7 +124,7 @@ void BGAnimation::GainingFocus()
|
||||
for( int i=0; i<m_Layers.GetSize(); i++ )
|
||||
m_Layers[i]->GainingFocus();
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
|
||||
void BGAnimation::LosingFocus()
|
||||
@@ -133,7 +133,7 @@ void BGAnimation::LosingFocus()
|
||||
m_Layers[i]->LosingFocus();
|
||||
}
|
||||
|
||||
void BGAnimation::SetDiffuse( const D3DXCOLOR &c )
|
||||
void BGAnimation::SetDiffuse( const RageColor &c )
|
||||
{
|
||||
for( int i=0; i<m_Layers.GetSize(); i++ )
|
||||
m_Layers[i]->SetDiffuse(c);
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void DrawPrimitives();
|
||||
|
||||
virtual void SetDiffuse( const D3DXCOLOR &c );
|
||||
virtual void SetDiffuse( const RageColor &c );
|
||||
|
||||
|
||||
void GainingFocus();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "PrefsManager.h"
|
||||
#include "GameState.h"
|
||||
#include "IniFile.h"
|
||||
#include "RageMath.h"
|
||||
|
||||
|
||||
inline float GetOffScreenLeft( Actor* pActor ) { return SCREEN_LEFT - pActor->GetZoomedWidth()/2; }
|
||||
@@ -161,14 +162,14 @@ found_effect:
|
||||
|
||||
switch( m_Effect )
|
||||
{
|
||||
case EFFECT_STRETCH_SCROLL_LEFT: m_vTexCoordVelocity = D3DXVECTOR2(+0.5f,0); break;
|
||||
case EFFECT_STRETCH_SCROLL_RIGHT: m_vTexCoordVelocity = D3DXVECTOR2(-0.5f,0); break;
|
||||
case EFFECT_STRETCH_SCROLL_UP: m_vTexCoordVelocity = D3DXVECTOR2(0,+0.5f); break;
|
||||
case EFFECT_STRETCH_SCROLL_DOWN: m_vTexCoordVelocity = D3DXVECTOR2(0,-0.5f); break;
|
||||
case EFFECT_STRETCH_SCROLL_LEFT: m_vTexCoordVelocity = RageVector2(+0.5f,0); break;
|
||||
case EFFECT_STRETCH_SCROLL_RIGHT: m_vTexCoordVelocity = RageVector2(-0.5f,0); break;
|
||||
case EFFECT_STRETCH_SCROLL_UP: m_vTexCoordVelocity = RageVector2(0,+0.5f); break;
|
||||
case EFFECT_STRETCH_SCROLL_DOWN: m_vTexCoordVelocity = RageVector2(0,-0.5f); break;
|
||||
case EFFECT_STRETCH_WATER:
|
||||
case EFFECT_STRETCH_BUBBLE:
|
||||
case EFFECT_STRETCH_TWIST:
|
||||
m_vTexCoordVelocity = D3DXVECTOR2(-0.0f,0);
|
||||
m_vTexCoordVelocity = RageVector2(-0.0f,0);
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
@@ -215,8 +216,8 @@ found_effect:
|
||||
if( m_Effect == EFFECT_PARTICLES_BOUNCE )
|
||||
{
|
||||
m_Sprites[i].SetZoom( 1 );
|
||||
m_vHeadings[i] = D3DXVECTOR2( randomf(), randomf() );
|
||||
D3DXVec2Normalize( &m_vHeadings[i], &m_vHeadings[i] );
|
||||
m_vHeadings[i] = RageVector2( randomf(), randomf() );
|
||||
RageVec2Normalize( &m_vHeadings[i], &m_vHeadings[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -301,7 +302,7 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
{
|
||||
for( int i=0; i<m_iNumSprites; i++ )
|
||||
{
|
||||
D3DXCOLOR color = D3DXCOLOR(
|
||||
RageColor color = RageColor(
|
||||
cosf( fSongBeat+i ) * 0.5f + 0.5f,
|
||||
cosf( fSongBeat+i + D3DX_PI * 2.0f / 3.0f ) * 0.5f + 0.5f,
|
||||
cosf( fSongBeat+i + D3DX_PI * 4.0f / 3.0f) * 0.5f + 0.5f,
|
||||
@@ -314,7 +315,7 @@ void BGAnimationLayer::Update( float fDeltaTime )
|
||||
{
|
||||
for( int i=0; i<m_iNumSprites; i++ )
|
||||
{
|
||||
D3DXCOLOR color = m_Sprites[i].GetDiffuse();
|
||||
RageColor color = m_Sprites[i].GetDiffuse();
|
||||
color.a = cosf( fSongBeat/2 ) * 0.5f + 0.5f;
|
||||
m_Sprites[i].SetDiffuse( color );
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
virtual void Update( float fDeltaTime );
|
||||
virtual void Draw();
|
||||
|
||||
virtual void SetDiffuse( D3DXCOLOR c ) { for(int i=0; i<m_iNumSprites; i++) m_Sprites[i].SetDiffuse(c); }
|
||||
virtual void SetDiffuse( RageColor c ) { for(int i=0; i<m_iNumSprites; i++) m_Sprites[i].SetDiffuse(c); }
|
||||
|
||||
void GainingFocus();
|
||||
void LosingFocus();
|
||||
@@ -75,8 +75,8 @@ protected:
|
||||
};
|
||||
Effect m_Effect;
|
||||
|
||||
D3DXVECTOR2 m_vHeadings[MAX_SPRITES]; // only used in EFFECT_PARTICLES_BOUNCE
|
||||
RageVector2 m_vHeadings[MAX_SPRITES]; // only used in EFFECT_PARTICLES_BOUNCE
|
||||
|
||||
D3DXVECTOR2 m_vTexCoordVelocity;
|
||||
RageVector2 m_vTexCoordVelocity;
|
||||
float m_fRotationalVelocity;
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ BPMDisplay::BPMDisplay()
|
||||
m_fTimeLeftInState = 0;
|
||||
m_bExtraStage = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2();
|
||||
|
||||
m_rectFrame.SetDiffuse( D3DXCOLOR(0,0,0,0.3f) );
|
||||
m_rectFrame.SetDiffuse( RageColor(0,0,0,0.3f) );
|
||||
m_rectFrame.SetZoomX( 120 );
|
||||
m_rectFrame.SetZoomY( 40 );
|
||||
|
||||
|
||||
@@ -56,16 +56,16 @@ Background::Background()
|
||||
m_BGADanger.LoadFromAniDir( THEME->GetPathTo("BGAnimations","gameplay danger") );
|
||||
|
||||
m_quadBGBrightness.StretchTo( RECT_BACKGROUND );
|
||||
m_quadBGBrightness.SetDiffuse( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
|
||||
m_quadBGBrightness.SetDiffuse( RageColor(0,0,0,1-PREFSMAN->m_fBGBrightness) );
|
||||
|
||||
m_quadBorder[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,LEFT_EDGE,SCREEN_BOTTOM) );
|
||||
m_quadBorder[0].SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBorder[0].SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quadBorder[1].StretchTo( CRect(LEFT_EDGE,SCREEN_TOP,RIGHT_EDGE,TOP_EDGE) );
|
||||
m_quadBorder[1].SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBorder[1].SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quadBorder[2].StretchTo( CRect(RIGHT_EDGE,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||
m_quadBorder[2].SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBorder[2].SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quadBorder[3].StretchTo( CRect(LEFT_EDGE,BOTTOM_EDGE,RIGHT_EDGE,SCREEN_BOTTOM) );
|
||||
m_quadBorder[3].SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBorder[3].SetDiffuse( RageColor(0,0,0,1) );
|
||||
}
|
||||
|
||||
Background::~Background()
|
||||
@@ -402,7 +402,7 @@ void Background::Update( float fDeltaTime )
|
||||
m_pFadingBGA->Update( fDeltaTime );
|
||||
m_fSecsLeftInFade -= fDeltaTime;
|
||||
float fPercentOpaque = m_fSecsLeftInFade / FADE_SECONDS;
|
||||
m_pFadingBGA->SetDiffuse( D3DXCOLOR(1,1,1,fPercentOpaque) );
|
||||
m_pFadingBGA->SetDiffuse( RageColor(1,1,1,fPercentOpaque) );
|
||||
if( fPercentOpaque <= 0 )
|
||||
m_pFadingBGA = NULL;
|
||||
}
|
||||
@@ -440,12 +440,12 @@ bool Background::DangerVisible()
|
||||
void Background::FadeIn()
|
||||
{
|
||||
m_quadBGBrightness.BeginTweening( 0.5f );
|
||||
m_quadBGBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
|
||||
m_quadBGBrightness.SetTweenDiffuse( RageColor(0,0,0,1-PREFSMAN->m_fBGBrightness) );
|
||||
}
|
||||
|
||||
void Background::FadeOut()
|
||||
{
|
||||
m_quadBGBrightness.BeginTweening( 0.5f );
|
||||
m_quadBGBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,1-0.5f) );
|
||||
m_quadBGBrightness.SetTweenDiffuse( RageColor(0,0,0,1-0.5f) );
|
||||
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#define RAINBOW_COLOR_7 THEME->GetMetricC("BitmapText","RainbowColor7")
|
||||
|
||||
const int NUM_RAINBOW_COLORS = 7;
|
||||
D3DXCOLOR RAINBOW_COLORS[NUM_RAINBOW_COLORS];
|
||||
RageColor RAINBOW_COLORS[NUM_RAINBOW_COLORS];
|
||||
|
||||
|
||||
BitmapText::BitmapText()
|
||||
@@ -201,7 +201,7 @@ void BitmapText::DrawPrimitives()
|
||||
|
||||
|
||||
// make the object in logical units centered at the origin
|
||||
static RAGEVERTEX v[4000];
|
||||
static RageVertex v[4000];
|
||||
int iNumV = 0; // the current vertex number
|
||||
|
||||
|
||||
@@ -250,10 +250,10 @@ void BitmapText::DrawPrimitives()
|
||||
//
|
||||
// set vertex positions
|
||||
//
|
||||
v[iNumV++].p = D3DXVECTOR3( (float)iX-iDrawExtraPixelsLeft, iY-iHeight/2.0f, 0 ); // top left
|
||||
v[iNumV++].p = D3DXVECTOR3( (float)iX-iDrawExtraPixelsLeft+iCharWidth+iDrawExtraPixelsRight, iY-iHeight/2.0f, 0 ); // top right
|
||||
v[iNumV++].p = D3DXVECTOR3( (float)iX-iDrawExtraPixelsLeft, iY+iHeight/2.0f, 0 ); // bottom left
|
||||
v[iNumV++].p = D3DXVECTOR3( (float)iX-iDrawExtraPixelsLeft+iCharWidth+iDrawExtraPixelsRight, iY+iHeight/2.0f, 0 ); // bottom right
|
||||
v[iNumV++].p = RageVector3( (float)iX-iDrawExtraPixelsLeft, iY-iHeight/2.0f, 0 ); // top left
|
||||
v[iNumV++].p = RageVector3( (float)iX-iDrawExtraPixelsLeft+iCharWidth+iDrawExtraPixelsRight, iY-iHeight/2.0f, 0 ); // top right
|
||||
v[iNumV++].p = RageVector3( (float)iX-iDrawExtraPixelsLeft, iY+iHeight/2.0f, 0 ); // bottom left
|
||||
v[iNumV++].p = RageVector3( (float)iX-iDrawExtraPixelsLeft+iCharWidth+iDrawExtraPixelsRight, iY+iHeight/2.0f, 0 ); // bottom right
|
||||
|
||||
iX += iCharWidth;
|
||||
|
||||
@@ -274,10 +274,10 @@ void BitmapText::DrawPrimitives()
|
||||
const float fExtraTexCoordsLeft = iDrawExtraPixelsLeft / (float)pTexture->GetSourceWidth();
|
||||
const float fExtraTexCoordsRight = iDrawExtraPixelsRight / (float)pTexture->GetSourceWidth();
|
||||
|
||||
v[iNumV++].t = D3DXVECTOR2( frectTexCoords.left - fExtraTexCoordsLeft, frectTexCoords.top ); // top left
|
||||
v[iNumV++].t = D3DXVECTOR2( frectTexCoords.right + fExtraTexCoordsRight, frectTexCoords.top ); // top right
|
||||
v[iNumV++].t = D3DXVECTOR2( frectTexCoords.left - fExtraTexCoordsLeft, frectTexCoords.bottom ); // bottom left
|
||||
v[iNumV++].t = D3DXVECTOR2( frectTexCoords.right + fExtraTexCoordsRight, frectTexCoords.bottom ); // bottom right
|
||||
v[iNumV++].t = RageVector2( frectTexCoords.left - fExtraTexCoordsLeft, frectTexCoords.top ); // top left
|
||||
v[iNumV++].t = RageVector2( frectTexCoords.right + fExtraTexCoordsRight, frectTexCoords.top ); // top right
|
||||
v[iNumV++].t = RageVector2( frectTexCoords.left - fExtraTexCoordsLeft, frectTexCoords.bottom ); // bottom left
|
||||
v[iNumV++].t = RageVector2( frectTexCoords.right + fExtraTexCoordsRight, frectTexCoords.bottom ); // bottom right
|
||||
}
|
||||
|
||||
iY += iLineSpacing;
|
||||
@@ -305,11 +305,11 @@ void BitmapText::DrawPrimitives()
|
||||
DISPLAY->PushMatrix();
|
||||
DISPLAY->TranslateLocal( m_fShadowLength, m_fShadowLength, 0 ); // shift by 5 units
|
||||
|
||||
DWORD dwColor = D3DXCOLOR(0,0,0,0.5f*m_temp.diffuse[0].a); // semi-transparent black
|
||||
DWORD dwColor = RageColor(0,0,0,0.5f*m_temp.diffuse[0].a); // semi-transparent black
|
||||
|
||||
int i;
|
||||
for( i=0; i<iNumV; i++ )
|
||||
v[i].color = dwColor;
|
||||
v[i].c = dwColor;
|
||||
for( i=0; i<iNumV; i+=4 )
|
||||
DISPLAY->AddQuad( &v[i] );
|
||||
|
||||
@@ -324,9 +324,9 @@ void BitmapText::DrawPrimitives()
|
||||
int color_index = int(TIMER->GetTimeSinceStart() / 0.200) % NUM_RAINBOW_COLORS;
|
||||
for( int i=0; i<iNumV; i+=4 )
|
||||
{
|
||||
const D3DXCOLOR color = RAINBOW_COLORS[color_index];
|
||||
const RageColor color = RAINBOW_COLORS[color_index];
|
||||
for( int j=i; j<i+4; j++ )
|
||||
v[j].color = color;
|
||||
v[j].c = color;
|
||||
|
||||
color_index = (color_index+1)%NUM_RAINBOW_COLORS;
|
||||
}
|
||||
@@ -335,10 +335,10 @@ void BitmapText::DrawPrimitives()
|
||||
{
|
||||
for( int i=0; i<iNumV; i+=4 )
|
||||
{
|
||||
v[i+0].color = m_temp.diffuse[0]; // top left
|
||||
v[i+1].color = m_temp.diffuse[1]; // top right
|
||||
v[i+2].color = m_temp.diffuse[2]; // bottom left
|
||||
v[i+3].color = m_temp.diffuse[3]; // bottom right
|
||||
v[i+0].c = m_temp.diffuse[0]; // top left
|
||||
v[i+1].c = m_temp.diffuse[1]; // top right
|
||||
v[i+2].c = m_temp.diffuse[2]; // bottom left
|
||||
v[i+3].c = m_temp.diffuse[3]; // bottom right
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ void BitmapText::DrawPrimitives()
|
||||
|
||||
int i;
|
||||
for( i=0; i<iNumV; i++ )
|
||||
v[i].color = m_temp.glow;
|
||||
v[i].c = m_temp.glow;
|
||||
for( i=0; i<iNumV; i+=4 )
|
||||
DISPLAY->AddQuad( &v[i] );
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ void Combo::Reset()
|
||||
{
|
||||
m_iCurCombo = m_iMaxCombo = m_iCurComboOfPerfects = 0;
|
||||
|
||||
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
}
|
||||
|
||||
Combo::Combo()
|
||||
@@ -89,13 +89,13 @@ void Combo::UpdateScore( TapNoteScore score, int iNumNotesInThisRow )
|
||||
|
||||
if( m_iCurCombo <= 4 )
|
||||
{
|
||||
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
}
|
||||
else
|
||||
{
|
||||
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // visible
|
||||
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // visible
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,1) ); // visible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,1) ); // visible
|
||||
|
||||
m_textComboNumber.SetText( ssprintf("%d", m_iCurCombo) );
|
||||
float fNewZoom = min( 0.5f + m_iCurCombo/800.0f, 1.0f );
|
||||
@@ -116,8 +116,8 @@ void Combo::UpdateScore( TapNoteScore score, int iNumNotesInThisRow )
|
||||
|
||||
m_iCurCombo = 0;
|
||||
|
||||
m_textComboNumber.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( D3DXCOLOR(1,1,1,0) ); // invisible
|
||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
m_sprCombo.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
|
||||
@@ -232,15 +232,15 @@ void Course::GetSongAndNotesForCurrentStyle(
|
||||
}
|
||||
}
|
||||
|
||||
D3DXCOLOR Course::GetColor()
|
||||
RageColor Course::GetColor()
|
||||
{
|
||||
// This could be made smarter
|
||||
if( m_iStages >= 7 )
|
||||
return D3DXCOLOR(1,0,0,1); // red
|
||||
return RageColor(1,0,0,1); // red
|
||||
else if( m_iStages >= 4 )
|
||||
return D3DXCOLOR(1,0.5f,0,1); // orange
|
||||
return RageColor(1,0.5f,0,1); // orange
|
||||
else
|
||||
return D3DXCOLOR(0,1,0,1); // green
|
||||
return RageColor(0,1,0,1); // green
|
||||
}
|
||||
|
||||
void Course::GetPlayerOptions( PlayerOptions* pPO_out )
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
}
|
||||
|
||||
void GetSongAndNotesForCurrentStyle( CArray<Song*,Song*>& apSongsOut, CArray<Notes*,Notes*>& apNotesOut, CStringArray& asModifiersOut, bool bShuffled );
|
||||
D3DXCOLOR GetColor();
|
||||
RageColor GetColor();
|
||||
|
||||
private:
|
||||
int SongOrdering[MAX_COURSE_STAGES];
|
||||
|
||||
@@ -65,8 +65,8 @@ void CourseContentDisplay::Load( int iNum, Song* pSong, Notes* pNotes )
|
||||
{
|
||||
m_textNumber.SetText( ssprintf("%d", iNum) );
|
||||
|
||||
D3DXCOLOR colorGroup = SONGMAN->GetSongColor( pSong );
|
||||
D3DXCOLOR colorNotes = pNotes->GetColor();
|
||||
RageColor colorGroup = SONGMAN->GetSongColor( pSong );
|
||||
RageColor colorNotes = pNotes->GetColor();
|
||||
|
||||
m_TextBanner.LoadFromSong( pSong );
|
||||
m_TextBanner.SetDiffuse( colorGroup );
|
||||
@@ -83,7 +83,7 @@ void CourseContentDisplay::Load( int iNum, Song* pSong, Notes* pNotes )
|
||||
CourseContentsFrame::CourseContentsFrame()
|
||||
{
|
||||
m_iNumContents = 0;
|
||||
m_quad.SetDiffuse( D3DXCOLOR(0,0,0,0) ); // invisible, since we want to write only to the Zbuffer
|
||||
m_quad.SetDiffuse( RageColor(0,0,0,0) ); // invisible, since we want to write only to the Zbuffer
|
||||
|
||||
m_fTimeUntilScroll = 0;
|
||||
m_fItemAtTopOfList = 0;
|
||||
|
||||
@@ -58,7 +58,7 @@ void CroppedSprite::CropToSize( float fWidth, float fHeight )
|
||||
};
|
||||
Sprite::SetCustomImageCoords( fCustomImageCoords );
|
||||
|
||||
m_size = D3DXVECTOR2( m_fCropWidth, m_fCropHeight );
|
||||
m_size = RageVector2( m_fCropWidth, m_fCropHeight );
|
||||
SetZoom( 1 );
|
||||
}
|
||||
else // this is probably a background graphic or something not intended to be a CroppedSprite
|
||||
@@ -99,7 +99,7 @@ void CroppedSprite::CropToSize( float fWidth, float fHeight )
|
||||
1 - fPercentageToCutOffEachSide );
|
||||
SetCustomImageRect( fCustomImageCoords );
|
||||
}
|
||||
m_size = D3DXVECTOR2( m_fCropWidth, m_fCropHeight );
|
||||
m_size = RageVector2( m_fCropWidth, m_fCropHeight );
|
||||
SetZoom( 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ void DifficultyIcon::SetFromNotes( PlayerNumber pn, Notes* pNotes )
|
||||
{
|
||||
if( pNotes == NULL )
|
||||
{
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
SetDiffuse( RageColor(1,1,1,0) );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
int iStateNo = pNotes->GetNotesDisplayType();
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ void FadingBanner::BeforeChange()
|
||||
m_Banner[1].SetScrolling( m_Banner[0].IsScrolling() );
|
||||
}
|
||||
|
||||
m_Banner[1].SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_Banner[1].SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_Banner[1].StopTweening();
|
||||
m_Banner[1].BeginTweening( 0.25f ); // fade out
|
||||
m_Banner[1].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_Banner[1].SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ void FocusingSprite::DrawPrimitives()
|
||||
{
|
||||
if( m_BlurState != invisible )
|
||||
{
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,0.5f-m_fPercentBlurred/2) );
|
||||
SetDiffuse( RageColor(1,1,1,0.5f-m_fPercentBlurred/2) );
|
||||
|
||||
m_sprites[0].SetXY( m_fPercentBlurred*BLUR_DISTANCE*2, m_fPercentBlurred*BLUR_DISTANCE );
|
||||
m_sprites[1].SetXY( -m_fPercentBlurred*BLUR_DISTANCE*2, -m_fPercentBlurred*BLUR_DISTANCE );
|
||||
|
||||
@@ -31,7 +31,7 @@ void FootMeter::SetFromNotes( Notes* pNotes )
|
||||
{
|
||||
if( pNotes != NULL )
|
||||
{
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
SetNumFeet( pNotes->m_iMeter );
|
||||
if( pNotes->m_iMeter > GLOW_IF_METER_GREATER_THAN )
|
||||
this->SetEffectGlowing();
|
||||
@@ -43,7 +43,7 @@ void FootMeter::SetFromNotes( Notes* pNotes )
|
||||
else
|
||||
{
|
||||
this->SetEffectNone();
|
||||
SetDiffuse( D3DXCOLOR(0.8f,0.8f,0.8f,1) );
|
||||
SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) );
|
||||
SetNumFeet( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,17 +39,17 @@ Difficulty StringToDifficulty( CString sDC )
|
||||
return CLASS_INVALID;
|
||||
}
|
||||
|
||||
D3DXCOLOR PlayerToColor( PlayerNumber pn )
|
||||
RageColor PlayerToColor( PlayerNumber pn )
|
||||
{
|
||||
switch( pn )
|
||||
{
|
||||
case PLAYER_1: return COLOR_P1;
|
||||
case PLAYER_2: return COLOR_P2;
|
||||
default: ASSERT(0); return D3DXCOLOR(0.5f,0.5f,0.5f,1);
|
||||
default: ASSERT(0); return RageColor(0.5f,0.5f,0.5f,1);
|
||||
}
|
||||
};
|
||||
|
||||
D3DXCOLOR PlayerToColor( int p )
|
||||
RageColor PlayerToColor( int p )
|
||||
{
|
||||
return PlayerToColor( (PlayerNumber)p );
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "D3DX8Math.h" // for D3DXCOLOR
|
||||
#include "RageTypes.h" // for RageColor
|
||||
|
||||
|
||||
/////////////////////////////
|
||||
@@ -93,8 +93,8 @@ enum PlayerNumber {
|
||||
PLAYER_INVALID
|
||||
};
|
||||
|
||||
D3DXCOLOR PlayerToColor( PlayerNumber pn );
|
||||
D3DXCOLOR PlayerToColor( int p );
|
||||
RageColor PlayerToColor( PlayerNumber pn );
|
||||
RageColor PlayerToColor( int p );
|
||||
|
||||
|
||||
enum SongSortOrder {
|
||||
|
||||
@@ -1281,7 +1281,7 @@ bool GameManager::GetMetricB( CString sClassName, CString sValueName )
|
||||
return atoi( GetMetric(sClassName,sValueName) ) != 0;
|
||||
}
|
||||
|
||||
D3DXCOLOR GameManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
RageColor GameManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
{
|
||||
float r=1,b=1,g=1,a=1; // initialize in case sscanf fails
|
||||
CString sValue = GetMetric(sClassName,sValueName);
|
||||
@@ -1294,7 +1294,7 @@ D3DXCOLOR GameManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
return D3DXCOLOR(r,g,b,a);
|
||||
return RageColor(r,g,b,a);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
int GetMetricI( CString sClassName, CString sValueName );
|
||||
float GetMetricF( CString sClassName, CString sValueName );
|
||||
bool GetMetricB( CString sClassName, CString sValueName );
|
||||
D3DXCOLOR GetMetricC( CString sClassName, CString sValueName );
|
||||
RageColor GetMetricC( CString sClassName, CString sValueName );
|
||||
|
||||
|
||||
void GetEnabledGames( CArray<Game,Game>& aGamesOut );
|
||||
|
||||
@@ -251,7 +251,7 @@ CString GameState::GetStageText()
|
||||
return ssprintf( "%d%s", iStageNo, sNumberSuffix );
|
||||
}
|
||||
|
||||
D3DXCOLOR GameState::GetStageColor()
|
||||
RageColor GameState::GetStageColor()
|
||||
{
|
||||
if( m_bDemonstration ) return STAGE_COLOR_DEMO;
|
||||
else if( m_PlayMode==PLAY_MODE_ONI || m_PlayMode==PLAY_MODE_ENDLESS ) return STAGE_COLOR_ONI;
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
bool IsExtraStage();
|
||||
bool IsExtraStage2();
|
||||
CString GetStageText();
|
||||
D3DXCOLOR GetStageColor();
|
||||
RageColor GetStageColor();
|
||||
|
||||
//
|
||||
// State Info used during gameplay
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
float g_fShowSeconds;
|
||||
float g_fZoomStart, g_fZoomEnd;
|
||||
D3DXCOLOR
|
||||
RageColor
|
||||
g_colorPerfectStart, g_colorPerfectEnd,
|
||||
g_colorGreatStart, g_colorGreatEnd,
|
||||
g_colorGoodStart, g_colorGoodEnd,
|
||||
@@ -50,7 +50,7 @@ GhostArrow::GhostArrow()
|
||||
g_colorBooEnd = COLOR_BOO_END;
|
||||
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
SetDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
void GhostArrow::Update( float fDeltaTime )
|
||||
@@ -65,7 +65,7 @@ void GhostArrow::Step( TapNoteScore score )
|
||||
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
||||
Sprite::m_fDelay[i] = g_fShowSeconds / (float)Sprite::GetNumStates();
|
||||
|
||||
D3DXCOLOR colorStart, colorEnd;
|
||||
RageColor colorStart, colorEnd;
|
||||
switch( score )
|
||||
{
|
||||
case TNS_PERFECT: colorStart = g_colorPerfectStart; colorEnd = g_colorPerfectEnd; break;
|
||||
@@ -87,5 +87,5 @@ void GhostArrow::Step( TapNoteScore score )
|
||||
SetTweenDiffuse( colorEnd );
|
||||
|
||||
BeginTweening( 0.0001f ); // snap to invisible
|
||||
SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// "2" appended so the names won't conflict with the GhostArrow
|
||||
float g_fShowSeconds2;
|
||||
float g_fZoomStart2, g_fZoomEnd2;
|
||||
D3DXCOLOR
|
||||
RageColor
|
||||
g_colorPerfectStart2, g_colorPerfectEnd2,
|
||||
g_colorGreatStart2, g_colorGreatEnd2,
|
||||
g_colorGoodStart2, g_colorGoodEnd2,
|
||||
@@ -52,7 +52,7 @@ GhostArrowBright::GhostArrowBright()
|
||||
g_colorBooEnd2 = COLOR_BOO_END;
|
||||
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
SetDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
void GhostArrowBright::Update( float fDeltaTime )
|
||||
@@ -67,7 +67,7 @@ void GhostArrowBright::Step( TapNoteScore score )
|
||||
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
||||
Sprite::m_fDelay[i] = g_fShowSeconds2 / (float)Sprite::GetNumStates();
|
||||
|
||||
D3DXCOLOR colorStart, colorEnd;
|
||||
RageColor colorStart, colorEnd;
|
||||
switch( score )
|
||||
{
|
||||
case TNS_PERFECT: colorStart = g_colorPerfectStart2; colorEnd = g_colorPerfectEnd2; break;
|
||||
@@ -89,5 +89,5 @@ void GhostArrowBright::Step( TapNoteScore score )
|
||||
SetTweenDiffuse( colorEnd );
|
||||
|
||||
BeginTweening( 0.0001f ); // snap to invisible
|
||||
SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ void GradeDisplay::SetGrade( PlayerNumber pn, Grade g )
|
||||
m_bDoScrolling = false;
|
||||
StopUsingCustomCoords();
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
// Ugly... This has to handle cases where the sprite has 7, 8, 14, or 16 states
|
||||
int iNumCols = (this->GetNumStates()>8) ? 2 : 1;
|
||||
@@ -85,7 +85,7 @@ void GradeDisplay::SetGrade( PlayerNumber pn, Grade g )
|
||||
case GRADE_C: SetState( 4*iNumCols+pn ); break;
|
||||
case GRADE_D: SetState( 5*iNumCols+pn ); break;
|
||||
case GRADE_E: SetState( 6*iNumCols+pn ); break;
|
||||
case GRADE_NO_DATA: SetDiffuse( D3DXCOLOR(1,1,1,0) ); break;
|
||||
case GRADE_NO_DATA: SetDiffuse( RageColor(1,1,1,0) ); break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
};
|
||||
@@ -98,7 +98,7 @@ void GradeDisplay::SpinAndSettleOn( Grade g )
|
||||
m_bDoScrolling = true;
|
||||
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
int iFrameNo=0;
|
||||
switch( g )
|
||||
|
||||
@@ -49,18 +49,18 @@ void GrooveRadar::TweenOnScreen()
|
||||
float fOriginalX = m_sprRadarLabels[c].GetX();
|
||||
m_sprRadarLabels[c].SetX( fOriginalX - 100 );
|
||||
m_sprRadarLabels[c].SetZoom( 1.5f );
|
||||
m_sprRadarLabels[c].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprRadarLabels[c].SetDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_sprRadarLabels[c].BeginTweening( 0.6f+0.2f*c ); // sleep
|
||||
|
||||
m_sprRadarLabels[c].BeginTweening( 0.1f ); // begin fading on screen
|
||||
m_sprRadarLabels[c].SetTweenGlow( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprRadarLabels[c].SetTweenGlow( RageColor(1,1,1,1) );
|
||||
|
||||
m_sprRadarLabels[c].BeginTweening( 0.3f, Actor::TWEEN_BIAS_BEGIN ); // fly to the right
|
||||
m_sprRadarLabels[c].SetTweenX( fOriginalX );
|
||||
m_sprRadarLabels[c].SetTweenZoom( 1 );
|
||||
m_sprRadarLabels[c].SetTweenGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprRadarLabels[c].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprRadarLabels[c].SetTweenGlow( RageColor(1,1,1,0) );
|
||||
m_sprRadarLabels[c].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
m_GrooveRadarValueMap.TweenOnScreen();
|
||||
}
|
||||
@@ -74,8 +74,8 @@ void GrooveRadar::TweenOffScreen()
|
||||
/* Make sure we undo glow. We do this at the end of TweenIn,
|
||||
* but we might tween off before we complete tweening in, and
|
||||
* the glow can remain. */
|
||||
m_sprRadarLabels[c].SetTweenGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprRadarLabels[c].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprRadarLabels[c].SetTweenGlow( RageColor(1,1,1,0) );
|
||||
m_sprRadarLabels[c].SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
m_GrooveRadarValueMap.TweenOffScreen();
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
|
||||
DISPLAY->SetTexture( NULL );
|
||||
DISPLAY->SetColorTextureMultDiffuse();
|
||||
DISPLAY->SetAlphaTextureMultDiffuse();
|
||||
RAGEVERTEX v[12]; // needed to draw 5 fan primitives and 10 strip primitives
|
||||
RageVertex v[12]; // needed to draw 5 fan primitives and 10 strip primitives
|
||||
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
@@ -152,10 +152,10 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
|
||||
//
|
||||
// use a fan to draw the volume
|
||||
//
|
||||
D3DXCOLOR color = PlayerToColor( (PlayerNumber)p );
|
||||
RageColor color = PlayerToColor( (PlayerNumber)p );
|
||||
color.a = 0.5f;
|
||||
v[0].p = D3DXVECTOR3( 0, 0, 0 );
|
||||
v[0].color = color;
|
||||
v[0].p = RageVector3( 0, 0, 0 );
|
||||
v[0].c = color;
|
||||
|
||||
int i;
|
||||
|
||||
@@ -168,8 +168,8 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
|
||||
const float fX = cosf(fRotation) * fDistFromCenter;
|
||||
const float fY = -sinf(fRotation) * fDistFromCenter;
|
||||
|
||||
v[1+i].p = D3DXVECTOR3( fX, fY, 0 );
|
||||
v[1+i].color = v[0].color;
|
||||
v[1+i].p = RageVector3( fX, fY, 0 );
|
||||
v[1+i].c = v[0].c;
|
||||
}
|
||||
|
||||
DISPLAY->AddFan( v, 5 );
|
||||
@@ -191,10 +191,10 @@ void GrooveRadar::GrooveRadarValueMap::DrawPrimitives()
|
||||
const float fYInner = -sinf(fRotation) * fDistFromCenterInner;
|
||||
const float fYOutter = -sinf(fRotation) * fDistFromCenterOutter;
|
||||
|
||||
v[i*2+0].p = D3DXVECTOR3( fXInner, fYInner, 0 );
|
||||
v[i*2+1].p = D3DXVECTOR3( fXOutter, fYOutter, 0 );
|
||||
v[i*2+0].color = PlayerToColor( (PlayerNumber)p );
|
||||
v[i*2+1].color = v[i*2+0].color;
|
||||
v[i*2+0].p = RageVector3( fXInner, fYInner, 0 );
|
||||
v[i*2+1].p = RageVector3( fXOutter, fYOutter, 0 );
|
||||
v[i*2+0].c = PlayerToColor( (PlayerNumber)p );
|
||||
v[i*2+1].c = v[i*2+0].c;
|
||||
}
|
||||
|
||||
DISPLAY->AddStrip( v, 10 );
|
||||
|
||||
@@ -25,7 +25,7 @@ HoldGhostArrow::HoldGhostArrow()
|
||||
m_fHeatLevel = 0;
|
||||
|
||||
// LoadFromSpriteFile( THEME->GetPathTo(GRAPHIC_HOLD_GHOST_ARROW) );
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
// SetZoom( 1.1f );
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ void HoldGhostArrow::Update( float fDeltaTime )
|
||||
else
|
||||
SetZoom( 1 );
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,m_fHeatLevel*3) );
|
||||
SetDiffuse( RageColor(1,1,1,m_fHeatLevel*3) );
|
||||
|
||||
m_bWasSteppedOnLastFrame = false; // reset for next frame
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
bool bExtra = GAMESTATE->IsExtraStage()||GAMESTATE->IsExtraStage2();
|
||||
|
||||
m_quadMask.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_quadMask.SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_quadMask.SetZ( -1 );
|
||||
|
||||
CString sGraphicPath;
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
m_sprStreamNormal.SetCustomTextureRect( frectCustomTexCoords );
|
||||
m_sprStreamHot.SetCustomTextureRect( frectCustomTexCoords );
|
||||
|
||||
m_sprStreamHot.SetDiffuse( D3DXCOLOR(1,1,1,m_fHotAlpha) );
|
||||
m_sprStreamHot.SetDiffuse( RageColor(1,1,1,m_fHotAlpha) );
|
||||
|
||||
m_sprStreamNormal.Draw();
|
||||
m_sprStreamHot.Draw();
|
||||
@@ -240,7 +240,7 @@ LifeMeterBar::LifeMeterBar()
|
||||
m_fHotAlpha = 0;
|
||||
m_bFailedEarlier = false;
|
||||
|
||||
m_quadBlackBackground.SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBlackBackground.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quadBlackBackground.SetZoomX( (float)g_iMeterWidth );
|
||||
m_quadBlackBackground.SetZoomY( (float)g_iMeterHeight );
|
||||
|
||||
@@ -405,7 +405,7 @@ void LifeMeterBar::DrawPrimitives()
|
||||
m_sprStreamHot.StretchTo( &rectSize );
|
||||
m_sprStreamHot.SetCustomTextureRect( frectCustomTexCoords );
|
||||
|
||||
m_sprStreamHot.SetDiffuse( D3DXCOLOR(1,1,1,m_fHotAlpha) );
|
||||
m_sprStreamHot.SetDiffuse( RageColor(1,1,1,m_fHotAlpha) );
|
||||
|
||||
*/
|
||||
|
||||
@@ -413,7 +413,7 @@ void LifeMeterBar::DrawPrimitives()
|
||||
m_pStream->m_fHotAlpha = m_fHotAlpha;
|
||||
|
||||
float fPercentRed = (m_fTrailingLifePercentage<g_fDangerThreshold) ? sinf( TIMER->GetTimeSinceStart()*D3DX_PI*4 )/2+0.5f : 0;
|
||||
m_quadBlackBackground.SetDiffuse( D3DXCOLOR(fPercentRed*0.8f,0,0,1) );
|
||||
m_quadBlackBackground.SetDiffuse( RageColor(fPercentRed*0.8f,0,0,1) );
|
||||
|
||||
ActorFrame::DrawPrimitives();
|
||||
}
|
||||
@@ -424,20 +424,20 @@ void LifeMeterBar::DrawPrimitives()
|
||||
of the theme. That's where it belongs anyway...
|
||||
|
||||
|
||||
const D3DXCOLOR COLOR_EZ2NORMAL_1 = D3DXCOLOR(0.7f,0.4f,0,1);
|
||||
const D3DXCOLOR COLOR_EZ2NORMAL_2 = D3DXCOLOR(0.8f,0.4f,0,1);
|
||||
const D3DXCOLOR COLOR_EZ2NEARFULL_1 = D3DXCOLOR(0.7f,0.6f,0,1);
|
||||
const D3DXCOLOR COLOR_EZ2NEARFULL_2 = D3DXCOLOR(0.8f,0.7f,0,1);
|
||||
const D3DXCOLOR COLOR_EZ2NEARFAIL_1 = D3DXCOLOR(0.9f,0.0f,0,1);
|
||||
const D3DXCOLOR COLOR_EZ2NEARFAIL_2 = D3DXCOLOR(0.8f,0.1f,0,1);
|
||||
const D3DXCOLOR COLOR_EZ2FULL_1 = D3DXCOLOR(0.3f,0.9f,0.4f,1);
|
||||
const D3DXCOLOR COLOR_EZ2FULL_2 = D3DXCOLOR(0.2f,0.7f,0.3f,1);
|
||||
const D3DXCOLOR COLOR_NORMAL_1 = D3DXCOLOR(1,1,1,1);
|
||||
const D3DXCOLOR COLOR_NORMAL_2 = D3DXCOLOR(0,1,0,1);
|
||||
const D3DXCOLOR COLOR_FULL_1 = D3DXCOLOR(1,0,0,1);
|
||||
const D3DXCOLOR COLOR_FULL_2 = D3DXCOLOR(1,1,0,1);
|
||||
const RageColor COLOR_EZ2NORMAL_1 = RageColor(0.7f,0.4f,0,1);
|
||||
const RageColor COLOR_EZ2NORMAL_2 = RageColor(0.8f,0.4f,0,1);
|
||||
const RageColor COLOR_EZ2NEARFULL_1 = RageColor(0.7f,0.6f,0,1);
|
||||
const RageColor COLOR_EZ2NEARFULL_2 = RageColor(0.8f,0.7f,0,1);
|
||||
const RageColor COLOR_EZ2NEARFAIL_1 = RageColor(0.9f,0.0f,0,1);
|
||||
const RageColor COLOR_EZ2NEARFAIL_2 = RageColor(0.8f,0.1f,0,1);
|
||||
const RageColor COLOR_EZ2FULL_1 = RageColor(0.3f,0.9f,0.4f,1);
|
||||
const RageColor COLOR_EZ2FULL_2 = RageColor(0.2f,0.7f,0.3f,1);
|
||||
const RageColor COLOR_NORMAL_1 = RageColor(1,1,1,1);
|
||||
const RageColor COLOR_NORMAL_2 = RageColor(0,1,0,1);
|
||||
const RageColor COLOR_FULL_1 = RageColor(1,0,0,1);
|
||||
const RageColor COLOR_FULL_2 = RageColor(1,1,0,1);
|
||||
|
||||
D3DXCOLOR LifeStream::GetColor( float fPercentIntoSection )
|
||||
RageColor LifeStream::GetColor( float fPercentIntoSection )
|
||||
{
|
||||
float fPercentColor1 = fabsf( fPercentIntoSection*2 - 1 );
|
||||
fPercentColor1 *= fPercentColor1 * fPercentColor1 * fPercentColor1; // make the color bunch around one side
|
||||
@@ -483,11 +483,11 @@ void LifeStream::DrawPrimitives()
|
||||
//
|
||||
// draw middle
|
||||
//
|
||||
v[iNumV++].p = D3DXVECTOR3( fX, -0.5f, 0 );
|
||||
v[iNumV++].p = D3DXVECTOR3( fX, 0.5f, 0 );
|
||||
v[iNumV++].p = RageVector3( fX, -0.5f, 0 );
|
||||
v[iNumV++].p = RageVector3( fX, 0.5f, 0 );
|
||||
|
||||
iNumV -= 2;
|
||||
const D3DXCOLOR color = GetColor( fPercentIntoSection );
|
||||
const RageColor color = GetColor( fPercentIntoSection );
|
||||
v[iNumV++].color = color;
|
||||
v[iNumV++].color = color;
|
||||
|
||||
@@ -517,11 +517,11 @@ void LifeStream::DrawPrimitives()
|
||||
//
|
||||
// draw right edge
|
||||
//
|
||||
v[iNumV++].p = D3DXVECTOR3( fX, -0.5f, 0 );
|
||||
v[iNumV++].p = D3DXVECTOR3( fX, 0.5f, 0 );
|
||||
v[iNumV++].p = RageVector3( fX, -0.5f, 0 );
|
||||
v[iNumV++].p = RageVector3( fX, 0.5f, 0 );
|
||||
|
||||
iNumV -= 2;
|
||||
const D3DXCOLOR color = GetColor( fPercentIntoSection );
|
||||
const RageColor color = GetColor( fPercentIntoSection );
|
||||
v[iNumV++].color = color;
|
||||
v[iNumV++].color = color;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ void LifeMeterBattery::Load( PlayerNumber pn )
|
||||
this->AddChild( &m_sprBattery );
|
||||
|
||||
m_textNumLives.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery life numbers") );
|
||||
m_textNumLives.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textNumLives.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textNumLives.TurnShadowOff();
|
||||
if( bPlayerEnabled )
|
||||
this->AddChild( &m_textNumLives );
|
||||
|
||||
@@ -77,7 +77,7 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
|
||||
|
||||
m_Background.LoadFromAniDir( sBackgroundPath );
|
||||
|
||||
m_quadBrightness.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_quadBrightness.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||
|
||||
m_sprTopEdge.Load( sTopEdgePath );
|
||||
@@ -87,7 +87,7 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
|
||||
m_sprStyleIcon.StopAnimating();
|
||||
m_sprStyleIcon.SetXY( STYLE_ICON_X, STYLE_ICON_Y );
|
||||
if( GAMESTATE->m_CurStyle == STYLE_NONE || !bShowStyleIcon )
|
||||
m_sprStyleIcon.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprStyleIcon.SetDiffuse( RageColor(1,1,1,0) );
|
||||
else
|
||||
{
|
||||
int iRowNum = GetStyleIndexRelativeToGame( GAMESTATE->m_CurGame, GAMESTATE->m_CurStyle );
|
||||
@@ -226,9 +226,9 @@ void MenuElements::TweenBottomLayerOnScreen()
|
||||
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
|
||||
m_sprBottomEdge.SetTweenY( fOriginalY );
|
||||
|
||||
m_quadBrightness.SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBrightness.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
|
||||
m_quadBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_quadBrightness.SetTweenDiffuse( RageColor(0,0,0,0) );
|
||||
}
|
||||
|
||||
void MenuElements::TweenBottomLayerOffScreen()
|
||||
@@ -238,11 +238,11 @@ void MenuElements::TweenBottomLayerOffScreen()
|
||||
m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 );
|
||||
m_sprBottomEdge.SetTweenY( fOriginalY + 100 );
|
||||
|
||||
m_quadBrightness.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_quadBrightness.StopTweening();
|
||||
m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep
|
||||
m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade
|
||||
m_quadBrightness.SetTweenDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quadBrightness.SetTweenDiffuse( RageColor(0,0,0,1) );
|
||||
}
|
||||
|
||||
void MenuElements::TweenOnScreenFromBlack( ScreenMessage smSendWhenDone )
|
||||
|
||||
@@ -84,8 +84,8 @@ void MenuTimer::Update( float fDeltaTime )
|
||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("hurry up") );
|
||||
else if( fOldSecondsLeft > 5 && fNewSecondsLeft < 5 ) // transition to below 5
|
||||
{
|
||||
m_textDigit1.SetEffectGlowing( 10, D3DXCOLOR(1,0,0,0), D3DXCOLOR(1,0,0,1) );
|
||||
m_textDigit2.SetEffectGlowing( 10, D3DXCOLOR(1,0,0,0), D3DXCOLOR(1,0,0,1) );
|
||||
m_textDigit1.SetEffectGlowing( 10, RageColor(1,0,0,0), RageColor(1,0,0,1) );
|
||||
m_textDigit2.SetEffectGlowing( 10, RageColor(1,0,0,0), RageColor(1,0,0,1) );
|
||||
m_soundBeep.Play();
|
||||
}
|
||||
else if( fOldSecondsLeft > 4 && fNewSecondsLeft < 4 ) // transition to below 4
|
||||
|
||||
@@ -56,10 +56,10 @@ public:
|
||||
virtual void SetRotationX( float rot ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetRotationX(rot); }
|
||||
virtual void SetRotationY( float rot ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetRotationY(rot); }
|
||||
|
||||
virtual void SetDiffuse( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetDiffuse(c); };
|
||||
virtual D3DXCOLOR GetDiffuse() { return m_sprites[0].GetDiffuse(); };
|
||||
virtual void SetGlow( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetGlow(c); };
|
||||
virtual D3DXCOLOR GetGlow() { return m_sprites[0].GetGlow(); };
|
||||
virtual void SetDiffuse( RageColor c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetDiffuse(c); };
|
||||
virtual RageColor GetDiffuse() { return m_sprites[0].GetDiffuse(); };
|
||||
virtual void SetGlow( RageColor c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetGlow(c); };
|
||||
virtual RageColor GetGlow() { return m_sprites[0].GetGlow(); };
|
||||
|
||||
|
||||
// The blur is made by delaying the tweens
|
||||
@@ -89,8 +89,8 @@ public:
|
||||
virtual void SetTweenRotationX( float r ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenRotationX(r); };
|
||||
virtual void SetTweenRotationY( float r ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenRotationY(r); };
|
||||
virtual void SetTweenRotationZ( float r ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenRotationZ(r); };
|
||||
virtual void SetTweenDiffuse( D3DXCOLOR c ){ for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenDiffuse(c); };
|
||||
virtual void SetTweenGlow( D3DXCOLOR c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenGlow(c); };
|
||||
virtual void SetTweenDiffuse( RageColor c ){ for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenDiffuse(c); };
|
||||
virtual void SetTweenGlow( RageColor c ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetTweenGlow(c); };
|
||||
|
||||
|
||||
void ScaleToCover( LPRECT rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleToCover(rect); };
|
||||
|
||||
@@ -86,10 +86,10 @@ void MusicList::TweenOnScreen()
|
||||
{
|
||||
for( int i=0; i<TITLES_COLUMNS; i++ )
|
||||
{
|
||||
m_textTitles[i].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textTitles[i].SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_textTitles[i].BeginTweening( 0.5f );
|
||||
m_textTitles[i].BeginTweening( 0.5f );
|
||||
m_textTitles[i].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textTitles[i].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,6 +99,6 @@ void MusicList::TweenOffScreen()
|
||||
{
|
||||
m_textTitles[i].BeginTweening( 0.7f );
|
||||
m_textTitles[i].BeginTweening( 0.5f );
|
||||
m_textTitles[i].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textTitles[i].SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,13 +31,13 @@ void MusicStatusDisplay::SetType( IconType type )
|
||||
{
|
||||
m_type = type;
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
switch( type )
|
||||
{
|
||||
case none:
|
||||
SetEffectNone();
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
SetDiffuse( RageColor(1,1,1,0) );
|
||||
break;
|
||||
case easy:
|
||||
SetEffectNone();
|
||||
|
||||
@@ -48,14 +48,14 @@
|
||||
|
||||
float g_fItemSpacingY; // cache
|
||||
|
||||
inline D3DXCOLOR GetNextSectionColor() {
|
||||
inline RageColor GetNextSectionColor() {
|
||||
static int i=0;
|
||||
i = i % NUM_SECTION_COLORS;
|
||||
return SECTION_COLORS(i++);
|
||||
}
|
||||
|
||||
|
||||
WheelItemData::WheelItemData( WheelItemType wit, Song* pSong, const CString &sSectionName, Course* pCourse, const D3DXCOLOR color )
|
||||
WheelItemData::WheelItemData( WheelItemType wit, Song* pSong, const CString &sSectionName, Course* pCourse, const RageColor color )
|
||||
{
|
||||
m_WheelItemType = wit;
|
||||
m_pSong = pSong;
|
||||
@@ -144,7 +144,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
|
||||
case TYPE_SONG:
|
||||
{
|
||||
m_TextBanner.LoadFromSong( m_pSong );
|
||||
D3DXCOLOR color = m_color;
|
||||
RageColor color = m_color;
|
||||
m_TextBanner.SetDiffuse( color );
|
||||
m_MusicStatusDisplay.SetType( m_IconType );
|
||||
RefreshGrades();
|
||||
@@ -179,7 +179,7 @@ void WheelItemDisplay::RefreshGrades()
|
||||
{
|
||||
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) )
|
||||
{
|
||||
m_GradeDisplay[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_GradeDisplay[p].SetDiffuse( RageColor(1,1,1,0) );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -259,11 +259,11 @@ void WheelItemDisplay::DrawPrimitives()
|
||||
m_GradeDisplay[p].Draw();
|
||||
if( m_fPercentGray > 0 )
|
||||
{
|
||||
m_sprSongBar.SetGlow( D3DXCOLOR(0,0,0,m_fPercentGray) );
|
||||
m_sprSongBar.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_sprSongBar.SetGlow( RageColor(0,0,0,m_fPercentGray) );
|
||||
m_sprSongBar.SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_sprSongBar.Draw();
|
||||
m_sprSongBar.SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_sprSongBar.SetGlow( D3DXCOLOR(0,0,0,0) );
|
||||
m_sprSongBar.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_sprSongBar.SetGlow( RageColor(0,0,0,0) );
|
||||
}
|
||||
break;
|
||||
case TYPE_COURSE:
|
||||
@@ -290,8 +290,8 @@ MusicWheel::MusicWheel()
|
||||
|
||||
m_sprSelectionOverlay.Load( THEME->GetPathTo("Graphics","select music song highlight") );
|
||||
m_sprSelectionOverlay.SetXY( 0, 0 );
|
||||
m_sprSelectionOverlay.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprSelectionOverlay.SetEffectGlowing( 1.0f, D3DXCOLOR(1,1,1,0.4f), D3DXCOLOR(1,1,1,1) );
|
||||
m_sprSelectionOverlay.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprSelectionOverlay.SetEffectGlowing( 1.0f, RageColor(1,1,1,0.4f), RageColor(1,1,1,1) );
|
||||
AddChild( &m_sprSelectionOverlay );
|
||||
|
||||
m_ScrollBar.SetX( SCROLL_BAR_X );
|
||||
@@ -501,7 +501,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
{
|
||||
// make WheelItemDatas with sections
|
||||
CString sLastSection = "";
|
||||
D3DXCOLOR colorSection;
|
||||
RageColor colorSection;
|
||||
for( int i=0; i< arraySongs.GetSize(); i++ )
|
||||
{
|
||||
Song* pSong = arraySongs[i];
|
||||
@@ -536,7 +536,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
|
||||
if( !bRoulette )
|
||||
{
|
||||
arrayWheelItemDatas.Add( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, D3DXCOLOR(1,0,0,1)) );
|
||||
arrayWheelItemDatas.Add( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, RageColor(1,0,0,1)) );
|
||||
}
|
||||
|
||||
// HACK: Add extra stage item if it isn't already present on the music wheel
|
||||
@@ -628,7 +628,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
|
||||
if( arrayWheelItemDatas.GetSize() == 0 )
|
||||
{
|
||||
arrayWheelItemDatas.Add( WheelItemData(TYPE_SECTION, NULL, "- EMPTY -", NULL, D3DXCOLOR(1,0,0,1)) );
|
||||
arrayWheelItemDatas.Add( WheelItemData(TYPE_SECTION, NULL, "- EMPTY -", NULL, RageColor(1,0,0,1)) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -870,7 +870,7 @@ void MusicWheel::Update( float fDeltaTime )
|
||||
// m_soundExpand.Play();
|
||||
// m_WheelState = STATE_ROULETTE_SPINNING;
|
||||
// m_SortOrder = SORT_GROUP;
|
||||
// m_MusicSortDisplay.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
// m_MusicSortDisplay.SetDiffuse( RageColor(1,1,1,0) );
|
||||
// m_MusicSortDisplay.SetEffectNone();
|
||||
// BuildWheelItemDatas( m_WheelItemDatas[SORT_GROUP], SORT_GROUP, true );
|
||||
// }
|
||||
|
||||
@@ -42,13 +42,13 @@ struct WheelItemData
|
||||
{
|
||||
public:
|
||||
WheelItemData() {}; // this is needed to use a CArray of these
|
||||
WheelItemData( WheelItemType wit, Song* pSong, const CString &sSectionName, Course* pCourse, const D3DXCOLOR color );
|
||||
WheelItemData( WheelItemType wit, Song* pSong, const CString &sSectionName, Course* pCourse, const RageColor color );
|
||||
|
||||
WheelItemType m_WheelItemType;
|
||||
CString m_sSectionName;
|
||||
Course* m_pCourse;
|
||||
Song* m_pSong;
|
||||
D3DXCOLOR m_color; // either text color or section background color
|
||||
RageColor m_color; // either text color or section background color
|
||||
MusicStatusDisplay::IconType m_IconType;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: NetworkInput
|
||||
|
||||
Desc: An input event specific to a menu navigation. This is generated based
|
||||
on a GameDef.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
struct NetworkInput
|
||||
{
|
||||
NetworkInput() { MakeInvalid(); };
|
||||
NetworkInput( PlayerNumber pn, MenuButton b ) { player = pn; button = b; };
|
||||
|
||||
PlayerNumber player;
|
||||
MenuButton button;
|
||||
|
||||
// bool operator==( const NetworkInput &other ) { return player == other.player && button == other.button; };
|
||||
|
||||
inline bool IsValid() const { return player != PLAYER_INVALID; };
|
||||
inline void MakeInvalid() { player = PLAYER_INVALID; button = MENU_BUTTON_INVALID; };
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "RageException.h"
|
||||
#include "GameState.h"
|
||||
#include "math.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
|
||||
bool bSuccess;
|
||||
do
|
||||
{
|
||||
D3DXCOLOR color;
|
||||
RageColor color;
|
||||
int retval = fscanf( fp, "%f,%f,%f,%f\n", &color.r, &color.g, &color.b, &color.a );
|
||||
bSuccess = (retval == 4);
|
||||
if( bSuccess )
|
||||
@@ -73,7 +73,7 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn )
|
||||
} while( bSuccess );
|
||||
|
||||
if( m_colorTapTweens.GetSize() == 0 )
|
||||
m_colorTapTweens.Add( D3DXCOLOR(1,1,1,1) );
|
||||
m_colorTapTweens.Add( RageColor(1,1,1,1) );
|
||||
|
||||
fclose( fp );
|
||||
return;
|
||||
@@ -98,7 +98,7 @@ int NoteDisplay::GetTapColorFrameNo( const float fNoteBeat )
|
||||
return GetTapGrayFrameNo(fNoteBeat) + 1;
|
||||
}
|
||||
|
||||
void NoteDisplay::GetTapEdgeColors( const float fNoteBeat, D3DXCOLOR &colorLeadingOut, D3DXCOLOR &colorTrailingOut )
|
||||
void NoteDisplay::GetTapEdgeColors( const float fNoteBeat, RageColor &colorLeadingOut, RageColor &colorTrailingOut )
|
||||
{
|
||||
// Chris: If EZ2 doesn't use a color part, leave that part of the NoteSkin graphic empty
|
||||
//
|
||||
@@ -162,7 +162,7 @@ void NoteDisplay::GetTapEdgeColors( const float fNoteBeat, D3DXCOLOR &colorLeadi
|
||||
|
||||
if( ct == PlayerOptions::COLOR_NOTE )
|
||||
{
|
||||
D3DXCOLOR color = GetNoteColorFromBeat( fNoteBeat );
|
||||
RageColor color = GetNoteColorFromBeat( fNoteBeat );
|
||||
colorLeadingOut = color;
|
||||
colorTrailingOut = color;
|
||||
|
||||
@@ -257,10 +257,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fColorScale = SCALE(fLife,0,1,0.2f,1);
|
||||
const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const D3DXCOLOR colorGlowTop = D3DXCOLOR(1,1,1,fGlowTop);
|
||||
const D3DXCOLOR colorGlowBottom = D3DXCOLOR(1,1,1,fGlowBottom);
|
||||
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
|
||||
const RageColor colorGlowBottom = RageColor(1,1,1,fGlowBottom);
|
||||
|
||||
// the shift by -0.5 is to align texels to pixels
|
||||
|
||||
@@ -270,10 +270,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
continue;
|
||||
|
||||
DISPLAY->AddQuad(
|
||||
D3DXVECTOR3(fXTopLeft-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, D3DXVECTOR2(fTexCoordLeft, fTexCoordTop), // colorGlowTop, // top-left
|
||||
D3DXVECTOR3(fXTopRight-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, D3DXVECTOR2(fTexCoordRight, fTexCoordTop), // colorGlowTop, // top-right
|
||||
D3DXVECTOR3(fXBottomLeft-0.5f, fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, D3DXVECTOR2(fTexCoordLeft, fTexCoordBottom),// colorGlowBottom, // bottom-left
|
||||
D3DXVECTOR3(fXBottomRight-0.5f,fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, D3DXVECTOR2(fTexCoordRight, fTexCoordBottom) );//, colorGlowBottom ); // bottom-right
|
||||
RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, RageVector2(fTexCoordLeft, fTexCoordTop), // colorGlowTop, // top-left
|
||||
RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, RageVector2(fTexCoordRight, fTexCoordTop), // colorGlowTop, // top-right
|
||||
RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, RageVector2(fTexCoordLeft, fTexCoordBottom),// colorGlowBottom, // bottom-left
|
||||
RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, RageVector2(fTexCoordRight, fTexCoordBottom) );//, colorGlowBottom ); // bottom-right
|
||||
}
|
||||
|
||||
//
|
||||
@@ -300,10 +300,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fColorScale = SCALE(fLife,0,1,0.2f,1);
|
||||
const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const D3DXCOLOR colorGlowTop = D3DXCOLOR(1,1,1,fGlowTop);
|
||||
const D3DXCOLOR colorGlowBottom = D3DXCOLOR(1,1,1,fGlowBottom);
|
||||
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
|
||||
const RageColor colorGlowBottom = RageColor(1,1,1,fGlowBottom);
|
||||
|
||||
if( bDrawGlowOnly && colorGlowTop.a==0 && colorGlowBottom.a==0 )
|
||||
continue;
|
||||
@@ -311,10 +311,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
continue;
|
||||
|
||||
DISPLAY->AddQuad(
|
||||
D3DXVECTOR3(fXTopLeft-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, D3DXVECTOR2(fTexCoordLeft, fTexCoordTop), //colorGlowTop, // top-left
|
||||
D3DXVECTOR3(fXTopRight-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, D3DXVECTOR2(fTexCoordRight, fTexCoordTop), //colorGlowTop, // top-right
|
||||
D3DXVECTOR3(fXBottomLeft-0.5f, fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, D3DXVECTOR2(fTexCoordLeft, fTexCoordBottom), //colorGlowBottom, // bottom-left
|
||||
D3DXVECTOR3(fXBottomRight-0.5f,fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, D3DXVECTOR2(fTexCoordRight, fTexCoordBottom) );//, colorGlowBottom ); // bottom-right
|
||||
RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, RageVector2(fTexCoordLeft, fTexCoordTop), //colorGlowTop, // top-left
|
||||
RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, RageVector2(fTexCoordRight, fTexCoordTop), //colorGlowTop, // top-right
|
||||
RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, RageVector2(fTexCoordLeft, fTexCoordBottom), //colorGlowBottom, // bottom-left
|
||||
RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, RageVector2(fTexCoordRight, fTexCoordBottom) );//, colorGlowBottom ); // bottom-right
|
||||
}
|
||||
|
||||
if( g_bDrawTapOnTopOfHoldHead )
|
||||
@@ -345,10 +345,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fColorScale = SCALE(fLife,0,1,0.2f,1);
|
||||
const D3DXCOLOR colorDiffuseTop = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const D3DXCOLOR colorDiffuseBottom = D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const D3DXCOLOR colorGlowTop = D3DXCOLOR(1,1,1,fGlowTop);
|
||||
const D3DXCOLOR colorGlowBottom = D3DXCOLOR(1,1,1,fGlowBottom);
|
||||
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
|
||||
const RageColor colorGlowBottom = RageColor(1,1,1,fGlowBottom);
|
||||
|
||||
// the shift by -0.5 is to align texels to pixels
|
||||
|
||||
@@ -358,10 +358,10 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
continue;
|
||||
|
||||
DISPLAY->AddQuad(
|
||||
D3DXVECTOR3(fXTopLeft-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, D3DXVECTOR2(fTexCoordLeft, fTexCoordTop), // colorGlowTop, // top-left
|
||||
D3DXVECTOR3(fXTopRight-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, D3DXVECTOR2(fTexCoordRight, fTexCoordTop), // colorGlowTop, // top-right
|
||||
D3DXVECTOR3(fXBottomLeft-0.5f, fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, D3DXVECTOR2(fTexCoordLeft, fTexCoordBottom),// colorGlowBottom, // bottom-left
|
||||
D3DXVECTOR3(fXBottomRight-0.5f,fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, D3DXVECTOR2(fTexCoordRight, fTexCoordBottom) );//, colorGlowBottom ); // bottom-right
|
||||
RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, RageVector2(fTexCoordLeft, fTexCoordTop), // colorGlowTop, // top-left
|
||||
RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0), bDrawGlowOnly ? colorGlowTop : colorDiffuseTop, RageVector2(fTexCoordRight, fTexCoordTop), // colorGlowTop, // top-right
|
||||
RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, RageVector2(fTexCoordLeft, fTexCoordBottom),// colorGlowBottom, // bottom-left
|
||||
RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0), bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom, RageVector2(fTexCoordRight, fTexCoordBottom) );//, colorGlowBottom ); // bottom-right
|
||||
}
|
||||
|
||||
DISPLAY->FlushQueue();
|
||||
@@ -377,8 +377,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, fY, fPercentFadeToFail );
|
||||
const float fColorScale = SCALE(fLife,0,1,0.2f,1);
|
||||
const D3DXCOLOR colorDiffuse= D3DXCOLOR(fColorScale,fColorScale,fColorScale,fAlpha);
|
||||
const D3DXCOLOR colorGlow = D3DXCOLOR(1,1,1,fGlow);
|
||||
const RageColor colorDiffuse= RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
|
||||
const RageColor colorGlow = RageColor(1,1,1,fGlow);
|
||||
|
||||
// m_sprHoldParts.SetState( bActive?1:0 );
|
||||
// HACK: the border around the edge of on this sprite is super-obvious.
|
||||
@@ -386,13 +386,13 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
m_sprHoldParts.SetXY( fX, fY );
|
||||
if( bDrawGlowOnly )
|
||||
{
|
||||
m_sprHoldParts.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprHoldParts.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprHoldParts.SetGlow( colorGlow );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sprHoldParts.SetDiffuse( colorDiffuse );
|
||||
m_sprHoldParts.SetGlow( D3DXCOLOR(0,0,0,0) );
|
||||
m_sprHoldParts.SetGlow( RageColor(0,0,0,0) );
|
||||
}
|
||||
m_sprHoldParts.Draw();
|
||||
}
|
||||
@@ -422,9 +422,9 @@ void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bOnSame
|
||||
const int iColorPartFrameNo = GetTapColorFrameNo( fBeat );
|
||||
const float fColorScale = SCALE(fLife,0,1,0.2f,1);
|
||||
|
||||
D3DXCOLOR colorGrayPart = D3DXCOLOR(fColorScale,fColorScale,fColorScale,1);
|
||||
D3DXCOLOR colorLeadingEdge;
|
||||
D3DXCOLOR colorTrailingEdge;
|
||||
RageColor colorGrayPart = RageColor(fColorScale,fColorScale,fColorScale,1);
|
||||
RageColor colorLeadingEdge;
|
||||
RageColor colorTrailingEdge;
|
||||
GetTapEdgeColors( fBeat, colorLeadingEdge, colorTrailingEdge );
|
||||
colorGrayPart.a *= fAlpha;
|
||||
colorLeadingEdge.a *= fAlpha;
|
||||
@@ -444,7 +444,7 @@ void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bOnSame
|
||||
//
|
||||
m_sprHoldParts.SetXY( fXPos, fYPos );
|
||||
m_sprHoldParts.SetDiffuse( colorGrayPart );
|
||||
m_sprHoldParts.SetGlow( D3DXCOLOR(1,1,1,fGlow) );
|
||||
m_sprHoldParts.SetGlow( RageColor(1,1,1,fGlow) );
|
||||
m_sprHoldParts.StopUsingCustomCoords();
|
||||
m_sprHoldParts.SetState( 0 );
|
||||
m_sprHoldParts.Draw();
|
||||
@@ -453,7 +453,7 @@ void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bOnSame
|
||||
{
|
||||
m_sprTapParts.SetXY( fXPos, fYPos );
|
||||
m_sprTapParts.SetRotation( fRotation );
|
||||
m_sprTapParts.SetGlow( D3DXCOLOR(1,1,1,fGlow) );
|
||||
m_sprTapParts.SetGlow( RageColor(1,1,1,fGlow) );
|
||||
|
||||
//
|
||||
// draw gray part
|
||||
|
||||
@@ -29,12 +29,12 @@ public:
|
||||
protected:
|
||||
int GetTapGrayFrameNo( const float fNoteBeat );
|
||||
int GetTapColorFrameNo( const float fNoteBeat );
|
||||
void GetTapEdgeColors( const float fNoteBeat, D3DXCOLOR &colorLeadingOut, D3DXCOLOR &colorTrailingOut );
|
||||
void GetTapEdgeColors( const float fNoteBeat, RageColor &colorLeadingOut, RageColor &colorTrailingOut );
|
||||
|
||||
PlayerNumber m_PlayerNumber; // to look up PlayerOptions
|
||||
|
||||
Sprite m_sprTapParts; // for now, must be an even number of frames
|
||||
Sprite m_sprHoldParts; // for now, must be 8 frames
|
||||
|
||||
CArray<D3DXCOLOR,D3DXCOLOR> m_colorTapTweens;
|
||||
CArray<RageColor,RageColor> m_colorTapTweens;
|
||||
};
|
||||
|
||||
+10
-10
@@ -89,11 +89,11 @@ void NoteField::DrawMeasureBar( int iMeasureIndex )
|
||||
m_rectMeasureBar.SetXY( 0, fYPos );
|
||||
m_rectMeasureBar.SetZoomX( (float)(m_iNumTracks+1) * ARROW_SIZE );
|
||||
m_rectMeasureBar.SetZoomY( 20 );
|
||||
m_rectMeasureBar.SetDiffuse( D3DXCOLOR(0,0,0,0.5f) );
|
||||
m_rectMeasureBar.SetDiffuse( RageColor(0,0,0,0.5f) );
|
||||
m_rectMeasureBar.Draw();
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,0) );
|
||||
m_textMeasureNumber.SetText( ssprintf("%d", iMeasureNoDisplay) );
|
||||
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 + 10, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
@@ -107,7 +107,7 @@ void NoteField::DrawMarkerBar( const float fBeat )
|
||||
m_rectMarkerBar.SetXY( 0, fYPos );
|
||||
m_rectMarkerBar.SetZoomX( (float)(m_iNumTracks+1) * ARROW_SIZE );
|
||||
m_rectMarkerBar.SetZoomY( 20 );
|
||||
m_rectMarkerBar.SetDiffuse( D3DXCOLOR(0,0,0,0.5f) );
|
||||
m_rectMarkerBar.SetDiffuse( RageColor(0,0,0,0.5f) );
|
||||
m_rectMarkerBar.Draw();
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ void NoteField::DrawBPMText( const float fBeat, const float fBPM )
|
||||
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
|
||||
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(1,0,0,1) );
|
||||
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(1,0,0,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetText( ssprintf("%.2f", fBPM) );
|
||||
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 - 60, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
@@ -128,8 +128,8 @@ void NoteField::DrawFreezeText( const float fBeat, const float fSecs )
|
||||
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
|
||||
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(0.8f,0.8f,0,1) );
|
||||
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(0.8f,0.8f,0,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetText( ssprintf("%.2f", fSecs) );
|
||||
m_textMeasureNumber.SetXY( -m_rectMeasureBar.GetZoomedWidth()/2 - 10, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
@@ -140,8 +140,8 @@ void NoteField::DrawBGChangeText( const float fBeat, const CString sNewBGName )
|
||||
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
|
||||
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
|
||||
|
||||
m_textMeasureNumber.SetDiffuse( D3DXCOLOR(0,1,0,1) );
|
||||
m_textMeasureNumber.SetGlow( D3DXCOLOR(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetDiffuse( RageColor(0,1,0,1) );
|
||||
m_textMeasureNumber.SetGlow( RageColor(1,1,1,cosf(TIMER->GetTimeSinceStart()*2)/2+0.5f) );
|
||||
m_textMeasureNumber.SetText( sNewBGName );
|
||||
m_textMeasureNumber.SetXY( +m_rectMeasureBar.GetZoomedWidth()/2 + 10, fYPos );
|
||||
m_textMeasureNumber.Draw();
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
#include "NoteTypes.h"
|
||||
|
||||
|
||||
D3DXCOLOR NoteTypeToColor( NoteType nt )
|
||||
RageColor NoteTypeToColor( NoteType nt )
|
||||
{
|
||||
switch( nt )
|
||||
{
|
||||
case NOTE_TYPE_4TH: return D3DXCOLOR(1,0,0,1); // red
|
||||
case NOTE_TYPE_8TH: return D3DXCOLOR(0,0,1,1); // blue
|
||||
case NOTE_TYPE_12TH: return D3DXCOLOR(1,0,1,1); // purple
|
||||
case NOTE_TYPE_16TH: return D3DXCOLOR(1,1,0,1); // yellow
|
||||
case NOTE_TYPE_24TH: return D3DXCOLOR(0,1,1,1); // light blue
|
||||
case NOTE_TYPE_4TH: return RageColor(1,0,0,1); // red
|
||||
case NOTE_TYPE_8TH: return RageColor(0,0,1,1); // blue
|
||||
case NOTE_TYPE_12TH: return RageColor(1,0,1,1); // purple
|
||||
case NOTE_TYPE_16TH: return RageColor(1,1,0,1); // yellow
|
||||
case NOTE_TYPE_24TH: return RageColor(0,1,1,1); // light blue
|
||||
default:
|
||||
ASSERT(0);
|
||||
case NOTE_TYPE_32ND: // fall through
|
||||
return D3DXCOLOR(0.5f,0.5f,0.5f,1); // gray
|
||||
return RageColor(0.5f,0.5f,0.5f,1); // gray
|
||||
}
|
||||
};
|
||||
|
||||
@@ -58,12 +58,12 @@ bool IsNoteOfType( int iNoteIndex, NoteType t )
|
||||
return GetNoteType(iNoteIndex) == t;
|
||||
}
|
||||
|
||||
D3DXCOLOR GetNoteColorFromIndex( int iIndex )
|
||||
RageColor GetNoteColorFromIndex( int iIndex )
|
||||
{
|
||||
return NoteTypeToColor( GetNoteType(iIndex) );
|
||||
}
|
||||
|
||||
D3DXCOLOR GetNoteColorFromBeat( float fBeat )
|
||||
RageColor GetNoteColorFromBeat( float fBeat )
|
||||
{
|
||||
return GetNoteColorFromIndex( BeatToNoteRow(fBeat) );
|
||||
}
|
||||
|
||||
@@ -71,12 +71,12 @@ enum NoteType
|
||||
NOTE_TYPE_INVALID
|
||||
};
|
||||
|
||||
D3DXCOLOR NoteTypeToColor( NoteType nt );
|
||||
RageColor NoteTypeToColor( NoteType nt );
|
||||
float NoteTypeToBeat( NoteType nt );
|
||||
NoteType GetNoteType( int iNoteIndex );
|
||||
bool IsNoteOfType( int iNoteIndex, NoteType t );
|
||||
D3DXCOLOR GetNoteColorFromIndex( int iNoteIndex );
|
||||
D3DXCOLOR GetNoteColorFromBeat( float fBeat );
|
||||
RageColor GetNoteColorFromIndex( int iNoteIndex );
|
||||
RageColor GetNoteColorFromBeat( float fBeat );
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ NotesDisplayType Notes::GetNotesDisplayType() const
|
||||
}
|
||||
}
|
||||
|
||||
D3DXCOLOR Notes::GetColor() const
|
||||
RageColor Notes::GetColor() const
|
||||
{
|
||||
switch( GetNotesDisplayType() )
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
void GetNoteData( NoteData* pNoteDataOut ) const;
|
||||
void SetNoteData( NoteData* pNewNoteData );
|
||||
NotesDisplayType GetNotesDisplayType() const;
|
||||
D3DXCOLOR GetColor() const;
|
||||
RageColor GetColor() const;
|
||||
|
||||
// Statistics
|
||||
Grade m_TopGrade;
|
||||
|
||||
+13
-12
@@ -22,6 +22,7 @@
|
||||
#include "SongManager.h"
|
||||
#include "GameState.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageMath.h"
|
||||
|
||||
|
||||
#define JUDGE_PERFECT_ZOOM_X THEME->GetMetricF("Player","JudgePerfectZoomX")
|
||||
@@ -283,7 +284,7 @@ void Player::DrawPrimitives()
|
||||
{
|
||||
m_frameCombo.Draw(); // draw this below everything else
|
||||
|
||||
D3DXMATRIX matOldView, matOldProj;
|
||||
RageMatrix matOldView, matOldProj;
|
||||
|
||||
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_bEffects[PlayerOptions::EFFECT_SPACE] )
|
||||
{
|
||||
@@ -292,26 +293,26 @@ void Player::DrawPrimitives()
|
||||
DISPLAY->GetProjectionTransform( &matOldProj );
|
||||
|
||||
// construct view and project matrix
|
||||
D3DXMATRIX matNewView;
|
||||
RageMatrix matNewView;
|
||||
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_bReverseScroll )
|
||||
D3DXMatrixLookAtLH(
|
||||
RageMatrixLookAtLH(
|
||||
&matNewView,
|
||||
&D3DXVECTOR3( CENTER_X, GetY()-300.0f, 400.0f ),
|
||||
&D3DXVECTOR3( CENTER_X, GetY()+100.0f, 0.0f ),
|
||||
&D3DXVECTOR3( 0.0f, -1.0f, 0.0f )
|
||||
&RageVector3( CENTER_X, GetY()-300.0f, 400.0f ),
|
||||
&RageVector3( CENTER_X, GetY()+100.0f, 0.0f ),
|
||||
&RageVector3( 0.0f, -1.0f, 0.0f )
|
||||
);
|
||||
else
|
||||
D3DXMatrixLookAtLH(
|
||||
RageMatrixLookAtLH(
|
||||
&matNewView,
|
||||
&D3DXVECTOR3( CENTER_X, GetY()+800.0f, 400.0f ),
|
||||
&D3DXVECTOR3( CENTER_X, GetY()+400.0f, 0.0f ),
|
||||
&D3DXVECTOR3( 0.0f, -1.0f, 0.0f )
|
||||
&RageVector3( CENTER_X, GetY()+800.0f, 400.0f ),
|
||||
&RageVector3( CENTER_X, GetY()+400.0f, 0.0f ),
|
||||
&RageVector3( 0.0f, -1.0f, 0.0f )
|
||||
);
|
||||
|
||||
DISPLAY->SetViewTransform( &matNewView );
|
||||
|
||||
D3DXMATRIX matNewProj;
|
||||
D3DXMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f );
|
||||
RageMatrix matNewProj;
|
||||
RageMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f );
|
||||
DISPLAY->SetProjectionTransform( &matNewProj );
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "RageTimer.h"
|
||||
#include "RageException.h"
|
||||
#include "RageTexture.h"
|
||||
#include "RageMath.h"
|
||||
|
||||
|
||||
RageDisplay* DISPLAY = NULL;
|
||||
@@ -388,7 +389,7 @@ HRESULT RageDisplay::BeginFrame()
|
||||
|
||||
|
||||
m_pd3dDevice->SetVertexShader( D3DFVF_RAGEVERTEX );
|
||||
m_pd3dDevice->SetStreamSource( 0, m_pVB, sizeof(RAGEVERTEX) );
|
||||
m_pd3dDevice->SetStreamSource( 0, m_pVB, sizeof(RageVertex) );
|
||||
|
||||
|
||||
|
||||
@@ -468,7 +469,7 @@ void RageDisplay::CreateVertexBuffer()
|
||||
{
|
||||
HRESULT hr;
|
||||
if( FAILED( hr = m_pd3dDevice->CreateVertexBuffer(
|
||||
MAX_NUM_VERTICIES * sizeof(RAGEVERTEX),
|
||||
MAX_NUM_VERTICIES * sizeof(RageVertex),
|
||||
D3DUSAGE_WRITEONLY, D3DFVF_RAGEVERTEX,
|
||||
D3DPOOL_MANAGED, &m_pVB ) ) )
|
||||
throw RageException( hr, "Vertex Buffer Could Not Be Created" );
|
||||
@@ -481,65 +482,65 @@ void RageDisplay::ReleaseVertexBuffer()
|
||||
}
|
||||
|
||||
/*
|
||||
void RageDisplay::AddTriangle( const RAGEVERTEX& v[3] )
|
||||
void RageDisplay::AddTriangle( const RageVertex& v[3] )
|
||||
{
|
||||
COPY( &m_vertQueue[m_iNumVerts], v ); // do a big mem copy
|
||||
for( int i=0; i<3; i++ )
|
||||
D3DXVec3TransformCoord( &m_vertQueue[m_iNumVerts+i].p, v[i].p, &GetTopMatrix() );
|
||||
RageVec3TransformCoord( &m_vertQueue[m_iNumVerts+i].p, v[i].p, &GetTopMatrix() );
|
||||
m_iNumVerts+=3;
|
||||
}
|
||||
*/
|
||||
|
||||
void RageDisplay::AddQuad( const RAGEVERTEX v[4] ) // upper-left, upper-right, lower-left, lower-right
|
||||
void RageDisplay::AddQuad( const RageVertex v[4] ) // upper-left, upper-right, lower-left, lower-right
|
||||
{
|
||||
AddQuad(
|
||||
v[0].p, v[0].color, v[0].t,
|
||||
v[1].p, v[1].color, v[1].t,
|
||||
v[2].p, v[2].color, v[2].t,
|
||||
v[3].p, v[3].color, v[3].t );
|
||||
v[0].p, v[0].c, v[0].t,
|
||||
v[1].p, v[1].c, v[1].t,
|
||||
v[2].p, v[2].c, v[2].t,
|
||||
v[3].p, v[3].c, v[3].t );
|
||||
}
|
||||
void RageDisplay::AddFan( const RAGEVERTEX v[], int iNumPrimitives )
|
||||
void RageDisplay::AddFan( const RageVertex v[], int iNumPrimitives )
|
||||
{
|
||||
// HACK: This function does not take winding order into account. It will goof if you turn on culling.
|
||||
for( int i=0; i<iNumPrimitives; i++ )
|
||||
{
|
||||
AddTriangle(
|
||||
v[0+0].p, v[0+0].color, v[0+0].t,
|
||||
v[i+1].p, v[i+1].color, v[i+1].t,
|
||||
v[i+2].p, v[i+2].color, v[i+2].t
|
||||
v[0+0].p, v[0+0].c, v[0+0].t,
|
||||
v[i+1].p, v[i+1].c, v[i+1].t,
|
||||
v[i+2].p, v[i+2].c, v[i+2].t
|
||||
);
|
||||
}
|
||||
}
|
||||
void RageDisplay::AddStrip( const RAGEVERTEX v[], int iNumPrimitives )
|
||||
void RageDisplay::AddStrip( const RageVertex v[], int iNumPrimitives )
|
||||
{
|
||||
// HACK: This function does not take winding order into account. It will goof if you turn on culling.
|
||||
for( int i=0; i<iNumPrimitives; i++ )
|
||||
{
|
||||
AddTriangle(
|
||||
v[i+0].p, v[i+0].color, v[i+0].t,
|
||||
v[i+1].p, v[i+1].color, v[i+1].t,
|
||||
v[i+2].p, v[i+2].color, v[i+2].t
|
||||
v[i+0].p, v[i+0].c, v[i+0].t,
|
||||
v[i+1].p, v[i+1].c, v[i+1].t,
|
||||
v[i+2].p, v[i+2].c, v[i+2].t
|
||||
);
|
||||
}
|
||||
}
|
||||
void RageDisplay::AddTriangle(
|
||||
const D3DXVECTOR3& p0, const D3DCOLOR& c0, const D3DXVECTOR2& t0,
|
||||
const D3DXVECTOR3& p1, const D3DCOLOR& c1, const D3DXVECTOR2& t1,
|
||||
const D3DXVECTOR3& p2, const D3DCOLOR& c2, const D3DXVECTOR2& t2 )
|
||||
const RageVector3& p0, const D3DCOLOR& c0, const RageVector2& t0,
|
||||
const RageVector3& p1, const D3DCOLOR& c1, const RageVector2& t1,
|
||||
const RageVector3& p2, const D3DCOLOR& c2, const RageVector2& t2 )
|
||||
{
|
||||
ASSERT( m_iNumVerts < MAX_NUM_VERTICIES-3 );
|
||||
|
||||
// transform the verticies as we copy
|
||||
D3DXVec3TransformCoord( &m_vertQueue[m_iNumVerts].p, &p0, &GetTopMatrix() );
|
||||
m_vertQueue[m_iNumVerts].color = c0;
|
||||
RageVec3TransformCoord( &m_vertQueue[m_iNumVerts].p, &p0, &GetTopMatrix() );
|
||||
m_vertQueue[m_iNumVerts].c = c0;
|
||||
m_vertQueue[m_iNumVerts].t = t0;
|
||||
m_iNumVerts++;
|
||||
D3DXVec3TransformCoord( &m_vertQueue[m_iNumVerts].p, &p1, &GetTopMatrix() );
|
||||
m_vertQueue[m_iNumVerts].color = c1;
|
||||
RageVec3TransformCoord( &m_vertQueue[m_iNumVerts].p, &p1, &GetTopMatrix() );
|
||||
m_vertQueue[m_iNumVerts].c = c1;
|
||||
m_vertQueue[m_iNumVerts].t = t1;
|
||||
m_iNumVerts++;
|
||||
D3DXVec3TransformCoord( &m_vertQueue[m_iNumVerts].p, &p2, &GetTopMatrix() );
|
||||
m_vertQueue[m_iNumVerts].color = c2;
|
||||
RageVec3TransformCoord( &m_vertQueue[m_iNumVerts].p, &p2, &GetTopMatrix() );
|
||||
m_vertQueue[m_iNumVerts].c = c2;
|
||||
m_vertQueue[m_iNumVerts].t = t2;
|
||||
m_iNumVerts++;
|
||||
|
||||
@@ -550,10 +551,10 @@ void RageDisplay::AddTriangle(
|
||||
}
|
||||
|
||||
void RageDisplay::AddQuad(
|
||||
const D3DXVECTOR3 &p0, const D3DCOLOR& c0, const D3DXVECTOR2& t0, // upper-left
|
||||
const D3DXVECTOR3 &p1, const D3DCOLOR& c1, const D3DXVECTOR2& t1, // upper-right
|
||||
const D3DXVECTOR3 &p2, const D3DCOLOR& c2, const D3DXVECTOR2& t2, // lower-left
|
||||
const D3DXVECTOR3 &p3, const D3DCOLOR& c3, const D3DXVECTOR2& t3 ) // lower-right
|
||||
const RageVector3 &p0, const D3DCOLOR& c0, const RageVector2& t0, // upper-left
|
||||
const RageVector3 &p1, const D3DCOLOR& c1, const RageVector2& t1, // upper-right
|
||||
const RageVector3 &p2, const D3DCOLOR& c2, const RageVector2& t2, // lower-left
|
||||
const RageVector3 &p3, const D3DCOLOR& c3, const RageVector2& t3 ) // lower-right
|
||||
{
|
||||
// trangles must be in clockwise order in case we ever turn on clipping
|
||||
AddTriangle(
|
||||
@@ -572,13 +573,13 @@ void RageDisplay::FlushQueue()
|
||||
return;
|
||||
ASSERT( (m_iNumVerts % 3) == 0 );
|
||||
|
||||
m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLELIST, m_iNumVerts/3, m_vertQueue, sizeof(RAGEVERTEX) );
|
||||
m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLELIST, m_iNumVerts/3, m_vertQueue, sizeof(RageVertex) );
|
||||
m_iNumVerts = 0;
|
||||
|
||||
/*
|
||||
RAGEVERTEX* v;
|
||||
RageVertex* v;
|
||||
m_pVB->Lock( 0, 0, (BYTE**)&v, 0 );
|
||||
memcpy( v, m_vertQueue, sizeof(RAGEVERTEX)*m_iNumVerts );
|
||||
memcpy( v, m_vertQueue, sizeof(RageVertex)*m_iNumVerts );
|
||||
m_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, m_iNumVerts/3 );
|
||||
m_pVB->Unlock();
|
||||
m_iNumVerts = 0;
|
||||
@@ -587,30 +588,30 @@ void RageDisplay::FlushQueue()
|
||||
m_iDrawsSinceLastCheck++;
|
||||
}
|
||||
|
||||
void RageDisplay::SetViewTransform( const D3DXMATRIX* pMatrix )
|
||||
void RageDisplay::SetViewTransform( const RageMatrix* pMatrix )
|
||||
{
|
||||
FlushQueue();
|
||||
m_pd3dDevice->SetTransform( D3DTS_VIEW, pMatrix );
|
||||
m_pd3dDevice->SetTransform( D3DTS_VIEW, (D3DMATRIX*)pMatrix );
|
||||
}
|
||||
void RageDisplay::SetProjectionTransform( const D3DXMATRIX* pMatrix )
|
||||
void RageDisplay::SetProjectionTransform( const RageMatrix* pMatrix )
|
||||
{
|
||||
FlushQueue();
|
||||
m_pd3dDevice->SetTransform( D3DTS_PROJECTION, pMatrix );
|
||||
m_pd3dDevice->SetTransform( D3DTS_PROJECTION, (D3DMATRIX*)pMatrix );
|
||||
}
|
||||
void RageDisplay::GetViewTransform( D3DXMATRIX* pMatrixOut )
|
||||
void RageDisplay::GetViewTransform( RageMatrix* pMatrixOut )
|
||||
{
|
||||
m_pd3dDevice->GetTransform( D3DTS_VIEW, pMatrixOut );
|
||||
m_pd3dDevice->GetTransform( D3DTS_VIEW, (D3DMATRIX*)pMatrixOut );
|
||||
}
|
||||
void RageDisplay::GetProjectionTransform( D3DXMATRIX* pMatrixOut )
|
||||
void RageDisplay::GetProjectionTransform( RageMatrix* pMatrixOut )
|
||||
{
|
||||
m_pd3dDevice->GetTransform( D3DTS_PROJECTION, pMatrixOut );
|
||||
m_pd3dDevice->GetTransform( D3DTS_PROJECTION, (D3DMATRIX*)pMatrixOut );
|
||||
}
|
||||
|
||||
|
||||
void RageDisplay::ResetMatrixStack()
|
||||
{
|
||||
D3DXMATRIX ident;
|
||||
D3DXMatrixIdentity( &ident );
|
||||
RageMatrix ident;
|
||||
RageMatrixIdentity( &ident );
|
||||
m_MatrixStack.clear();
|
||||
m_MatrixStack.push_back(ident);
|
||||
}
|
||||
@@ -628,59 +629,59 @@ void RageDisplay::PopMatrix()
|
||||
|
||||
void RageDisplay::Translate( float x, float y, float z )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixTranslation( &matTemp, x, y, z );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTemp * matTop;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixTranslation( &matTemp, x, y, z );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTemp, &matTop );
|
||||
}
|
||||
|
||||
void RageDisplay::TranslateLocal( float x, float y, float z )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixTranslation( &matTemp, x, y, z );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTop * matTemp;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixTranslation( &matTemp, x, y, z );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTop, &matTemp );
|
||||
}
|
||||
|
||||
void RageDisplay::Scale( float x, float y, float z )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixScaling( &matTemp, x, y, z );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTemp * matTop;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixScaling( &matTemp, x, y, z );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTemp, &matTop );
|
||||
}
|
||||
|
||||
void RageDisplay::RotateX( float r )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixRotationX( &matTemp, r );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTemp * matTop;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixRotationX( &matTemp, r );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTemp, &matTop );
|
||||
}
|
||||
|
||||
void RageDisplay::RotateY( float r )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixRotationY( &matTemp, r );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTemp * matTop;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixRotationY( &matTemp, r );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTemp, &matTop );
|
||||
}
|
||||
|
||||
void RageDisplay::RotateZ( float r )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixRotationZ( &matTemp, r );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTemp * matTop;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixRotationZ( &matTemp, r );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTemp, &matTop );
|
||||
}
|
||||
|
||||
/*
|
||||
void RageDisplay::RotateYawPitchRoll( const float x, const float y, const float z )
|
||||
{
|
||||
D3DXMATRIX matTemp;
|
||||
D3DXMatrixRotationYawPitchRoll( &matTemp, x, y, z );
|
||||
D3DXMATRIX& matTop = GetTopMatrix();
|
||||
matTop = matTemp * matTop;
|
||||
RageMatrix matTemp;
|
||||
RageMatrixRotationYawPitchRoll( &matTemp, x, y, z );
|
||||
RageMatrix& matTop = GetTopMatrix();
|
||||
RageMatrixMultiply( &matTop, &matTemp, &matTop );
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
+33
-45
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifndef RAGEDISPLAY_H
|
||||
#define RAGEDISPLAY_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
Class: RageDisplay
|
||||
@@ -11,36 +12,17 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class RageDisplay;
|
||||
|
||||
|
||||
class RageTexture;
|
||||
#include <D3DX8.h>
|
||||
|
||||
// A structure for our custom vertex type. We added texture coordinates
|
||||
struct RAGEVERTEX
|
||||
{
|
||||
D3DXVECTOR3 p; // position
|
||||
D3DCOLOR color; // diffuse color
|
||||
D3DXVECTOR2 t; // texture coordinates
|
||||
};
|
||||
|
||||
// Our custom FVF, which describes our custom vertex structure
|
||||
#define D3DFVF_RAGEVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1)
|
||||
|
||||
|
||||
const int MAX_NUM_QUADS = 2048;
|
||||
//const int MAX_NUM_INDICIES = MAX_NUM_QUADS*3; // two triangles per quad
|
||||
const int MAX_NUM_VERTICIES = MAX_NUM_QUADS*4; // 4 verticies per quad
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Chris:
|
||||
// I did a lot of testing, and drawing indexed primitives is SLOWER than duplicating
|
||||
// verticies and not indexing. In fact, drawing indexed primitives is about 30% slower.
|
||||
// Drawing indexed primitives is 30% SLOWER than duplicating verticies on a TNT,
|
||||
// Win98 w/ latest drivers. In fact, drawing indexed primitives is about 30% slower.
|
||||
// Does this have something to do with poor usage of the vertex cache since we're using
|
||||
// DrawPrimitiveUP instead of DrawPrimitive?
|
||||
//
|
||||
|
||||
#include "D3D8.h"
|
||||
class RageTexture;
|
||||
#include "RageTypes.h"
|
||||
|
||||
class RageDisplay
|
||||
{
|
||||
@@ -72,10 +54,10 @@ public:
|
||||
unsigned GetBPP() const { return GetBPP( m_d3dpp.BackBufferFormat ); }
|
||||
|
||||
// LPDIRECT3DVERTEXBUFFER8 GetVertexBuffer() { return m_pVB; };
|
||||
void SetViewTransform( const D3DXMATRIX* pMatrix );
|
||||
void SetProjectionTransform( const D3DXMATRIX* pMatrix );
|
||||
void GetViewTransform( D3DXMATRIX* pMatrixOut );
|
||||
void GetProjectionTransform( D3DXMATRIX* pMatrixOut );
|
||||
void SetViewTransform( const RageMatrix* pMatrix );
|
||||
void SetProjectionTransform( const RageMatrix* pMatrix );
|
||||
void GetViewTransform( RageMatrix* pMatrixOut );
|
||||
void GetProjectionTransform( RageMatrix* pMatrixOut );
|
||||
|
||||
void ResetMatrixStack();
|
||||
void PushMatrix();
|
||||
@@ -99,7 +81,7 @@ private:
|
||||
unsigned GetBPP(D3DFORMAT fmt) const;
|
||||
HRESULT SetMode();
|
||||
D3DFORMAT FindBackBufferType(bool bWindowed, int iBPP);
|
||||
D3DXMATRIX& GetTopMatrix() { return m_MatrixStack.back(); }
|
||||
RageMatrix& GetTopMatrix() { return m_MatrixStack.back(); }
|
||||
|
||||
HWND m_hWnd;
|
||||
|
||||
@@ -118,7 +100,7 @@ private:
|
||||
void ReleaseVertexBuffer();
|
||||
|
||||
// OpenGL-like matrix stack
|
||||
CArray<D3DXMATRIX, D3DXMATRIX&> m_MatrixStack;
|
||||
CArray<RageMatrix, RageMatrix&> m_MatrixStack;
|
||||
|
||||
// for performance stats
|
||||
float m_fLastCheckTime;
|
||||
@@ -132,24 +114,28 @@ private:
|
||||
// Render Queue stuff
|
||||
//
|
||||
protected:
|
||||
RAGEVERTEX m_vertQueue[MAX_NUM_VERTICIES];
|
||||
|
||||
#define MAX_NUM_QUADS 2048
|
||||
#define MAX_NUM_VERTICIES (MAX_NUM_QUADS*4) // 4 verticies per quad
|
||||
|
||||
RageVertex m_vertQueue[MAX_NUM_VERTICIES];
|
||||
int m_iNumVerts;
|
||||
|
||||
public:
|
||||
// TODO: Elminiate vertex duplication using an index buffer. Would this work with OpenGL though?
|
||||
// void AddTriangle( const RAGEVERTEX v[3] );
|
||||
void AddQuad( const RAGEVERTEX v[4] ); // upper-left, upper-right, lower-left, lower-right
|
||||
void AddFan( const RAGEVERTEX v[], int iNumPrimitives );
|
||||
void AddStrip( const RAGEVERTEX v[], int iNumPrimitives );
|
||||
// void AddTriangle( const RageVertex v[3] );
|
||||
void AddQuad( const RageVertex v[4] ); // upper-left, upper-right, lower-left, lower-right
|
||||
void AddFan( const RageVertex v[], int iNumPrimitives );
|
||||
void AddStrip( const RageVertex v[], int iNumPrimitives );
|
||||
void AddTriangle(
|
||||
const D3DXVECTOR3& p0, const D3DCOLOR& c0, const D3DXVECTOR2& t0,
|
||||
const D3DXVECTOR3& p1, const D3DCOLOR& c1, const D3DXVECTOR2& t1,
|
||||
const D3DXVECTOR3& p2, const D3DCOLOR& c2, const D3DXVECTOR2& t2 );
|
||||
const RageVector3& p0, const D3DCOLOR& c0, const RageVector2& t0,
|
||||
const RageVector3& p1, const D3DCOLOR& c1, const RageVector2& t1,
|
||||
const RageVector3& p2, const D3DCOLOR& c2, const RageVector2& t2 );
|
||||
void AddQuad(
|
||||
const D3DXVECTOR3 &p0, const D3DCOLOR& c0, const D3DXVECTOR2& t0, // upper-left
|
||||
const D3DXVECTOR3 &p1, const D3DCOLOR& c1, const D3DXVECTOR2& t1, // upper-right
|
||||
const D3DXVECTOR3 &p2, const D3DCOLOR& c2, const D3DXVECTOR2& t2, // lower-left
|
||||
const D3DXVECTOR3 &p3, const D3DCOLOR& c3, const D3DXVECTOR2& t3 ); // lower-right
|
||||
const RageVector3 &p0, const D3DCOLOR& c0, const RageVector2& t0, // upper-left
|
||||
const RageVector3 &p1, const D3DCOLOR& c1, const RageVector2& t1, // upper-right
|
||||
const RageVector3 &p2, const D3DCOLOR& c2, const RageVector2& t2, // lower-left
|
||||
const RageVector3 &p3, const D3DCOLOR& c3, const RageVector2& t3 ); // lower-right
|
||||
void FlushQueue();
|
||||
void SetTexture( RageTexture* pTexture );
|
||||
void SetColorTextureMultDiffuse();
|
||||
@@ -165,3 +151,5 @@ public:
|
||||
|
||||
|
||||
extern RageDisplay* DISPLAY; // global and accessable from anywhere in our program
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,79 @@
|
||||
#include "stdafx.h"
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: RageMath
|
||||
|
||||
Desc: See header.
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
Peter S. May (GetHashForString implementation)
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include "RageMath.h"
|
||||
#include "RageTypes.h"
|
||||
#include "D3DX8Math.h"
|
||||
|
||||
|
||||
void RageVec2Normalize( RageVector2* pOut, const RageVector2* pV )
|
||||
{
|
||||
D3DXVec2Normalize( (D3DXVECTOR2*)pOut, (const D3DXVECTOR2*)pV );
|
||||
}
|
||||
|
||||
void RageVec3TransformCoord( RageVector3* pOut, const RageVector3* pV, const RageMatrix* pM )
|
||||
{
|
||||
D3DXVec3TransformCoord( (D3DXVECTOR3*)pOut, (const D3DXVECTOR3*)pV, (const D3DXMATRIX*)pM );
|
||||
}
|
||||
|
||||
void RageMatrixIdentity( RageMatrix* pOut )
|
||||
{
|
||||
D3DXMatrixIdentity( (D3DXMATRIX*)pOut );
|
||||
}
|
||||
|
||||
void RageMatrixMultiply( RageMatrix* pOut, const RageMatrix* pA, const RageMatrix* pB )
|
||||
{
|
||||
D3DXMatrixMultiply( (D3DXMATRIX*)pOut, (const D3DXMATRIX*)pA, (const D3DXMATRIX*)pB );
|
||||
}
|
||||
|
||||
void RageMatrixTranslation( RageMatrix* pOut, float x, float y, float z )
|
||||
{
|
||||
D3DXMatrixTranslation( (D3DXMATRIX*)pOut, x, y, z );
|
||||
}
|
||||
|
||||
void RageMatrixScaling( RageMatrix* pOut, float x, float y, float z )
|
||||
{
|
||||
D3DXMatrixScaling( (D3DXMATRIX*)pOut, x, y, z );
|
||||
}
|
||||
|
||||
void RageMatrixRotationX( RageMatrix* pOut, float theta )
|
||||
{
|
||||
D3DXMatrixRotationX( (D3DXMATRIX*)pOut, theta );
|
||||
}
|
||||
|
||||
void RageMatrixRotationY( RageMatrix* pOut, float theta )
|
||||
{
|
||||
D3DXMatrixRotationY( (D3DXMATRIX*)pOut, theta );
|
||||
}
|
||||
|
||||
void RageMatrixRotationZ( RageMatrix* pOut, float theta )
|
||||
{
|
||||
D3DXMatrixRotationZ( (D3DXMATRIX*)pOut, theta );
|
||||
}
|
||||
|
||||
void RageMatrixOrthoOffCenterLH( RageMatrix* pOut, float l, float r, float b, float t, float zn, float zf )
|
||||
{
|
||||
D3DXMatrixOrthoOffCenterLH( (D3DXMATRIX*)pOut, l, r, b, t, zn, zf );
|
||||
}
|
||||
|
||||
void RageMatrixLookAtLH( RageMatrix* pOut, const RageVector3* pEye, const RageVector3* pAt, const RageVector3* pUp )
|
||||
{
|
||||
D3DXMatrixLookAtLH( (D3DXMATRIX*)pOut, (const D3DXVECTOR3*)pEye, (const D3DXVECTOR3*)pAt, (const D3DXVECTOR3*)pUp );
|
||||
}
|
||||
|
||||
void RageMatrixPerspectiveFovLH( RageMatrix* pOut, float fovy, float Aspect, float zn, float zf )
|
||||
{
|
||||
D3DXMatrixPerspectiveFovLH( (D3DXMATRIX*)pOut, fovy, Aspect, zn, zf );
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef RageMath_H
|
||||
#define RageMath_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: RageMath.h
|
||||
|
||||
Desc: .
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
struct RageVector2;
|
||||
struct RageVector3;
|
||||
struct RageMatrix;
|
||||
|
||||
|
||||
void RageVec2Normalize( RageVector2* pOut, const RageVector2* pV );
|
||||
void RageVec3TransformCoord( RageVector3* pOut, const RageVector3* pV, const RageMatrix* pM );
|
||||
void RageMatrixIdentity( RageMatrix* pOut );
|
||||
void RageMatrixMultiply( RageMatrix* pOut, const RageMatrix* pA, const RageMatrix* pB );
|
||||
void RageMatrixTranslation( RageMatrix* pOut, float x, float y, float z );
|
||||
void RageMatrixScaling( RageMatrix* pOut, float x, float y, float z );
|
||||
void RageMatrixRotationX( RageMatrix* pOut, float fTheta );
|
||||
void RageMatrixRotationY( RageMatrix* pOut, float fTheta );
|
||||
void RageMatrixRotationZ( RageMatrix* pOut, float fTheta );
|
||||
void RageMatrixOrthoOffCenterLH( RageMatrix* pOut, float l, float r, float b, float t, float zn, float zf );
|
||||
void RageMatrixLookAtLH( RageMatrix* pOut, const RageVector3* pEye, const RageVector3* pAt, const RageVector3* pUp );
|
||||
void RageMatrixPerspectiveFovLH( RageMatrix* pOut, float fovy, float Aspect, float zn, float zf );
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,226 @@
|
||||
#ifndef RAGETYPES_H
|
||||
#define RAGETYPES_H
|
||||
/*
|
||||
-----------------------------------------------------------------------------
|
||||
File: RageTypes.h
|
||||
|
||||
Desc: .
|
||||
|
||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||
Chris Danford
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
struct RageVector2
|
||||
{
|
||||
public:
|
||||
RageVector2() {}
|
||||
RageVector2( const float * f ) { x=f[0]; y=f[1]; }
|
||||
RageVector2( float x1, float y1 ) { x=x1; y=y1; }
|
||||
|
||||
// casting
|
||||
operator float* () { return &x; };
|
||||
operator const float* () const { return &x; };
|
||||
|
||||
// assignment operators
|
||||
RageVector2& operator += ( const RageVector2& other ) { x+=other.x; y+=other.y; }
|
||||
RageVector2& operator -= ( const RageVector2& other ) { x-=other.x; y-=other.y; }
|
||||
RageVector2& operator *= ( float f ) { x*=f; y*=f; }
|
||||
RageVector2& operator /= ( float f ) { x/=f; y/=f; }
|
||||
|
||||
// binary operators
|
||||
RageVector2 operator + ( const RageVector2& other ) const { return RageVector2( x+other.x, y+other.y ); }
|
||||
RageVector2 operator - ( const RageVector2& other ) const { return RageVector2( x-other.x, y-other.y ); }
|
||||
RageVector2 operator * ( float f ) const { return RageVector2( x*f, y*f ); }
|
||||
RageVector2 operator / ( float f ) const { return RageVector2( x/f, y/f ); }
|
||||
|
||||
friend RageVector2 operator * ( float f, const RageVector2& other ) { return other*f; }
|
||||
|
||||
bool operator == ( const RageVector2& other ) const { return x==other.x && y==other.y; }
|
||||
bool operator != ( const RageVector2& other ) const { return x!=other.x || y!=other.y; }
|
||||
|
||||
float x, y;
|
||||
};
|
||||
|
||||
|
||||
struct RageVector3
|
||||
{
|
||||
public:
|
||||
RageVector3() {}
|
||||
RageVector3( const float * f ) { x=f[0]; y=f[1]; z=f[2]; }
|
||||
RageVector3( float x1, float y1, float z1 ) { x=x1; y=y1; z=z1; }
|
||||
|
||||
// casting
|
||||
operator float* () { return &x; };
|
||||
operator const float* () const { return &x; };
|
||||
|
||||
// assignment operators
|
||||
RageVector3& operator += ( const RageVector3& other ) { x+=other.x; y+=other.y; z+=other.z; return *this; }
|
||||
RageVector3& operator -= ( const RageVector3& other ) { x-=other.x; y-=other.y; z-=other.z; return *this; }
|
||||
RageVector3& operator *= ( float f ) { x*=f; y*=f; z*=f; return *this; }
|
||||
RageVector3& operator /= ( float f ) { x/=f; y/=f; z/=f; return *this; }
|
||||
|
||||
// binary operators
|
||||
RageVector3 operator + ( const RageVector3& other ) const { return RageVector3( x+other.x, y+other.y, z+other.z ); }
|
||||
RageVector3 operator - ( const RageVector3& other ) const { return RageVector3( x-other.x, y-other.y, z-other.z ); }
|
||||
RageVector3 operator * ( float f ) const { return RageVector3( x*f, y*f, z*f ); }
|
||||
RageVector3 operator / ( float f ) const { return RageVector3( x/f, y/f, z/f ); }
|
||||
|
||||
friend RageVector3 operator * ( float f, const RageVector3& other ) { return other*f; }
|
||||
|
||||
bool operator == ( const RageVector3& other ) const { return x==other.x && y==other.y && z==other.z; }
|
||||
bool operator != ( const RageVector3& other ) const { return x!=other.x || y!=other.y || z!=other.z; }
|
||||
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
|
||||
#define RAGECOLOR_ARGB(a,r,g,b) \
|
||||
((DWORD)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
|
||||
|
||||
#define RAGECOLOR_RGBA(r,g,b,a) RAGECOLOR_ARGB(a,r,g,b)
|
||||
|
||||
#define RAGECOLOR_COLORVALUE(r,g,b,a) \
|
||||
RAGECOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
|
||||
|
||||
|
||||
struct RageVector4
|
||||
{
|
||||
public:
|
||||
RageVector4() {}
|
||||
RageVector4( const float * f ) { x=f[0]; y=f[1]; z=f[2]; w=f[3]; }
|
||||
RageVector4( float x1, float y1, float z1, float w1 ) { x=x1; y=y1; z=z1; w=w1; }
|
||||
|
||||
// casting
|
||||
operator unsigned long () const { return RAGECOLOR_COLORVALUE(min(1.f,max(0.f,r)),min(1.f,max(0.f,g)),min(1.f,max(0.f,b)),min(1.f,max(0.f,a))); }
|
||||
operator float* () { return &x; };
|
||||
operator const float* () const { return &x; };
|
||||
|
||||
// assignment operators
|
||||
RageVector4& operator += ( const RageVector4& other ) { x+=other.x; y+=other.y; z+=other.z; w+=other.w; }
|
||||
RageVector4& operator -= ( const RageVector4& other ) { x-=other.x; y-=other.y; z-=other.z; w-=other.w; }
|
||||
RageVector4& operator *= ( float f ) { x*=f; y*=f; z*=f; w*=f; }
|
||||
RageVector4& operator /= ( float f ) { x/=f; y/=f; z/=f; w/=f; }
|
||||
|
||||
// binary operators
|
||||
RageVector4 operator + ( const RageVector4& other ) const { return RageVector4( x+other.x, y+other.y, z+other.z, w+other.w ); }
|
||||
RageVector4 operator - ( const RageVector4& other ) const { return RageVector4( x-other.x, y-other.y, z-other.z, w-other.w ); }
|
||||
RageVector4 operator * ( float f ) const { return RageVector4( x*f, y*f, z*f, w*f ); }
|
||||
RageVector4 operator / ( float f ) const { return RageVector4( x/f, y/f, z/f, w/f ); }
|
||||
|
||||
friend RageVector4 operator * ( float f, const RageVector4& other ) { return other*f; }
|
||||
|
||||
bool operator == ( const RageVector4& other ) const { return x==other.x && y==other.y && z==other.z && w==other.w; }
|
||||
bool operator != ( const RageVector4& other ) const { return x!=other.x || y!=other.y || z!=other.z || w!=other.w; }
|
||||
|
||||
union {
|
||||
struct
|
||||
{
|
||||
float x, y, z, w;
|
||||
};
|
||||
struct
|
||||
{
|
||||
float r, g, b, a;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
typedef RageVector4 RageColor;
|
||||
|
||||
|
||||
template <class T>
|
||||
class Rect
|
||||
{
|
||||
public:
|
||||
Rect() {};
|
||||
Rect(T l, T t, T r, T b) { left = l, top = t, right = r, bottom = b; };
|
||||
|
||||
int GetWidth() const { return right-left; };
|
||||
int GetHeight() const { return bottom-top; };
|
||||
int GetCenterX() const { return (left+right)/2; };
|
||||
int GetCenterY() const { return (top+bottom)/2; };
|
||||
|
||||
T left, top, right, bottom;
|
||||
};
|
||||
|
||||
typedef Rect<int> RectI;
|
||||
typedef Rect<float> RectF;
|
||||
|
||||
|
||||
// A structure for our custom vertex type. Note that these data structes have the same layout that D3D expects.
|
||||
struct RageVertex
|
||||
{
|
||||
RageVector3 p; // position
|
||||
DWORD c; // diffuse color
|
||||
RageVector2 t; // texture coordinates
|
||||
};
|
||||
|
||||
#define D3DFVF_RAGEVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1) // D3D FVF flags which describe our vertex structure
|
||||
|
||||
|
||||
struct RageMatrix
|
||||
{
|
||||
public:
|
||||
RageMatrix() {};
|
||||
RageMatrix( const float *f ) { for(int i=0; i<4; i++) for(int j=0; j<4; j++) m[j][i]=f[j*4+i]; }
|
||||
RageMatrix( const RageMatrix& other ) { for(int i=0; i<4; i++) for(int j=0; j<4; j++) m[j][i]=other.m[j][i]; }
|
||||
RageMatrix( float v00, float v01, float v02, float v03,
|
||||
float v10, float v11, float v12, float v13,
|
||||
float v20, float v21, float v22, float v23,
|
||||
float v30, float v31, float v32, float v33 )
|
||||
{
|
||||
m00=v00; m01=v01; m02=v02; m03=v03;
|
||||
m10=v00; m11=v01; m12=v02; m13=v03;
|
||||
m20=v00; m21=v01; m22=v02; m23=v03;
|
||||
m30=v00; m31=v01; m32=v02; m33=v03;
|
||||
}
|
||||
|
||||
// access grants
|
||||
float& operator () ( int iRow, int iCol ) { return m[iCol][iRow]; }
|
||||
float operator () ( int iRow, int iCol ) const { return m[iCol][iRow]; }
|
||||
|
||||
// casting operators
|
||||
operator float* () { return m[0]; }
|
||||
operator const float* () const { return m[0]; }
|
||||
|
||||
|
||||
// ---These are not used. Maybe I'll implement them later...---
|
||||
// // assignment operators
|
||||
// RageMatrix& operator *= ( const RageMatrix& );
|
||||
// RageMatrix& operator += ( const RageMatrix& );
|
||||
// RageMatrix& operator -= ( const RageMatrix& );
|
||||
// RageMatrix& operator *= ( float );
|
||||
// RageMatrix& operator /= ( float );
|
||||
//
|
||||
// // unary operators
|
||||
// RageMatrix operator + () const;
|
||||
// RageMatrix operator - () const;
|
||||
//
|
||||
// // binary operators
|
||||
// RageMatrix operator * ( const RageMatrix& ) const;
|
||||
// RageMatrix operator + ( const RageMatrix& ) const;
|
||||
// RageMatrix operator - ( const RageMatrix& ) const;
|
||||
// RageMatrix operator * ( float ) const;
|
||||
// RageMatrix operator / ( float ) const;
|
||||
//
|
||||
// friend RageMatrix operator * ( float, const RageMatrix& );
|
||||
//
|
||||
// bool operator == ( const RageMatrix& ) const;
|
||||
// bool operator != ( const RageMatrix& ) const;
|
||||
|
||||
union
|
||||
{
|
||||
float m[4][4];
|
||||
struct
|
||||
{
|
||||
float m00, m01, m02, m03;
|
||||
float m10, m11, m12, m13;
|
||||
float m20, m21, m22, m23;
|
||||
float m30, m31, m32, m33;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
@@ -17,6 +17,7 @@ ULONG randseed = time(NULL);
|
||||
|
||||
#include <direct.h>
|
||||
#include <numeric>
|
||||
#include <math.h>
|
||||
using namespace std;
|
||||
|
||||
bool IsAnInt( const char *s )
|
||||
|
||||
@@ -46,9 +46,9 @@ inline float max(int a, float b) { return a > b? a:b; }
|
||||
|
||||
#define clamp(val,low,high) ( max( (low), min((val),(high)) ) )
|
||||
|
||||
#define PI 3.1415926535897932384626433832795
|
||||
#define DEG (PI / 180.0f)
|
||||
#define RAD (180.0f / PI)
|
||||
#define PI ((float)3.1415926535897932384626433832795)
|
||||
#define DegreeToRadian( degree ) ((degree) * (PI / 180.0f))
|
||||
#define RadianToDegree( radian ) ((radian) * (180.0f / PI))
|
||||
// Scales x so that l1 corresponds to l2 and h1 corresponds to h2. Does not modify x, MUST assign the result to something!
|
||||
#define SCALE(x, l1, h1, l2, h2) (((x) - (l1)) / ((h1) - (l1)) * ((h2) - (l2)) + (l2))
|
||||
// Clamps x
|
||||
|
||||
@@ -236,7 +236,7 @@ ScreenEdit::ScreenEdit()
|
||||
m_NoteFieldEdit.Load( ¬eData, PLAYER_1, 200, 800 );
|
||||
|
||||
m_rectRecordBack.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||
m_rectRecordBack.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_rectRecordBack.SetDiffuse( RageColor(0,0,0,0) );
|
||||
|
||||
m_GrayArrowRowRecord.SetXY( EDIT_X, EDIT_GRAY_Y );
|
||||
m_GrayArrowRowRecord.Load( PLAYER_1 );
|
||||
@@ -270,7 +270,7 @@ ScreenEdit::ScreenEdit()
|
||||
m_textHelp.SetText( HELP_TEXT );
|
||||
|
||||
m_rectShortcutsBack.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||
m_rectShortcutsBack.SetDiffuse( D3DXCOLOR(0,0,0,0.8f) );
|
||||
m_rectShortcutsBack.SetDiffuse( RageColor(0,0,0,0.8f) );
|
||||
|
||||
m_textShortcuts.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textShortcuts.SetXY( SHORTCUTS_X, SHORTCUTS_Y );
|
||||
@@ -910,7 +910,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
|
||||
m_rectRecordBack.StopTweening();
|
||||
m_rectRecordBack.BeginTweening( 0.5f );
|
||||
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0.8f) );
|
||||
m_rectRecordBack.SetTweenDiffuse( RageColor(0,0,0,0.8f) );
|
||||
}
|
||||
break;
|
||||
case DIK_N:
|
||||
@@ -921,7 +921,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
|
||||
m_rectRecordBack.StopTweening();
|
||||
m_rectRecordBack.BeginTweening( 0.5f );
|
||||
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0.8f) );
|
||||
m_rectRecordBack.SetTweenDiffuse( RageColor(0,0,0,0.8f) );
|
||||
}
|
||||
break;
|
||||
case DIK_R:
|
||||
@@ -949,7 +949,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
|
||||
m_rectRecordBack.StopTweening();
|
||||
m_rectRecordBack.BeginTweening( 0.5f );
|
||||
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0.8f) );
|
||||
m_rectRecordBack.SetTweenDiffuse( RageColor(0,0,0,0.8f) );
|
||||
|
||||
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
||||
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ;
|
||||
@@ -1389,7 +1389,7 @@ void ScreenEdit::TransitionToEdit()
|
||||
m_soundMusic.Stop();
|
||||
m_rectRecordBack.StopTweening();
|
||||
m_rectRecordBack.BeginTweening( 0.5f );
|
||||
m_rectRecordBack.SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_rectRecordBack.SetTweenDiffuse( RageColor(0,0,0,0) );
|
||||
|
||||
/* Make sure we're snapped. */
|
||||
GAMESTATE->m_fSongBeat = froundf( GAMESTATE->m_fSongBeat, NoteTypeToBeat(m_SnapDisplay.GetNoteType()) );
|
||||
@@ -1441,7 +1441,7 @@ void ScreenEdit::OnSnapModeChange()
|
||||
|
||||
void ScreenEdit::MenuItemGainFocus( BitmapText* menuitem )
|
||||
{
|
||||
menuitem->SetEffectCamelion( 2.5, D3DXCOLOR(1,1,1,1), D3DXCOLOR(0,1,0,1) );
|
||||
menuitem->SetEffectCamelion( 2.5, RageColor(1,1,1,1), RageColor(0,1,0,1) );
|
||||
menuitem->SetZoom( 0.7f );
|
||||
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","edit menu change") );
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic()
|
||||
m_textHoldForOptions.SetText( "press START again for options" );
|
||||
m_textHoldForOptions.SetZoom( 1 );
|
||||
m_textHoldForOptions.SetZoomY( 0 );
|
||||
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textHoldForOptions.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_textHoldForOptions.SetZ( -2 );
|
||||
this->AddChild( &m_textHoldForOptions );
|
||||
|
||||
@@ -164,7 +164,7 @@ void ScreenEz2SelectMusic::DrawPrimitives()
|
||||
Screen::DrawPrimitives();
|
||||
m_Menu.DrawTopLayer();
|
||||
|
||||
D3DXMATRIX matOldView, matOldProj;
|
||||
RageMatrix matOldView, matOldProj;
|
||||
|
||||
// save old view and projection
|
||||
DISPLAY->GetViewTransform( &matOldView );
|
||||
@@ -173,34 +173,34 @@ void ScreenEz2SelectMusic::DrawPrimitives()
|
||||
// construct view and project matrix
|
||||
|
||||
|
||||
D3DXMATRIX matNewView;
|
||||
RageMatrix matNewView;
|
||||
|
||||
D3DXMatrixLookAtLH(
|
||||
RageMatrixLookAtLH(
|
||||
&matNewView,
|
||||
&D3DXVECTOR3( CENTER_X+SIDE_BANNER_ANGLE, CENTER_Y, SIDE_BANNER_ZOOM ),
|
||||
&D3DXVECTOR3( CENTER_X-SIDE_BANNER_SPACING, CENTER_Y, 0.0f ),
|
||||
&D3DXVECTOR3( 0.0f, -1.0f, 0.0f )
|
||||
&RageVector3( CENTER_X+SIDE_BANNER_ANGLE, CENTER_Y, SIDE_BANNER_ZOOM ),
|
||||
&RageVector3( CENTER_X-SIDE_BANNER_SPACING, CENTER_Y, 0.0f ),
|
||||
&RageVector3( 0.0f, -1.0f, 0.0f )
|
||||
);
|
||||
|
||||
DISPLAY->SetViewTransform( &matNewView );
|
||||
|
||||
D3DXMATRIX matNewProj;
|
||||
D3DXMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f );
|
||||
RageMatrix matNewProj;
|
||||
RageMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f );
|
||||
DISPLAY->SetProjectionTransform( &matNewProj );
|
||||
// }
|
||||
|
||||
m_BannerNext.Draw();
|
||||
|
||||
D3DXMatrixLookAtLH(
|
||||
RageMatrixLookAtLH(
|
||||
&matNewView,
|
||||
&D3DXVECTOR3( CENTER_X-SIDE_BANNER_ANGLE, CENTER_Y, SIDE_BANNER_ZOOM ),
|
||||
&D3DXVECTOR3( CENTER_X+SIDE_BANNER_SPACING, CENTER_Y, 0.0f ),
|
||||
&D3DXVECTOR3( 0.0f, -1.0f, 0.0f )
|
||||
&RageVector3( CENTER_X-SIDE_BANNER_ANGLE, CENTER_Y, SIDE_BANNER_ZOOM ),
|
||||
&RageVector3( CENTER_X+SIDE_BANNER_SPACING, CENTER_Y, 0.0f ),
|
||||
&RageVector3( 0.0f, -1.0f, 0.0f )
|
||||
);
|
||||
|
||||
DISPLAY->SetViewTransform( &matNewView );
|
||||
|
||||
D3DXMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f );
|
||||
RageMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f );
|
||||
DISPLAY->SetProjectionTransform( &matNewProj );
|
||||
|
||||
m_BannerPrevious.Draw();
|
||||
@@ -353,7 +353,7 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy
|
||||
MUSIC->Stop();
|
||||
|
||||
m_MusicSortDisplay.BeginTweening( 0.3f );
|
||||
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_MusicSortDisplay.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
TweenScoreOnAndOffAfterChangeSort();
|
||||
}
|
||||
@@ -497,7 +497,7 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn )
|
||||
MUSIC->Stop();
|
||||
|
||||
m_MusicSortDisplay.BeginTweening( 0.3f );
|
||||
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_MusicSortDisplay.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
TweenScoreOnAndOffAfterChangeSort();
|
||||
}
|
||||
@@ -558,13 +558,13 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn )
|
||||
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
|
||||
{
|
||||
// show "hold START for options"
|
||||
m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textHoldForOptions.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_textHoldForOptions.BeginTweening( 0.25f ); // fade in
|
||||
m_textHoldForOptions.SetTweenZoomY( 1 );
|
||||
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textHoldForOptions.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_textHoldForOptions.BeginTweening( 2.0f ); // sleep
|
||||
m_textHoldForOptions.BeginTweening( 0.25f ); // fade out
|
||||
m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textHoldForOptions.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
m_textHoldForOptions.SetTweenZoomY( 0 );
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ void ScreenEz2SelectMusic::SortOrderChanged()
|
||||
// tween music sort on screen
|
||||
// m_MusicSortDisplay.SetEffectGlowing();
|
||||
m_MusicSortDisplay.BeginTweening( 0.3f );
|
||||
m_MusicSortDisplay.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_MusicSortDisplay.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
|
||||
*/
|
||||
@@ -82,7 +82,7 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()
|
||||
m_sprJoinMessage[p].SetState( p );
|
||||
m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) );
|
||||
if( BOUNCE_JOIN_MESSAGE )
|
||||
m_sprJoinMessage[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
||||
m_sprJoinMessage[p].SetEffectBouncing( RageVector3(0,10,0), 0.5f );
|
||||
this->AddChild( &m_sprJoinMessage[p] );
|
||||
|
||||
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||
|
||||
@@ -154,7 +154,7 @@ ScreenGameplay::ScreenGameplay()
|
||||
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS;
|
||||
|
||||
|
||||
m_Background.SetDiffuse( D3DXCOLOR(0.4f,0.4f,0.4f,1) );
|
||||
m_Background.SetDiffuse( RageColor(0.4f,0.4f,0.4f,1) );
|
||||
this->AddChild( &m_Background );
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ ScreenGameplay::ScreenGameplay()
|
||||
m_sprOniGameOver[p].Load( THEME->GetPathTo("Graphics","gameplay oni gameover") );
|
||||
m_sprOniGameOver[p].SetX( fPlayerX );
|
||||
m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 );
|
||||
m_sprOniGameOver[p].SetDiffuse( D3DXCOLOR(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
|
||||
m_sprOniGameOver[p].SetDiffuse( RageColor(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
|
||||
this->AddChild( &m_sprOniGameOver[p] );
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ ScreenGameplay::ScreenGameplay()
|
||||
m_textPlayerOptions[p].TurnShadowOff();
|
||||
m_textPlayerOptions[p].SetXY( PLAYER_OPTIONS_X(p), PLAYER_OPTIONS_Y(p,bExtra) );
|
||||
m_textPlayerOptions[p].SetZoom( 0.5f );
|
||||
m_textPlayerOptions[p].SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textPlayerOptions[p].SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textPlayerOptions[p].SetText( GAMESTATE->m_PlayerOptions[p].GetString() );
|
||||
this->AddChild( &m_textPlayerOptions[p] );
|
||||
}
|
||||
@@ -297,7 +297,7 @@ ScreenGameplay::ScreenGameplay()
|
||||
m_textSongOptions.TurnShadowOff();
|
||||
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y(bExtra) );
|
||||
m_textSongOptions.SetZoom( 0.5f );
|
||||
m_textSongOptions.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textSongOptions.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textSongOptions.SetText( GAMESTATE->m_SongOptions.GetString() );
|
||||
this->AddChild( &m_textSongOptions );
|
||||
|
||||
@@ -315,13 +315,13 @@ ScreenGameplay::ScreenGameplay()
|
||||
|
||||
m_textDebug.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textDebug.SetXY( DEBUG_X, DEBUG_Y );
|
||||
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||
this->AddChild( &m_textDebug );
|
||||
|
||||
m_textAutoPlay.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textAutoPlay.SetXY( AUTOPLAY_X, AUTOPLAY_Y );
|
||||
m_textAutoPlay.SetText( "AutoPlay is ON" );
|
||||
m_textAutoPlay.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textAutoPlay.SetDiffuse( RageColor(1,1,1,1) );
|
||||
this->AddChild( &m_textAutoPlay );
|
||||
|
||||
|
||||
@@ -330,22 +330,22 @@ ScreenGameplay::ScreenGameplay()
|
||||
|
||||
m_sprReady.Load( THEME->GetPathTo("Graphics","gameplay ready") );
|
||||
m_sprReady.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprReady.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprReady.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprReady );
|
||||
|
||||
m_sprHereWeGo.Load( THEME->GetPathTo("Graphics","gameplay here we go") );
|
||||
m_sprHereWeGo.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprHereWeGo.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprHereWeGo.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprHereWeGo );
|
||||
|
||||
m_sprCleared.Load( THEME->GetPathTo("Graphics","gameplay cleared") );
|
||||
m_sprCleared.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprCleared.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprCleared.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprCleared );
|
||||
|
||||
m_sprFailed.Load( THEME->GetPathTo("Graphics","gameplay failed") );
|
||||
m_sprFailed.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprFailed.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprFailed.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprFailed );
|
||||
|
||||
if( GAMESTATE->IsFinalStage() )
|
||||
@@ -353,7 +353,7 @@ ScreenGameplay::ScreenGameplay()
|
||||
else if( GAMESTATE->IsExtraStage() )
|
||||
m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics","gameplay try extra stage2") );
|
||||
m_sprTryExtraStage.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprTryExtraStage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprTryExtraStage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprTryExtraStage );
|
||||
|
||||
if( GAMESTATE->m_bDemonstration )
|
||||
@@ -378,12 +378,12 @@ ScreenGameplay::ScreenGameplay()
|
||||
m_textSurviveTime.TurnShadowOff();
|
||||
m_textSurviveTime.SetXY( SURVIVE_TIME_X, SURVIVE_TIME_Y );
|
||||
m_textSurviveTime.SetText( "" );
|
||||
m_textSurviveTime.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textSurviveTime.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_textSurviveTime );
|
||||
|
||||
|
||||
m_sprToasty.Load( THEME->GetPathTo("Graphics","gameplay toasty") );
|
||||
m_sprToasty.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprToasty.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprToasty );
|
||||
|
||||
m_soundToasty.Load( THEME->GetPathTo("Sounds","gameplay toasty") );
|
||||
@@ -534,7 +534,7 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
|
||||
|
||||
// reset oni game over graphic
|
||||
m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 );
|
||||
m_sprOniGameOver[p].SetDiffuse( D3DXCOLOR(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
|
||||
m_sprOniGameOver[p].SetDiffuse( RageColor(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible
|
||||
|
||||
if( GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY && GAMESTATE->m_fSecondsBeforeFail[p] != -1 ) // already failed
|
||||
ShowOniGameOver((PlayerNumber)p);
|
||||
@@ -554,9 +554,9 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad )
|
||||
}
|
||||
|
||||
m_Background.LoadFromSong( GAMESTATE->m_pCurSong );
|
||||
m_Background.SetDiffuse( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
|
||||
m_Background.SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) );
|
||||
m_Background.BeginTweening( 2 );
|
||||
m_Background.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_Background.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
m_soundMusic.Load( GAMESTATE->m_pCurSong->GetMusicPath(), true ); // enable accurate sync
|
||||
const float fFirstBeat = GAMESTATE->m_pCurSong->m_fFirstBeat;
|
||||
@@ -781,9 +781,9 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
m_soundAssistTick.Play();
|
||||
|
||||
if( PREFSMAN->m_bAutoPlay && !GAMESTATE->m_bDemonstration )
|
||||
m_textAutoPlay.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textAutoPlay.SetDiffuse( RageColor(1,1,1,1) );
|
||||
else
|
||||
m_textAutoPlay.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textAutoPlay.SetDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
Screen::Update( fDeltaTime );
|
||||
}
|
||||
@@ -835,11 +835,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
GAMESTATE->m_SongOptions.m_AutoAdjust = SongOptions::ADJUST_ON;
|
||||
m_textDebug.SetText( "AutoAdjust is ON" );
|
||||
}
|
||||
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textDebug.StopTweening();
|
||||
m_textDebug.BeginTweening( 3 ); // sleep
|
||||
m_textDebug.BeginTweening( 0.5f ); // fade out
|
||||
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textDebug.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
break;
|
||||
case DIK_F7:
|
||||
if( GAMESTATE->m_SongOptions.m_AssistType == SongOptions::ASSIST_NONE )
|
||||
@@ -847,11 +847,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
else
|
||||
GAMESTATE->m_SongOptions.m_AssistType = SongOptions::ASSIST_NONE;
|
||||
m_textDebug.SetText( ssprintf( "Assist tick is %s.", (GAMESTATE->m_SongOptions.m_AssistType==SongOptions::ASSIST_NONE)?"OFF":"ON") );
|
||||
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textDebug.StopTweening();
|
||||
m_textDebug.BeginTweening( 3 ); // sleep
|
||||
m_textDebug.BeginTweening( 0.5f ); // fade out
|
||||
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textDebug.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
break;
|
||||
case DIK_F8:
|
||||
PREFSMAN->m_bAutoPlay = !PREFSMAN->m_bAutoPlay;
|
||||
@@ -875,11 +875,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
seg.m_fBPM += fOffsetDelta;
|
||||
|
||||
m_textDebug.SetText( ssprintf("Cur BPM = %f", seg.m_fBPM) );
|
||||
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textDebug.StopTweening();
|
||||
m_textDebug.BeginTweening( 3 ); // sleep
|
||||
m_textDebug.BeginTweening( 0.5f ); // fade out
|
||||
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textDebug.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
break;
|
||||
case DIK_F11:
|
||||
@@ -900,11 +900,11 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
||||
GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds += fOffsetDelta;
|
||||
|
||||
m_textDebug.SetText( ssprintf("Offset = %f", GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds) );
|
||||
m_textDebug.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textDebug.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textDebug.StopTweening();
|
||||
m_textDebug.BeginTweening( 3 ); // sleep
|
||||
m_textDebug.BeginTweening( 0.5f ); // fade out
|
||||
m_textDebug.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textDebug.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1166,7 +1166,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
// set off screen
|
||||
m_sprToasty.StopTweening();
|
||||
m_sprToasty.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprToasty.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprToasty.SetX( SCREEN_RIGHT+m_sprToasty.GetUnzoomedWidth()/2 );
|
||||
m_sprToasty.SetY( SCREEN_BOTTOM-m_sprToasty.GetUnzoomedHeight()/2 );
|
||||
m_sprToasty.BeginTweening( 0.2f, Actor::TWEEN_BIAS_BEGIN ); // slide on
|
||||
@@ -1175,7 +1175,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
m_sprToasty.BeginTweening( 0.3f, Actor::TWEEN_BIAS_END ); // slide off
|
||||
m_sprToasty.SetTweenX( SCREEN_RIGHT+m_sprToasty.GetUnzoomedWidth()/2 );
|
||||
m_sprToasty.BeginTweening( 0.001f ); // fade out
|
||||
m_sprToasty.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprToasty.SetDiffuse( RageColor(1,1,1,0) );
|
||||
break;
|
||||
|
||||
case SM_PlayToastySound:
|
||||
@@ -1264,10 +1264,10 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
// received while STATE_OUTRO
|
||||
case SM_ShowCleared:
|
||||
m_sprCleared.BeginTweening(1.0f);
|
||||
m_sprCleared.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprCleared.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprCleared.BeginTweening(1.5f); // sleep
|
||||
m_sprCleared.BeginTweening(0.7f);
|
||||
m_sprCleared.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprCleared.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
SCREENMAN->SendMessageToTopScreen( SM_GoToStateAfterCleared, 4 );
|
||||
break;
|
||||
|
||||
@@ -1277,9 +1277,9 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
// make the background invisible so we don't waste mem bandwidth drawing it
|
||||
m_Background.BeginTweening( 1 );
|
||||
m_Background.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_Background.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
D3DXCOLOR colorStage = GAMESTATE->GetStageColor();
|
||||
RageColor colorStage = GAMESTATE->GetStageColor();
|
||||
colorStage.a *= 0.7f;
|
||||
|
||||
m_sprTryExtraStage.SetZoom( 4 );
|
||||
@@ -1353,21 +1353,21 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
|
||||
// make the background invisible so we don't waste mem bandwidth drawing it
|
||||
m_Background.BeginTweening( 1 );
|
||||
m_Background.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_Background.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_sprFailed.SetZoom( 4 );
|
||||
m_sprFailed.BeginBlurredTweening( 0.8f, TWEEN_BIAS_END );
|
||||
m_sprFailed.SetTweenZoom( 0.5f ); // zoom out
|
||||
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
|
||||
m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0.7f) ); // and fade in
|
||||
m_sprFailed.BeginTweening( 0.3f );
|
||||
m_sprFailed.SetTweenZoom( 1.1f ); // bounce
|
||||
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
|
||||
m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0.7f) ); // and fade in
|
||||
m_sprFailed.BeginTweening( 0.2f );
|
||||
m_sprFailed.SetTweenZoom( 1.0f ); // come to rest
|
||||
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0.7f) ); // and fade in
|
||||
m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0.7f) ); // and fade in
|
||||
m_sprFailed.BeginTweening( 2 ); // sleep
|
||||
m_sprFailed.BeginTweening( 1 );
|
||||
m_sprFailed.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
// show the survive time if extra stage
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
@@ -1380,10 +1380,10 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
m_textSurviveTime.SetText( "TIME " + SecondsToTime(fMaxSurviveSeconds) );
|
||||
m_textSurviveTime.BeginTweening( 0.3f ); // sleep
|
||||
m_textSurviveTime.BeginTweening( 0.3f ); // fade in
|
||||
m_textSurviveTime.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textSurviveTime.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_textSurviveTime.BeginTweening( 3.5f ); // sleep
|
||||
m_textSurviveTime.BeginTweening( 0.5f ); // fade out
|
||||
m_textSurviveTime.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textSurviveTime.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
SCREENMAN->SendMessageToTopScreen( SM_PlayFailComment, 1.0f );
|
||||
@@ -1476,8 +1476,8 @@ void ScreenGameplay::TweenOffScreen()
|
||||
|
||||
void ScreenGameplay::ShowOniGameOver( PlayerNumber pn )
|
||||
{
|
||||
m_sprOniGameOver[pn].SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprOniGameOver[pn].SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprOniGameOver[pn].BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||
m_sprOniGameOver[pn].SetTweenY( CENTER_Y );
|
||||
m_sprOniGameOver[pn].SetEffectBobbing( D3DXVECTOR3(0,6,0), 4 );
|
||||
m_sprOniGameOver[pn].SetEffectBobbing( RageVector3(0,6,0), 4 );
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ ScreenManager::ScreenManager()
|
||||
m_textSystemMessage.SetXY( 4.0f, 4.0f );
|
||||
m_textSystemMessage.SetZoom( 0.5f );
|
||||
m_textSystemMessage.SetShadowLength( 2 );
|
||||
m_textSystemMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textSystemMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
|
||||
@@ -182,6 +182,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
|
||||
#include "ScreenStage.h"
|
||||
#include "ScreenTitleMenu.h"
|
||||
#include "ScreenEz2SelectMusic.h"
|
||||
#include "ScreenNetworkGame.h"
|
||||
|
||||
#include "ScreenPrompt.h"
|
||||
#include "ScreenTextEntry.h"
|
||||
@@ -220,6 +221,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
|
||||
else if( 0==stricmp(sClassName, "ScreenStage") ) return new ScreenStage;
|
||||
else if( 0==stricmp(sClassName, "ScreenTitleMenu") ) return new ScreenTitleMenu;
|
||||
// else if( 0==stricmp(sClassName, "ScreenEz2SelectMusic") ) return new ScreenEz2SelectMusic;
|
||||
else if( 0==stricmp(sClassName, "ScreenNetworkGame") ) return new ScreenNetworkGame;
|
||||
else
|
||||
throw RageException( "Invalid Screen class name '%s'", sClassName );
|
||||
}
|
||||
@@ -306,10 +308,10 @@ void ScreenManager::SystemMessage( CString sMessage )
|
||||
// Look for an open spot
|
||||
m_textSystemMessage.StopTweening();
|
||||
m_textSystemMessage.SetText( sMessage );
|
||||
m_textSystemMessage.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textSystemMessage.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_textSystemMessage.BeginTweening( 5 );
|
||||
m_textSystemMessage.BeginTweening( 1 );
|
||||
m_textSystemMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textSystemMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
LOG->Trace( "WARNING: Didn't find an empty system messages slot." );
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ ScreenMapControllers::ScreenMapControllers()
|
||||
m_textError.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textError.SetText( "" );
|
||||
m_textError.SetXY( CENTER_X, CENTER_Y );
|
||||
m_textError.SetDiffuse( D3DXCOLOR(0,1,0,0) );
|
||||
m_textError.SetDiffuse( RageColor(0,1,0,0) );
|
||||
m_textError.SetZoom( 0.8f );
|
||||
this->AddChild( &m_textError );
|
||||
|
||||
@@ -152,10 +152,10 @@ void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventTy
|
||||
{
|
||||
//m_textError.SetText( "Game option is set to ignore the Joystick D-Pad." );
|
||||
//m_fErrorDisplayCountdown = 5; // show the error message
|
||||
m_textError.SetDiffuse( D3DXCOLOR(0,1,0,1) );
|
||||
m_textError.SetDiffuse( RageColor(0,1,0,1) );
|
||||
m_textError.BeginTweening( 3 );
|
||||
m_textError.BeginTweening( 1 );
|
||||
m_textError.SetTweenDiffuse( D3DXCOLOR(0,1,0,0) );
|
||||
m_textError.SetTweenDiffuse( RageColor(0,1,0,0) );
|
||||
|
||||
return; // ignore this press
|
||||
}
|
||||
@@ -260,16 +260,16 @@ void ScreenMapControllers::Refresh()
|
||||
m_textMappedTo[p][b][s].SetText( "-----------" );
|
||||
|
||||
// highlight the currently selected pad button
|
||||
D3DXCOLOR color;
|
||||
RageColor color;
|
||||
if( p == m_iCurController && b == m_iCurButton && s == m_iCurSlot )
|
||||
{
|
||||
if( m_bWaitingForPress )
|
||||
color = D3DXCOLOR(1,0.5,0.5,1); // red
|
||||
color = RageColor(1,0.5,0.5,1); // red
|
||||
else
|
||||
color = D3DXCOLOR(1,1,1,1); // white
|
||||
color = RageColor(1,1,1,1); // white
|
||||
}
|
||||
else
|
||||
color = D3DXCOLOR(0.5,0.5,0.5,1); // gray
|
||||
color = RageColor(0.5,0.5,0.5,1); // gray
|
||||
m_textMappedTo[p][b][s].SetDiffuse( color );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,9 +244,9 @@ void ScreenOptions::DimOption(int line, int option, bool dim)
|
||||
m_textOptions[line][option].StopTweening();
|
||||
m_textOptions[line][option].BeginTweening(.250);
|
||||
if(m_OptionDim[line][option])
|
||||
m_textOptions[line][option].SetTweenDiffuse( D3DXCOLOR(.5,.5,.5,1) );
|
||||
m_textOptions[line][option].SetTweenDiffuse( RageColor(.5,.5,.5,1) );
|
||||
else
|
||||
m_textOptions[line][option].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_textOptions[line][option].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
/* Don't know if I like this ...-glenn
|
||||
m_textOptionLineTitles[line].BeginTweening(.250);
|
||||
@@ -353,8 +353,8 @@ void ScreenOptions::TweenCursor( PlayerNumber player_no )
|
||||
|
||||
void ScreenOptions::UpdateEnabledDisabled()
|
||||
{
|
||||
D3DXCOLOR colorSelected = COLOR_SELECTED;
|
||||
D3DXCOLOR colorNotSelected = COLOR_NOT_SELECTED;
|
||||
RageColor colorSelected = COLOR_SELECTED;
|
||||
RageColor colorNotSelected = COLOR_NOT_SELECTED;
|
||||
|
||||
// init text
|
||||
for( int i=0; i<m_iNumOptionRows; i++ ) // foreach line
|
||||
|
||||
@@ -35,7 +35,7 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
|
||||
|
||||
|
||||
m_Fade.SetTransitionTime( 0.5f );
|
||||
m_Fade.SetDiffuse( D3DXCOLOR(0,0,0,0.7f) );
|
||||
m_Fade.SetDiffuse( RageColor(0,0,0,0.7f) );
|
||||
m_Fade.SetOpened();
|
||||
m_Fade.CloseWipingRight();
|
||||
this->AddChild( &m_Fade );
|
||||
@@ -45,7 +45,7 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b
|
||||
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
|
||||
this->AddChild( &m_textQuestion );
|
||||
|
||||
m_rectAnswerBox.SetDiffuse( D3DXCOLOR(0.5f,0.5f,1.0f,0.7f) );
|
||||
m_rectAnswerBox.SetDiffuse( RageColor(0.5f,0.5f,1.0f,0.7f) );
|
||||
this->AddChild( &m_rectAnswerBox );
|
||||
|
||||
m_textAnswer[0].LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||
@@ -142,17 +142,17 @@ void ScreenPrompt::MenuStart( PlayerNumber pn )
|
||||
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
|
||||
|
||||
m_textQuestion.BeginTweening( 0.2f );
|
||||
m_textQuestion.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textQuestion.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_rectAnswerBox.BeginTweening( 0.2f );
|
||||
m_rectAnswerBox.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_rectAnswerBox.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_textAnswer[m_bAnswer].SetEffectNone();
|
||||
|
||||
m_textAnswer[0].BeginTweening( 0.2f );
|
||||
m_textAnswer[0].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textAnswer[0].SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
m_textAnswer[1].BeginTweening( 0.2f );
|
||||
m_textAnswer[1].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textAnswer[1].SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
||||
|
||||
|
||||
@@ -20,12 +20,10 @@
|
||||
|
||||
ScreenSandbox::ScreenSandbox()
|
||||
{
|
||||
m_spr.Load( THEME->GetPathTo("Graphics","title menu logo game 0") );
|
||||
m_spr.SetXY( CENTER_X, CENTER_Y );
|
||||
m_spr.SetZoomY( 0 );
|
||||
m_spr.BeginTweening( 0.5f );
|
||||
m_spr.SetTweenZoomY( 1 );
|
||||
this->AddChild( &m_spr );
|
||||
m_text.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_text.SetXY( CENTER_X, CENTER_Y );
|
||||
m_text.SetText( "Press Left to Become Server\nRight to become Client." );
|
||||
this->AddChild( &m_text );
|
||||
|
||||
// m_Menu.Load(
|
||||
// THEME->GetPathTo(GRAPHIC_SELECT_STYLE_BACKGROUND),
|
||||
@@ -52,24 +50,28 @@ void ScreenSandbox::DrawPrimitives()
|
||||
|
||||
void ScreenSandbox::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
{
|
||||
if( MenuI.IsValid() )
|
||||
if( type != IET_FIRST_PRESS )
|
||||
return; // ignore
|
||||
|
||||
switch( DeviceI.device)
|
||||
{
|
||||
switch( MenuI.button )
|
||||
case DEVICE_KEYBOARD:
|
||||
switch( DeviceI.button )
|
||||
{
|
||||
case MENU_BUTTON_LEFT:
|
||||
case DIK_LEFT:
|
||||
m_text.SetText( "You are the server." );
|
||||
break;
|
||||
case MENU_BUTTON_RIGHT:
|
||||
case DIK_RIGHT:
|
||||
m_text.SetText( "You are the client." );
|
||||
break;
|
||||
case DIK_T:
|
||||
break;
|
||||
case MENU_BUTTON_BACK:
|
||||
//SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// m_sprBG.SetEffectCamelion( 5, D3DXCOLOR(1,0.8f,0.8f,1), D3DXCOLOR(1,0.2f,0.2f,1) );
|
||||
}
|
||||
|
||||
|
||||
void ScreenSandbox::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
switch( SM )
|
||||
|
||||
@@ -30,6 +30,6 @@ public:
|
||||
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
||||
virtual void HandleScreenMessage( const ScreenMessage SM );
|
||||
|
||||
Sprite m_spr;
|
||||
BitmapText m_text;
|
||||
};
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ ScreenSelectCourse::ScreenSelectCourse()
|
||||
m_sprOptionsMessage.StopAnimating();
|
||||
m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprOptionsMessage.SetZoomY( 0 );
|
||||
m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprOptionsMessage );
|
||||
|
||||
|
||||
@@ -286,13 +286,13 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn )
|
||||
m_bMadeChoice = true;
|
||||
|
||||
// show "hold START for options"
|
||||
m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade in
|
||||
m_sprOptionsMessage.SetTweenZoomY( 1 );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprOptionsMessage.BeginTweening( 2.0f ); // sleep
|
||||
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out
|
||||
m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetTweenZoomY( 0 );
|
||||
|
||||
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
||||
|
||||
@@ -147,7 +147,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
||||
m_sprJoinMessagehadow[p].StopAnimating();
|
||||
m_sprJoinMessagehadow[p].SetState( p );
|
||||
m_sprJoinMessagehadow[p].TurnShadowOff();
|
||||
m_sprJoinMessagehadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0.6f) );
|
||||
m_sprJoinMessagehadow[p].SetDiffuse( RageColor(0,0,0,0.6f) );
|
||||
m_framePages.AddChild( &m_sprJoinMessagehadow[p] );
|
||||
|
||||
m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "select difficulty cursor 2x1") );
|
||||
@@ -160,7 +160,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
||||
m_sprOK[p].Load( THEME->GetPathTo("Graphics", "select difficulty ok 2x1") );
|
||||
m_sprOK[p].SetState( p );
|
||||
m_sprOK[p].StopAnimating();
|
||||
m_sprOK[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOK[p].SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_framePages.AddChild( &m_sprOK[p] );
|
||||
}
|
||||
|
||||
@@ -426,16 +426,16 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
|
||||
|
||||
m_sprOK[pn].SetX( CURSOR_X(iSelection, pn) );
|
||||
m_sprOK[pn].SetY( CURSOR_Y(iSelection, pn) );
|
||||
m_sprOK[pn].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOK[pn].SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOK[pn].SetZoom( 2 );
|
||||
|
||||
m_sprOK[pn].BeginTweening( 0.2f );
|
||||
m_sprOK[pn].SetTweenZoom( 1 );
|
||||
m_sprOK[pn].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprOK[pn].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
m_sprJoinMessagehadow[pn].BeginTweening( 0.2f );
|
||||
m_sprJoinMessagehadow[pn].BeginTweening( 0.2f );
|
||||
m_sprJoinMessagehadow[pn].SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_sprJoinMessagehadow[pn].SetDiffuse( RageColor(0,0,0,0) );
|
||||
|
||||
|
||||
// check to see if everyone has chosen
|
||||
@@ -470,7 +470,7 @@ void ScreenSelectDifficulty::TweenOffScreen()
|
||||
m_sprExplanation[p].SetTweenXY( EXPLANATION_X(p)+700, EXPLANATION_Y(p) );
|
||||
|
||||
m_sprMoreArrows[p].BeginTweening( 0.5 );
|
||||
m_sprMoreArrows[p].SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprMoreArrows[p].SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
}
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
@@ -485,7 +485,7 @@ void ScreenSelectDifficulty::TweenOffScreen()
|
||||
m_sprOK[p].SetTweenZoom( 0 );
|
||||
|
||||
m_sprJoinMessagehadow[p].BeginTweening( 0.3f );
|
||||
m_sprJoinMessagehadow[p].SetTweenDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_sprJoinMessagehadow[p].SetTweenDiffuse( RageColor(0,0,0,0) );
|
||||
}
|
||||
|
||||
for( int d=0; d<NUM_DIFFICULTY_ITEMS; d++ )
|
||||
@@ -525,9 +525,9 @@ void ScreenSelectDifficulty::TweenOnScreen()
|
||||
m_sprExplanation[p].BeginTweening( 0.3f, Actor::TWEEN_BOUNCE_END );
|
||||
m_sprExplanation[p].SetTweenXY( EXPLANATION_X(p), EXPLANATION_Y(p) );
|
||||
|
||||
m_sprMoreArrows[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprMoreArrows[p].SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprMoreArrows[p].BeginTweening( 0.5 );
|
||||
m_sprMoreArrows[p].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprMoreArrows[p].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
@@ -539,19 +539,19 @@ void ScreenSelectDifficulty::TweenOnScreen()
|
||||
|
||||
m_sprCursor[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
|
||||
/*
|
||||
m_sprCursor[p].SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprCursor[p].SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprCursor[p].SetRotation( D3DX_PI );
|
||||
m_sprCursor[p].SetZoom( 2 );
|
||||
m_sprCursor[p].BeginTweening( 0.3f );
|
||||
m_sprCursor[p].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprCursor[p].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprCursor[p].SetTweenRotationZ( 0 );
|
||||
m_sprCursor[p].SetTweenZoom( 1 );
|
||||
*/
|
||||
m_sprCursor[p].FadeOn( 0, "SpinZ ZoomX ZoomY Fade", 0.3f );
|
||||
|
||||
m_sprJoinMessagehadow[p].SetXY( CURSOR_X(iSelection,(PlayerNumber)p), CURSOR_Y(iSelection,(PlayerNumber)p) );
|
||||
D3DXCOLOR colorOriginal = m_sprJoinMessagehadow[p].GetDiffuse();
|
||||
m_sprJoinMessagehadow[p].SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
RageColor colorOriginal = m_sprJoinMessagehadow[p].GetDiffuse();
|
||||
m_sprJoinMessagehadow[p].SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_sprJoinMessagehadow[p].BeginTweening( 0.3f );
|
||||
m_sprJoinMessagehadow[p].SetTweenDiffuse( colorOriginal );
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ ScreenSelectMode::ScreenSelectMode()
|
||||
m_sprJoinMessage[p].SetState( p );
|
||||
m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) );
|
||||
if( BOUNCE_JOIN_MESSAGE )
|
||||
m_sprJoinMessage[p].SetEffectBouncing( D3DXVECTOR3(0,10,0), 0.5f );
|
||||
m_sprJoinMessage[p].SetEffectBouncing( RageVector3(0,10,0), 0.5f );
|
||||
this->AddChild( &m_sprJoinMessage[p] );
|
||||
|
||||
if( GAMESTATE->m_bSideIsJoined[p] )
|
||||
|
||||
@@ -150,8 +150,8 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
m_textSongOptions.SetXY( SONG_OPTIONS_X, SONG_OPTIONS_Y );
|
||||
m_textSongOptions.SetZoom( 0.5f );
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
m_textSongOptions.SetEffectCamelion( 2.5f, D3DXCOLOR(1,0,0,1), D3DXCOLOR(1,1,1,1) ); // blink red
|
||||
m_textSongOptions.SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
||||
m_textSongOptions.SetEffectCamelion( 2.5f, RageColor(1,0,0,1), RageColor(1,1,1,1) ); // blink red
|
||||
m_textSongOptions.SetDiffuse( RageColor(1,1,1,1) ); // white
|
||||
this->AddChild( &m_textSongOptions );
|
||||
|
||||
/*
|
||||
@@ -166,8 +166,8 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
m_textPlayerOptions[p].SetHorizAlign( p==PLAYER_1 ? Actor::align_left : Actor::align_right );
|
||||
m_textPlayerOptions[p].SetVertAlign( Actor::align_middle );
|
||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||
m_textPlayerOptions[p].SetEffectCamelion( 2.5f, D3DXCOLOR(1,0,0,1), D3DXCOLOR(1,1,1,1) ); // blink red
|
||||
m_textPlayerOptions[p].SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
||||
m_textPlayerOptions[p].SetEffectCamelion( 2.5f, RageColor(1,0,0,1), RageColor(1,1,1,1) ); // blink red
|
||||
m_textPlayerOptions[p].SetDiffuse( RageColor(1,1,1,1) ); // white
|
||||
this->AddChild( &m_textPlayerOptions[p] );
|
||||
}
|
||||
*/
|
||||
@@ -220,7 +220,7 @@ ScreenSelectMusic::ScreenSelectMusic()
|
||||
m_sprOptionsMessage.StopAnimating();
|
||||
m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y );
|
||||
m_sprOptionsMessage.SetZoom( 1 );
|
||||
m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprOptionsMessage );
|
||||
|
||||
|
||||
@@ -389,9 +389,9 @@ void ScreenSelectMusic::Update( float fDeltaTime )
|
||||
fNewRotation = fmodf( fNewRotation, D3DX_PI*2 );
|
||||
m_sprCDTitle.SetRotationY( fNewRotation );
|
||||
if( fNewRotation > D3DX_PI/2 && fNewRotation <= D3DX_PI*3.0f/2 )
|
||||
m_sprCDTitle.SetDiffuse( D3DXCOLOR(0.2f,0.2f,0.2f,1) );
|
||||
m_sprCDTitle.SetDiffuse( RageColor(0.2f,0.2f,0.2f,1) );
|
||||
else
|
||||
m_sprCDTitle.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprCDTitle.SetDiffuse( RageColor(1,1,1,1) );
|
||||
}
|
||||
|
||||
void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||
@@ -636,13 +636,13 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn )
|
||||
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
|
||||
{
|
||||
// show "hold START for options"
|
||||
m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade in
|
||||
m_sprOptionsMessage.SetTweenZoomY( 1 );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprOptionsMessage.BeginTweening( 2.0f ); // sleep
|
||||
m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out
|
||||
m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprOptionsMessage.SetTweenZoomY( 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -165,21 +165,21 @@ void ScreenSelectStyle::AfterChange()
|
||||
m_sprPreview.Load( THEME->GetPathTo("Graphics",ssprintf("select style preview %s %s",pGameDef->m_szName,pStyleDef->m_szName)) );
|
||||
|
||||
m_sprPreview.StopTweening();
|
||||
m_sprPreview.SetGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprPreview.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprPreview.SetGlow( RageColor(1,1,1,0) );
|
||||
m_sprPreview.SetDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_sprPreview.BeginTweening( 0.25f ); // sleep
|
||||
|
||||
m_sprPreview.BeginTweening( 0.2f ); // fade to white
|
||||
m_sprPreview.SetTweenGlow( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPreview.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprPreview.SetTweenGlow( RageColor(1,1,1,1) );
|
||||
m_sprPreview.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_sprPreview.BeginTweening( 0.01f ); // turn color on
|
||||
m_sprPreview.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPreview.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
m_sprPreview.BeginTweening( 0.2f ); // fade to color
|
||||
m_sprPreview.SetTweenGlow( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprPreview.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPreview.SetTweenGlow( RageColor(1,1,1,0) );
|
||||
m_sprPreview.SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
|
||||
// Tween Info
|
||||
@@ -328,9 +328,9 @@ void ScreenSelectStyle::UpdateEnabledDisabled()
|
||||
for( i=0; i<m_aPossibleStyles.GetSize(); i++ )
|
||||
{
|
||||
if( IsEnabled(i) )
|
||||
m_sprIcon[i].SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprIcon[i].SetDiffuse( RageColor(1,1,1,1) );
|
||||
else
|
||||
m_sprIcon[i].SetDiffuse( D3DXCOLOR(0.5f,0.5f,0.5f,1) );
|
||||
m_sprIcon[i].SetDiffuse( RageColor(0.5f,0.5f,0.5f,1) );
|
||||
}
|
||||
|
||||
// Select first enabled style
|
||||
|
||||
@@ -100,10 +100,10 @@ const float HELP_Y = SCREEN_HEIGHT-20;
|
||||
|
||||
const float TWEEN_TIME = 0.35f;
|
||||
|
||||
const D3DXCOLOR COLOR_P1_SELECTED = D3DXCOLOR(0.4f,1.0f,0.8f,1);
|
||||
const D3DXCOLOR COLOR_P2_SELECTED = D3DXCOLOR(1.0f,0.5f,0.2f,1);
|
||||
const D3DXCOLOR COLOR_P1_NOT_SELECTED = COLOR_P1_SELECTED*0.5f + D3DXCOLOR(0,0,0,0.5f);
|
||||
const D3DXCOLOR COLOR_P2_NOT_SELECTED = COLOR_P2_SELECTED*0.5f + D3DXCOLOR(0,0,0,0.5f);
|
||||
const RageColor COLOR_P1_SELECTED = RageColor(0.4f,1.0f,0.8f,1);
|
||||
const RageColor COLOR_P2_SELECTED = RageColor(1.0f,0.5f,0.2f,1);
|
||||
const RageColor COLOR_P1_NOT_SELECTED = COLOR_P1_SELECTED*0.5f + RageColor(0,0,0,0.5f);
|
||||
const RageColor COLOR_P2_NOT_SELECTED = COLOR_P2_SELECTED*0.5f + RageColor(0,0,0,0.5f);
|
||||
|
||||
|
||||
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User + 1);
|
||||
@@ -147,7 +147,7 @@ ScreenSelectStyle5th::ScreenSelectStyle5th()
|
||||
|
||||
|
||||
m_textExplanation1.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||
m_textExplanation1.SetDiffuse( D3DXCOLOR(0,0.7f,0,1) );
|
||||
m_textExplanation1.SetDiffuse( RageColor(0,0.7f,0,1) );
|
||||
m_textExplanation1.SetXY( EXPLANATION1_X, EXPLANATION1_Y );
|
||||
m_textExplanation1.SetZ( -1 );
|
||||
m_textExplanation1.SetZoomX( EXPLANATION1_ZOOM_X );
|
||||
@@ -156,7 +156,7 @@ ScreenSelectStyle5th::ScreenSelectStyle5th()
|
||||
this->AddChild( &m_textExplanation1 );
|
||||
|
||||
m_textExplanation2.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||
m_textExplanation2.SetDiffuse( D3DXCOLOR(0,0.7f,0,1) );
|
||||
m_textExplanation2.SetDiffuse( RageColor(0,0.7f,0,1) );
|
||||
m_textExplanation2.SetXY( EXPLANATION2_X, EXPLANATION2_Y );
|
||||
m_textExplanation2.SetZ( -1 );
|
||||
m_textExplanation2.SetZoomX( EXPLANATION2_ZOOM_X );
|
||||
@@ -344,7 +344,7 @@ void ScreenSelectStyle5th::AfterChange()
|
||||
{
|
||||
case 0:
|
||||
m_sprPad[0].BeginTweening( TWEEN_TIME );
|
||||
m_sprPad[0].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPad[0].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprDancer[0].BeginTweening( TWEEN_TIME );
|
||||
m_sprDancer[0].SetTweenDiffuse( COLOR_P1_SELECTED );
|
||||
m_sprDancer[0].StartAnimating();
|
||||
@@ -352,7 +352,7 @@ void ScreenSelectStyle5th::AfterChange()
|
||||
break;
|
||||
case 1:
|
||||
m_sprPad[1].BeginTweening( TWEEN_TIME );
|
||||
m_sprPad[1].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPad[1].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprDancer[1].BeginTweening( TWEEN_TIME );
|
||||
m_sprDancer[1].SetTweenDiffuse( COLOR_P1_SELECTED );
|
||||
m_sprDancer[1].StartAnimating();
|
||||
@@ -363,7 +363,7 @@ void ScreenSelectStyle5th::AfterChange()
|
||||
break;
|
||||
case 2:
|
||||
m_sprPad[2].BeginTweening( TWEEN_TIME );
|
||||
m_sprPad[2].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPad[2].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprDancer[3].BeginTweening( TWEEN_TIME );
|
||||
m_sprDancer[3].SetTweenDiffuse( COLOR_P1_SELECTED );
|
||||
m_sprDancer[3].StartAnimating();
|
||||
@@ -371,7 +371,7 @@ void ScreenSelectStyle5th::AfterChange()
|
||||
break;
|
||||
case 3:
|
||||
m_sprPad[3].BeginTweening( TWEEN_TIME );
|
||||
m_sprPad[3].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPad[3].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprDancer[4].BeginTweening( TWEEN_TIME );
|
||||
m_sprDancer[4].SetTweenDiffuse( COLOR_P1_SELECTED );
|
||||
m_sprDancer[4].StartAnimating();
|
||||
@@ -382,7 +382,7 @@ void ScreenSelectStyle5th::AfterChange()
|
||||
break;
|
||||
case 4:
|
||||
m_sprPad[4].BeginTweening( TWEEN_TIME );
|
||||
m_sprPad[4].SetTweenDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprPad[4].SetTweenDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprDancer[6].BeginTweening( TWEEN_TIME );
|
||||
m_sprDancer[6].SetTweenDiffuse( COLOR_P1_SELECTED );
|
||||
m_sprDancer[6].StartAnimating();
|
||||
|
||||
@@ -206,7 +206,7 @@ ScreenStage::ScreenStage()
|
||||
|
||||
/* The quadMask masks out draws via Z; it doesn't actually erase
|
||||
* anything, so make it transparent. */
|
||||
m_quadMask.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_quadMask.SetDiffuse( RageColor(0,0,0,0) );
|
||||
m_quadMask.StretchTo( CRect(SCREEN_LEFT, int(roundf(fStageOffScreenY-fStageHeight/2)),
|
||||
SCREEN_RIGHT, int(roundf(fStageOffScreenY+fStageHeight/2))) );
|
||||
/* Put the quad mask on top, so draws to the Stage will be "under" it. */
|
||||
@@ -381,17 +381,17 @@ ScreenStage::ScreenStage()
|
||||
for (i=0; i<2; i++) // initialize the UK MOVE text and positions
|
||||
{
|
||||
m_ez2ukm[i].SetText( "STEPMANIA EZ2 MOVE" ); // choose something better if you like ;)
|
||||
m_ez2ukm[i].SetDiffuse( D3DXCOLOR(1,1,1,1) ); // it's white
|
||||
m_ez2ukm[i].SetDiffuse( RageColor(1,1,1,1) ); // it's white
|
||||
m_ez2ukm[i].BeginTweening(0.5f); // start it tweening
|
||||
if (stage_mode == MODE_FINAL)
|
||||
{
|
||||
m_stagedesc[i].SetText( "FINAL FINAL FINAL FINAL FINAL FINAL FINAL FINAL FINAL FINAL" ); // this is the desc text for final stage
|
||||
m_stagedesc[i].SetDiffuse( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // it's blueish
|
||||
m_stagedesc[i].SetDiffuse( RageColor(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // it's blueish
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stagedesc[i].SetText( "NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT NEXT" ); // normal stages use this text
|
||||
m_stagedesc[i].SetDiffuse( D3DXCOLOR(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // it's orangey
|
||||
m_stagedesc[i].SetDiffuse( RageColor(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // it's orangey
|
||||
}
|
||||
m_stagedesc[i].BeginTweening(0.5f); // start tweening the descriptions
|
||||
|
||||
@@ -496,11 +496,11 @@ ScreenStage::ScreenStage()
|
||||
default: m_stagename.SetText( "" ); break; // make this text disappear.
|
||||
}
|
||||
|
||||
m_stagename.SetDiffuse( D3DXCOLOR(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // orangey colour
|
||||
m_stagename.SetDiffuse( RageColor(1.0f/225.0f*166.0f,1.0f/225.0f*83.0f,1/225.0f*16.0f,1) ); // orangey colour
|
||||
|
||||
if (stage_mode == MODE_FINAL) // if we're final stage
|
||||
{
|
||||
m_stagename.SetDiffuse( D3DXCOLOR(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // blueish colour
|
||||
m_stagename.SetDiffuse( RageColor(1.0f/225.0f*227.0f,1.0f/225.0f*228.0f,1/225.0f*255.0f,1) ); // blueish colour
|
||||
m_stagename.SetText( "THE FINAL STAGE" );
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ ScreenTextEntry::ScreenTextEntry( ScreenMessage SM_SendWhenDone, CString sQuesti
|
||||
m_bCancelled = false;
|
||||
|
||||
m_Fade.SetTransitionTime( 0.5f );
|
||||
m_Fade.SetDiffuse( D3DXCOLOR(0,0,0,0.7f) );
|
||||
m_Fade.SetDiffuse( RageColor(0,0,0,0.7f) );
|
||||
m_Fade.SetOpened();
|
||||
m_Fade.CloseWipingRight();
|
||||
this->AddChild( &m_Fade );
|
||||
@@ -45,7 +45,7 @@ ScreenTextEntry::ScreenTextEntry( ScreenMessage SM_SendWhenDone, CString sQuesti
|
||||
m_textQuestion.SetXY( QUESTION_X, QUESTION_Y );
|
||||
this->AddChild( &m_textQuestion );
|
||||
|
||||
m_rectAnswerBox.SetDiffuse( D3DXCOLOR(0.5f,0.5f,1.0f,0.7f) );
|
||||
m_rectAnswerBox.SetDiffuse( RageColor(0.5f,0.5f,1.0f,0.7f) );
|
||||
this->AddChild( &m_rectAnswerBox );
|
||||
|
||||
m_rectAnswerBox.SetXY( ANSWER_X, ANSWER_Y );
|
||||
@@ -171,15 +171,15 @@ void ScreenTextEntry::MenuStart( PlayerNumber pn )
|
||||
m_Fade.OpenWipingRight( SM_DoneOpeningWipingRight );
|
||||
|
||||
m_textQuestion.BeginTweening( 0.2f );
|
||||
m_textQuestion.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textQuestion.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_rectAnswerBox.BeginTweening( 0.2f );
|
||||
m_rectAnswerBox.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_rectAnswerBox.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
m_textAnswer.SetEffectNone();
|
||||
|
||||
m_textAnswer.BeginTweening( 0.2f );
|
||||
m_textAnswer.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_textAnswer.SetTweenDiffuse( RageColor(1,1,1,0) );
|
||||
|
||||
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
||||
"GAME START",
|
||||
"NETWORK GAME",
|
||||
"SWITCH GAME",
|
||||
"CONFIG KEY/JOY",
|
||||
"INPUT OPTIONS",
|
||||
@@ -97,12 +98,12 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
|
||||
m_sprLogo.Load( THEME->GetPathTo("Graphics",ssprintf("title menu logo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) );
|
||||
m_sprLogo.SetXY( LOGO_X, LOGO_Y );
|
||||
m_sprLogo.SetGlow( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprLogo.SetGlow( RageColor(1,1,1,1) );
|
||||
m_sprLogo.SetZoomY( 0 );
|
||||
m_sprLogo.StopTweening();
|
||||
m_sprLogo.BeginTweening( 0.5f ); // sleep
|
||||
m_sprLogo.BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END );
|
||||
m_sprLogo.SetEffectGlowing(1, D3DXCOLOR(1,1,1,0.1f), D3DXCOLOR(1,1,1,0.3f) );
|
||||
m_sprLogo.SetEffectGlowing(1, RageColor(1,1,1,0.1f), RageColor(1,1,1,0.3f) );
|
||||
m_sprLogo.SetTweenZoom( 1 );
|
||||
this->AddChild( &m_sprLogo );
|
||||
|
||||
@@ -117,7 +118,7 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
|
||||
m_textVersion.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textVersion.SetText( "v3.0 final" );
|
||||
m_textVersion.SetDiffuse( D3DXCOLOR(0.6f,0.6f,0.6f,1) ); // light gray
|
||||
m_textVersion.SetDiffuse( RageColor(0.6f,0.6f,0.6f,1) ); // light gray
|
||||
m_textVersion.SetXY( VERSION_X, VERSION_Y );
|
||||
m_textVersion.SetZoom( 0.5f );
|
||||
m_textVersion.SetShadowLength( 2 );
|
||||
@@ -127,7 +128,7 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
m_textSongs.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||
m_textSongs.SetHorizAlign( Actor::align_left );
|
||||
m_textSongs.SetText( ssprintf("Found %d Songs", SONGMAN->m_pSongs.GetSize()) );
|
||||
m_textSongs.SetDiffuse( D3DXCOLOR(0.6f,0.6f,0.6f,1) ); // light gray
|
||||
m_textSongs.SetDiffuse( RageColor(0.6f,0.6f,0.6f,1) ); // light gray
|
||||
m_textSongs.SetXY( SONGS_X, SONGS_Y );
|
||||
m_textSongs.SetZoom( 0.5f );
|
||||
m_textSongs.SetShadowLength( 2 );
|
||||
@@ -202,6 +203,9 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
case CHOICE_GAME_START:
|
||||
SCREENMAN->SetNewScreen( NEXT_SCREEN );
|
||||
break;
|
||||
case CHOICE_NETWORK_GAME:
|
||||
SCREENMAN->SetNewScreen( "ScreenNetworkGame" );
|
||||
break;
|
||||
case CHOICE_SELECT_GAME:
|
||||
SCREENMAN->SetNewScreen( "ScreenSelectGame" );
|
||||
break;
|
||||
@@ -302,7 +306,7 @@ void ScreenTitleMenu::GainFocus( int iChoiceIndex )
|
||||
m_textChoice[iChoiceIndex].StopTweening();
|
||||
m_textChoice[iChoiceIndex].BeginTweening( 0.3f );
|
||||
m_textChoice[iChoiceIndex].SetTweenZoom( ZOOM_SELECTED );
|
||||
D3DXCOLOR color1, color2;
|
||||
RageColor color1, color2;
|
||||
color1 = COLOR_SELECTED;
|
||||
color2 = color1 * 0.5f;
|
||||
color2.a = 1;
|
||||
@@ -350,6 +354,7 @@ void ScreenTitleMenu::MenuStart( PlayerNumber pn )
|
||||
switch( m_TitleMenuChoice )
|
||||
{
|
||||
case CHOICE_GAME_START:
|
||||
case CHOICE_NETWORK_GAME:
|
||||
case CHOICE_SELECT_GAME:
|
||||
case CHOICE_MAP_INSTRUMENTS:
|
||||
case CHOICE_INPUT_OPTIONS:
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
|
||||
enum TitleMenuChoice {
|
||||
CHOICE_GAME_START = 0,
|
||||
CHOICE_NETWORK_GAME,
|
||||
CHOICE_SELECT_GAME,
|
||||
CHOICE_MAP_INSTRUMENTS,
|
||||
CHOICE_INPUT_OPTIONS,
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
const int DEFAULT_VISIBLE_ELEMENTS = 9;
|
||||
const int DEFAULT_SPACING = 300;
|
||||
|
||||
const D3DXCOLOR COLOR_SELECTED = D3DXCOLOR(1.0f,1.0f,1.0f,1);
|
||||
const D3DXCOLOR COLOR_NOT_SELECTED = D3DXCOLOR(0.4f,0.4f,0.4f,1);
|
||||
const RageColor COLOR_SELECTED = RageColor(1.0f,1.0f,1.0f,1);
|
||||
const RageColor COLOR_NOT_SELECTED = RageColor(0.4f,0.4f,0.4f,1);
|
||||
|
||||
/***************************************
|
||||
ScrollingList
|
||||
|
||||
@@ -44,7 +44,7 @@ void SmallGradeDisplay::SetGrade( PlayerNumber pn, Grade g )
|
||||
{
|
||||
m_Grade = g;
|
||||
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
SetDiffuse( RageColor(1,1,1,1) );
|
||||
|
||||
int iNumCols = 2;
|
||||
switch( g )
|
||||
|
||||
@@ -28,7 +28,7 @@ SnapDisplay::SnapDisplay()
|
||||
}
|
||||
|
||||
m_NoteType = NOTE_TYPE_4TH;
|
||||
D3DXCOLOR color = NoteTypeToColor( m_NoteType );
|
||||
RageColor color = NoteTypeToColor( m_NoteType );
|
||||
|
||||
for( i=0; i<2; i++ )
|
||||
m_sprIndicators[i].SetDiffuse( color );
|
||||
@@ -69,7 +69,7 @@ bool SnapDisplay::NextSnapMode()
|
||||
|
||||
void SnapDisplay::SnapModeChanged()
|
||||
{
|
||||
D3DXCOLOR color = NoteTypeToColor( m_NoteType );
|
||||
RageColor color = NoteTypeToColor( m_NoteType );
|
||||
|
||||
for( int i=0; i<2; i++ )
|
||||
{
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
#include "NotesLoaderKSF.h"
|
||||
#include "NotesWriterDWI.h"
|
||||
|
||||
|
||||
// needed for D3DXGetImageInfo. Remove this ASAP!
|
||||
#include "D3DX8.h"
|
||||
|
||||
const int FILE_CACHE_VERSION = 102; // increment this when Song or Notes changes to invalidate cache
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
-----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//#include <d3dxmath.h>
|
||||
#include "SongManager.h"
|
||||
#include "IniFile.h"
|
||||
#include "RageLog.h"
|
||||
@@ -30,8 +29,8 @@ const CString g_sStatisticsFileName = "statistics.ini";
|
||||
#define GROUP_COLOR( i ) THEME->GetMetricC("SongManager",ssprintf("GroupColor%d",i+1))
|
||||
#define EXTRA_COLOR THEME->GetMetricC("SongManager","ExtraColor")
|
||||
|
||||
D3DXCOLOR g_GroupColors[30];
|
||||
D3DXCOLOR g_ExtraColor;
|
||||
RageColor g_GroupColors[30];
|
||||
RageColor g_ExtraColor;
|
||||
|
||||
|
||||
SongManager::SongManager( void(*callback)() )
|
||||
@@ -383,7 +382,7 @@ void SongManager::GetGroupNames( CStringArray &AddTo )
|
||||
AddTo.insert(AddTo.end(), m_arrayGroupNames.begin(), m_arrayGroupNames.end() );
|
||||
}
|
||||
|
||||
D3DXCOLOR SongManager::GetGroupColor( const CString &sGroupName )
|
||||
RageColor SongManager::GetGroupColor( const CString &sGroupName )
|
||||
{
|
||||
// search for the group index
|
||||
for( int i=0; i<m_arrayGroupNames.GetSize(); i++ )
|
||||
@@ -396,7 +395,7 @@ D3DXCOLOR SongManager::GetGroupColor( const CString &sGroupName )
|
||||
return g_GroupColors[i%NUM_GROUP_COLORS];
|
||||
}
|
||||
|
||||
D3DXCOLOR SongManager::GetSongColor( Song* pSong )
|
||||
RageColor SongManager::GetSongColor( Song* pSong )
|
||||
{
|
||||
ASSERT( pSong );
|
||||
for( int i=0; i<pSong->m_apNotes.GetSize(); i++ )
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "Song.h"
|
||||
#include "Course.h"
|
||||
//#include <d3dxmath.h> // for D3DXCOLOR
|
||||
|
||||
const int MAX_SONG_QUEUE_SIZE = 400; // this has to be gigantic to fit an "endless" number of songs
|
||||
|
||||
@@ -36,8 +35,8 @@ public:
|
||||
|
||||
CString GetGroupBannerPath( CString sGroupName );
|
||||
void GetGroupNames( CStringArray &AddTo );
|
||||
D3DXCOLOR GetGroupColor( const CString &sGroupName );
|
||||
D3DXCOLOR GetSongColor( Song* pSong );
|
||||
RageColor GetGroupColor( const CString &sGroupName );
|
||||
RageColor GetSongColor( Song* pSong );
|
||||
|
||||
static CString ShortenGroupName( const CString &sOrigGroupName );
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ SongSelector::SongSelector()
|
||||
|
||||
m_textGroup.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||
m_textGroup.SetXY( GROUP_X, GROUP_Y );
|
||||
m_textGroup.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
|
||||
m_textGroup.SetDiffuse( RageColor(0.7f,0.7f,0.7f,1) );
|
||||
m_textGroup.SetText( "blah" );
|
||||
this->AddChild( &m_textGroup );
|
||||
|
||||
@@ -60,23 +60,23 @@ SongSelector::SongSelector()
|
||||
|
||||
m_sprArrowLeft.Load( THEME->GetPathTo("Graphics","edit menu left") );
|
||||
m_sprArrowLeft.SetXY( ARROWS_X[0], ARROWS_Y[0] );
|
||||
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprArrowLeft.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprArrowLeft );
|
||||
|
||||
m_sprArrowRight.Load( THEME->GetPathTo("Graphics","edit menu right") );
|
||||
m_sprArrowRight.SetXY( ARROWS_X[1], ARROWS_Y[1] );
|
||||
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprArrowRight.SetDiffuse( RageColor(1,1,1,0) );
|
||||
this->AddChild( &m_sprArrowRight );
|
||||
|
||||
m_textStyle.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||
m_textStyle.SetXY( GAME_STYLE_X, GAME_STYLE_Y );
|
||||
m_textStyle.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
|
||||
m_textStyle.SetDiffuse( RageColor(0.7f,0.7f,0.7f,1) );
|
||||
m_textStyle.SetText( "blah" );
|
||||
this->AddChild( &m_textStyle );
|
||||
|
||||
m_textNotes.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||
m_textNotes.SetXY( STEPS_X, STEPS_Y );
|
||||
m_textNotes.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
|
||||
m_textNotes.SetDiffuse( RageColor(0.7f,0.7f,0.7f,1) );
|
||||
m_textNotes.SetText( "blah" );
|
||||
this->AddChild( &m_textNotes );
|
||||
|
||||
@@ -216,8 +216,8 @@ void SongSelector::Right()
|
||||
void SongSelector::ChangeSelectedRow( SelectedRow row )
|
||||
{
|
||||
m_textGroup.SetEffectNone();
|
||||
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||
m_sprArrowLeft.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_sprArrowRight.SetDiffuse( RageColor(1,1,1,0) );
|
||||
m_textStyle.SetEffectNone();
|
||||
m_textNotes.SetEffectNone();
|
||||
m_SelectedRow = row;
|
||||
@@ -226,8 +226,8 @@ void SongSelector::ChangeSelectedRow( SelectedRow row )
|
||||
{
|
||||
case ROW_GROUP: m_textGroup.SetEffectGlowing(); break;
|
||||
case ROW_SONG:
|
||||
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||
m_sprArrowLeft.SetDiffuse( RageColor(1,1,1,1) );
|
||||
m_sprArrowRight.SetDiffuse( RageColor(1,1,1,1) );
|
||||
break;
|
||||
case ROW_STYLE: m_textStyle.SetEffectGlowing(); break;
|
||||
case ROW_STEPS: m_textNotes.SetEffectGlowing(); break;
|
||||
|
||||
+19
-19
@@ -222,20 +222,20 @@ void Sprite::DrawPrimitives()
|
||||
}
|
||||
|
||||
|
||||
static RAGEVERTEX v[4];
|
||||
static RageVertex v[4];
|
||||
|
||||
v[0].p = D3DXVECTOR3( quadVerticies.left, quadVerticies.bottom, 0 ); // bottom left
|
||||
v[1].p = D3DXVECTOR3( quadVerticies.left, quadVerticies.top, 0 ); // top left
|
||||
v[2].p = D3DXVECTOR3( quadVerticies.right, quadVerticies.bottom, 0 ); // bottom right
|
||||
v[3].p = D3DXVECTOR3( quadVerticies.right, quadVerticies.top, 0 ); // top right
|
||||
v[0].p = RageVector3( quadVerticies.left, quadVerticies.bottom, 0 ); // bottom left
|
||||
v[1].p = RageVector3( quadVerticies.left, quadVerticies.top, 0 ); // top left
|
||||
v[2].p = RageVector3( quadVerticies.right, quadVerticies.bottom, 0 ); // bottom right
|
||||
v[3].p = RageVector3( quadVerticies.right, quadVerticies.top, 0 ); // top right
|
||||
|
||||
|
||||
if( m_bUsingCustomTexCoords )
|
||||
{
|
||||
v[0].t = D3DXVECTOR2( m_CustomTexCoords[0], m_CustomTexCoords[1] ); // bottom left
|
||||
v[1].t = D3DXVECTOR2( m_CustomTexCoords[2], m_CustomTexCoords[3] ); // top left
|
||||
v[2].t = D3DXVECTOR2( m_CustomTexCoords[4], m_CustomTexCoords[5] ); // bottom right
|
||||
v[3].t = D3DXVECTOR2( m_CustomTexCoords[6], m_CustomTexCoords[7] ); // top right
|
||||
v[0].t = RageVector2( m_CustomTexCoords[0], m_CustomTexCoords[1] ); // bottom left
|
||||
v[1].t = RageVector2( m_CustomTexCoords[2], m_CustomTexCoords[3] ); // top left
|
||||
v[2].t = RageVector2( m_CustomTexCoords[4], m_CustomTexCoords[5] ); // bottom right
|
||||
v[3].t = RageVector2( m_CustomTexCoords[6], m_CustomTexCoords[7] ); // top right
|
||||
|
||||
DISPLAY->EnableTextureWrapping();
|
||||
}
|
||||
@@ -244,10 +244,10 @@ void Sprite::DrawPrimitives()
|
||||
UINT uFrameNo = m_iStateToFrame[m_iCurState];
|
||||
FRECT* pTexCoordRect = m_pTexture->GetTextureCoordRect( uFrameNo );
|
||||
|
||||
v[0].t = D3DXVECTOR2( pTexCoordRect->left, pTexCoordRect->bottom ); // bottom left
|
||||
v[1].t = D3DXVECTOR2( pTexCoordRect->left, pTexCoordRect->top ); // top left
|
||||
v[2].t = D3DXVECTOR2( pTexCoordRect->right, pTexCoordRect->bottom ); // bottom right
|
||||
v[3].t = D3DXVECTOR2( pTexCoordRect->right, pTexCoordRect->top ); // top right
|
||||
v[0].t = RageVector2( pTexCoordRect->left, pTexCoordRect->bottom ); // bottom left
|
||||
v[1].t = RageVector2( pTexCoordRect->left, pTexCoordRect->top ); // top left
|
||||
v[2].t = RageVector2( pTexCoordRect->right, pTexCoordRect->bottom ); // bottom right
|
||||
v[3].t = RageVector2( pTexCoordRect->right, pTexCoordRect->top ); // top right
|
||||
|
||||
// if the texture has more than one frame, we're going to get border mess from the
|
||||
// neighboring frame, so don't bother turning wrapping off.
|
||||
@@ -278,7 +278,7 @@ void Sprite::DrawPrimitives()
|
||||
{
|
||||
DISPLAY->PushMatrix();
|
||||
DISPLAY->TranslateLocal( m_fShadowLength, m_fShadowLength, 0 ); // shift by 5 units
|
||||
v[0].color = v[1].color = v[2].color = v[3].color = D3DXCOLOR(0,0,0,0.5f*m_temp.diffuse[0].a); // semi-transparent black
|
||||
v[0].c = v[1].c = v[2].c = v[3].c = RageColor(0,0,0,0.5f*m_temp.diffuse[0].a); // semi-transparent black
|
||||
DISPLAY->AddQuad( v );
|
||||
DISPLAY->PopMatrix();
|
||||
}
|
||||
@@ -286,10 +286,10 @@ void Sprite::DrawPrimitives()
|
||||
//////////////////////
|
||||
// render the diffuse pass
|
||||
//////////////////////
|
||||
v[0].color = m_temp.diffuse[2]; // bottom left
|
||||
v[1].color = m_temp.diffuse[0]; // top left
|
||||
v[2].color = m_temp.diffuse[3]; // bottom right
|
||||
v[3].color = m_temp.diffuse[1]; // top right
|
||||
v[0].c = m_temp.diffuse[2]; // bottom left
|
||||
v[1].c = m_temp.diffuse[0]; // top left
|
||||
v[2].c = m_temp.diffuse[3]; // bottom right
|
||||
v[3].c = m_temp.diffuse[1]; // top right
|
||||
DISPLAY->AddQuad( v );
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ void Sprite::DrawPrimitives()
|
||||
if( m_temp.glow.a != 0 )
|
||||
{
|
||||
DISPLAY->SetColorDiffuse();
|
||||
v[0].color = v[1].color = v[2].color = v[3].color = m_temp.glow;
|
||||
v[0].c = v[1].c = v[2].c = v[3].c = m_temp.glow;
|
||||
DISPLAY->AddQuad( v );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,9 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include <d3d8.h>
|
||||
#include <d3dx8math.h>
|
||||
// Don't include these everywhere. They're big. -Chris
|
||||
//#include <d3d8.h>
|
||||
//#include <d3dx8math.h>
|
||||
|
||||
#ifndef DIRECTINPUT_VERSION
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "RageInput.h"
|
||||
#include "RageTimer.h"
|
||||
#include "RageException.h"
|
||||
#include "RageNetwork.h"
|
||||
#include "RageMath.h"
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
@@ -709,6 +711,7 @@ HRESULT CreateObjects( HWND hWnd )
|
||||
ANNOUNCER = new AnnouncerManager;
|
||||
INPUTFILTER = new InputFilter();
|
||||
INPUTMAPPER = new InputMapper();
|
||||
NETWORK = new RageNetwork();
|
||||
INPUTQUEUE = new InputQueue();
|
||||
SONGINDEX = new SongCacheIndex();
|
||||
/* depends on SONGINDEX: */
|
||||
@@ -749,6 +752,7 @@ HRESULT CreateObjects( HWND hWnd )
|
||||
void DestroyObjects()
|
||||
{
|
||||
SAFE_DELETE( SCREENMAN );
|
||||
SAFE_DELETE( NETWORK );
|
||||
SAFE_DELETE( INPUTQUEUE );
|
||||
SAFE_DELETE( INPUTMAPPER );
|
||||
SAFE_DELETE( INPUTFILTER );
|
||||
@@ -858,6 +862,52 @@ void Update()
|
||||
|
||||
SCREENMAN->Update( fDeltaTime );
|
||||
|
||||
NETWORK->Update( fDeltaTime );
|
||||
|
||||
// handle network input
|
||||
Packet packet;
|
||||
while( NETWORK->Recv(&packet) )
|
||||
{
|
||||
SCREENMAN->SystemMessage( "Packet Recv'd" );
|
||||
|
||||
// process pPacket
|
||||
switch( packet.type )
|
||||
{
|
||||
case Packet::chat:
|
||||
SCREENMAN->SystemMessage( (char*)packet.GetData() );
|
||||
break;
|
||||
case Packet::input:
|
||||
{
|
||||
GameInput* pGI;
|
||||
pGI = (GameInput*)packet.GetData();
|
||||
ASSERT( packet.GetSize() == sizeof(GameInput) );
|
||||
|
||||
DeviceInput DeviceI;
|
||||
InputEventType type;
|
||||
GameInput GameI;
|
||||
MenuInput MenuI;
|
||||
StyleInput StyleI;
|
||||
|
||||
DeviceI.MakeInvalid();
|
||||
type = IET_FIRST_PRESS;
|
||||
|
||||
GameI = *pGI;
|
||||
|
||||
if( GameI.IsValid() && type == IET_FIRST_PRESS )
|
||||
INPUTQUEUE->RememberInput( GameI );
|
||||
if( GameI.IsValid() )
|
||||
{
|
||||
INPUTMAPPER->GameToMenu( GameI, MenuI );
|
||||
INPUTMAPPER->GameToStyle( GameI, StyleI );
|
||||
}
|
||||
|
||||
SCREENMAN->Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(0); // corrupt packet? Not a type we recognize
|
||||
}
|
||||
}
|
||||
|
||||
static InputEventArray ieArray;
|
||||
ieArray.clear(); // empty the array
|
||||
@@ -882,6 +932,17 @@ void Update()
|
||||
}
|
||||
|
||||
SCREENMAN->Input( DeviceI, type, GameI, MenuI, StyleI );
|
||||
|
||||
if( GameI.IsValid() && type == IET_FIRST_PRESS )
|
||||
{
|
||||
Packet packet;
|
||||
packet.type = Packet::input;
|
||||
packet.SetData( &GameI, sizeof(GameInput) );
|
||||
|
||||
NETWORK->Send( &packet );
|
||||
|
||||
SCREENMAN->SystemMessage( "Packet Sent" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -913,12 +974,12 @@ void Render()
|
||||
case S_OK:
|
||||
{
|
||||
// calculate view and projection transforms
|
||||
D3DXMATRIX mat;
|
||||
RageMatrix mat;
|
||||
|
||||
D3DXMatrixOrthoOffCenterLH( &mat, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1000, 1000 );
|
||||
RageMatrixOrthoOffCenterLH( &mat, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1000, 1000 );
|
||||
DISPLAY->SetProjectionTransform( &mat );
|
||||
|
||||
D3DXMatrixIdentity( &mat );
|
||||
RageMatrixIdentity( &mat );
|
||||
DISPLAY->SetViewTransform( &mat );
|
||||
|
||||
DISPLAY->ResetMatrixStack();
|
||||
|
||||
@@ -54,12 +54,13 @@ BSC32=bscmake.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 $(intdir)\verstub.obj /nologo /subsystem:windows /pdb:"../release6/StepMania.pdb" /map /debug /machine:I386
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Release6
|
||||
TargetDir=\temp\stepmania
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=StepMania
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -88,13 +89,13 @@ BSC32=bscmake.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 $(intdir)\verstub.obj /nologo /subsystem:windows /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:I386 /out:"../StepMania-debug.exe"
|
||||
# SUBTRACT LINK32 /profile /incremental:no /nodefaultlib
|
||||
# SUBTRACT LINK32 /profile /pdb:none /incremental:no /nodefaultlib
|
||||
# Begin Special Build Tool
|
||||
IntDir=.\../Debug6
|
||||
TargetDir=\temp\stepmania
|
||||
TargetDir=\stepmania\stepmania
|
||||
TargetName=StepMania-debug
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -186,6 +187,14 @@ SOURCE=.\RageLog.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageMath.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageMath.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageMovieTexture.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -202,6 +211,14 @@ SOURCE=.\RageMusic.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageNetwork.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageNetwork.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageSound.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -250,6 +267,10 @@ SOURCE=.\RageTimer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageTypes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\RageUtil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -1216,6 +1237,14 @@ SOURCE=.\ScreenMusicScroll.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenNetworkGame.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenNetworkGame.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ScreenOptions.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -983,6 +983,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
<File
|
||||
RelativePath="RageLog.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageMath.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageMath.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageMovieTexture.cpp">
|
||||
</File>
|
||||
@@ -1031,6 +1037,9 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
<File
|
||||
RelativePath="RageTimer.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="RageTypes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageUtil.cpp">
|
||||
</File>
|
||||
|
||||
@@ -278,7 +278,7 @@ bool ThemeManager::GetMetricB( CString sClassName, CString sValueName )
|
||||
return atoi( GetMetric(sClassName,sValueName) ) != 0;
|
||||
}
|
||||
|
||||
D3DXCOLOR ThemeManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
RageColor ThemeManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
{
|
||||
float r=1,b=1,g=1,a=1; // initialize in case sscanf fails
|
||||
CString sValue = GetMetric(sClassName,sValueName);
|
||||
@@ -291,5 +291,5 @@ D3DXCOLOR ThemeManager::GetMetricC( CString sClassName, CString sValueName )
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
return D3DXCOLOR(r,g,b,a);
|
||||
return RageColor(r,g,b,a);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "RageUtil.h"
|
||||
#include "D3DX8Math.h" // for D3DXCOLOR
|
||||
#include "RageTypes.h"
|
||||
|
||||
class IniFile;
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
int GetMetricI( CString sClassName, CString sValueName );
|
||||
float GetMetricF( CString sClassName, CString sValueName );
|
||||
bool GetMetricB( CString sClassName, CString sValueName );
|
||||
D3DXCOLOR GetMetricC( CString sClassName, CString sValueName );
|
||||
RageColor GetMetricC( CString sClassName, CString sValueName );
|
||||
|
||||
protected:
|
||||
void GetAllThemeNames( CStringArray& AddTo );
|
||||
|
||||
@@ -72,7 +72,7 @@ void TransitionBackWipe::DrawPrimitives()
|
||||
m_quad.SetXY( (float)iRectX, CENTER_Y );
|
||||
m_quad.SetZoomX( (float)iRectWidth );
|
||||
m_quad.SetZoomY( SCREEN_HEIGHT );
|
||||
m_quad.SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_quad.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_quad.Draw();
|
||||
}
|
||||
} // end foreach rect
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
TransitionFade::TransitionFade()
|
||||
{
|
||||
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
||||
SetDiffuse( D3DXCOLOR(0,0,0,1) ); // black
|
||||
SetDiffuse( RageColor(0,0,0,1) ); // black
|
||||
}
|
||||
|
||||
TransitionFade::~TransitionFade()
|
||||
@@ -35,17 +35,18 @@ void TransitionFade::DrawPrimitives()
|
||||
if( fPercentageOpaque == 0 )
|
||||
return; // draw nothing
|
||||
|
||||
D3DXCOLOR colorTemp = GetDiffuse() * fPercentageOpaque;
|
||||
RageColor colorTemp = GetDiffuse();
|
||||
colorTemp.a = fPercentageOpaque;
|
||||
m_rect.SetDiffuse( colorTemp );
|
||||
m_rect.Draw();
|
||||
|
||||
// SUPER HACK! For some reason, this does not draw in release mode. I've looked for
|
||||
// hours and can't figure out why. It appears though if you draw it twice, so that's
|
||||
// what we'll do for now. Aye...
|
||||
#ifndef _DEBUG
|
||||
m_rect.SetDiffuse( colorTemp );
|
||||
m_rect.Draw();
|
||||
#endif
|
||||
//#ifndef _DEBUG
|
||||
// m_rect.SetDiffuse( colorTemp );
|
||||
// m_rect.Draw();
|
||||
//#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,12 +50,12 @@ void TransitionFadeWipe::DrawPrimitives()
|
||||
float fDarkOutsideX = bLeftEdgeIsDarker ? fDarkEdgeX - SCREEN_WIDTH*2 : fDarkEdgeX + SCREEN_WIDTH*2;
|
||||
|
||||
|
||||
m_rectBlack.SetDiffuse( D3DXCOLOR(0,0,0,1) );
|
||||
m_rectBlack.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_rectBlack.StretchTo( CRect((int)fDarkOutsideX, 0, (int)fDarkEdgeX, (int)SCREEN_HEIGHT) );
|
||||
m_rectBlack.Draw();
|
||||
|
||||
m_rectGradient.SetDiffuseLeftEdge( D3DXCOLOR(0,0,0,1) );
|
||||
m_rectGradient.SetDiffuseRightEdge( D3DXCOLOR(0,0,0,0) );
|
||||
m_rectGradient.SetDiffuseLeftEdge( RageColor(0,0,0,1) );
|
||||
m_rectGradient.SetDiffuseRightEdge( RageColor(0,0,0,0) );
|
||||
m_rectGradient.StretchTo( CRect((int)fDarkEdgeX, 0, (int)fLightEdgeX, (int)SCREEN_HEIGHT) );
|
||||
m_rectGradient.Draw();
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ void TransitionKeepAlive::DrawPrimitives()
|
||||
const float fPercentColor = fPercentClosed;
|
||||
const float fPercentAlpha = min( fPercentClosed * 2, 1 );
|
||||
|
||||
m_sprLogo.SetDiffuse( D3DXCOLOR(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
|
||||
m_sprLogo.SetDiffuse( RageColor(fPercentColor,fPercentColor,fPercentColor,fPercentAlpha) );
|
||||
m_sprLogo.SetZoomY( fPercentClosed );
|
||||
if( fPercentClosed > 0 )
|
||||
m_sprLogo.Draw();
|
||||
@@ -72,7 +72,7 @@ void TransitionKeepAlive::DrawPrimitives()
|
||||
case KEEP_ALIVE_TYPE_5TH:
|
||||
{
|
||||
float fPercentClosed = 1 - this->GetPercentageOpen();
|
||||
m_sprLogo.SetDiffuse( D3DXCOLOR(1,1,1,fPercentClosed) );
|
||||
m_sprLogo.SetDiffuse( RageColor(1,1,1,fPercentClosed) );
|
||||
m_sprLogo.Draw();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
TransitionOniFade::TransitionOniFade()
|
||||
{
|
||||
SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white
|
||||
SetDiffuse( RageColor(1,1,1,1) ); // white
|
||||
|
||||
m_quadBackground.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||
|
||||
@@ -54,18 +54,18 @@ void TransitionOniFade::DrawPrimitives()
|
||||
UpdateSongText();
|
||||
}
|
||||
|
||||
m_quadBackground.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,-1,1)) );
|
||||
m_quadBackground.SetDiffuse( RageColor(1,1,1,SCALE(GetPercentageClosed(),0,1,-1,1)) );
|
||||
m_quadBackground.Draw();
|
||||
|
||||
if( m_TransitionState == closed || m_TransitionState == opening_right )
|
||||
{
|
||||
m_quadStrip.SetDiffuse( D3DXCOLOR(0,0,0,SCALE(GetPercentageClosed(),0,1,0,2)) );
|
||||
m_quadStrip.SetDiffuse( RageColor(0,0,0,SCALE(GetPercentageClosed(),0,1,0,2)) );
|
||||
// m_quadStrip.Draw();
|
||||
|
||||
m_textSongInfo.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) );
|
||||
m_textSongInfo.SetDiffuse( RageColor(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) );
|
||||
// m_textSongInfo.Draw();
|
||||
|
||||
m_Banner.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) );
|
||||
m_Banner.SetDiffuse( RageColor(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) );
|
||||
m_Banner.Draw();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ void TransitionStarWipe::DrawPrimitives()
|
||||
return;
|
||||
else if( m_TransitionState == closed ) {
|
||||
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
||||
m_rect.SetDiffuse( D3DCOLOR_RGBA(0,0,0,255) );
|
||||
m_rect.SetDiffuse( RageColor(0,0,0,1) );
|
||||
m_rect.Draw();
|
||||
return;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ void TransitionStarWipe::DrawPrimitives()
|
||||
int y_top = y - m_iStarHeight/2;
|
||||
int y_bot = y + m_iStarHeight/2+1;
|
||||
m_rect.StretchTo( CRect(x_rect_leading_edge, y_top, x_rect_trailing_edge, y_bot) );
|
||||
m_rect.SetDiffuse( D3DCOLOR_ARGB(255,0,0,0) );
|
||||
m_rect.SetDiffuse( RageColor(1,0,0,0) );
|
||||
m_rect.Draw();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user