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