s/CRECT/RectI/
This commit is contained in:
+10
-10
@@ -308,18 +308,18 @@ void Actor::SetTweenDiffuseLeftEdge( RageColor c ) { LatestTween().diffuse[0] =
|
|||||||
void Actor::SetTweenGlow( RageColor c ) { LatestTween().glow = c; };
|
void Actor::SetTweenGlow( RageColor c ) { LatestTween().glow = c; };
|
||||||
|
|
||||||
|
|
||||||
void Actor::ScaleTo( LPRECT pRect, StretchType st )
|
void Actor::ScaleTo( const RectI &Rect, StretchType st )
|
||||||
{
|
{
|
||||||
// width and height of rectangle
|
// width and height of rectangle
|
||||||
float rect_width = (float)RECTWIDTH(*pRect);
|
float rect_width = (float)RECTWIDTH(Rect);
|
||||||
float rect_height = (float)RECTHEIGHT(*pRect);
|
float rect_height = (float)RECTHEIGHT(Rect);
|
||||||
|
|
||||||
if( rect_width < 0 ) SetRotationY( PI );
|
if( rect_width < 0 ) SetRotationY( PI );
|
||||||
if( rect_height < 0 ) SetRotationX( 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 = Rect.left + rect_width/2;
|
||||||
float rect_cy = pRect->top + rect_height/2;
|
float rect_cy = Rect.top + rect_height/2;
|
||||||
|
|
||||||
// zoom fActor needed to scale the Actor to fill the rectangle
|
// zoom fActor needed to scale the Actor to fill the rectangle
|
||||||
float fNewZoomX = fabsf(rect_width / m_size.x);
|
float fNewZoomX = fabsf(rect_width / m_size.x);
|
||||||
@@ -341,15 +341,15 @@ void Actor::ScaleTo( LPRECT pRect, StretchType st )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Actor::StretchTo( LPRECT pRect )
|
void Actor::StretchTo( const RectI &Rect )
|
||||||
{
|
{
|
||||||
// width and height of rectangle
|
// width and height of rectangle
|
||||||
int rect_width = RECTWIDTH(*pRect);
|
int rect_width = RECTWIDTH(Rect);
|
||||||
int rect_height = RECTHEIGHT(*pRect);
|
int rect_height = RECTHEIGHT(Rect);
|
||||||
|
|
||||||
// center of the rectangle
|
// center of the rectangle
|
||||||
float rect_cx = pRect->left + rect_width/2.0f;
|
float rect_cx = Rect.left + rect_width/2.0f;
|
||||||
float rect_cy = pRect->top + rect_height/2.0f;
|
float rect_cy = Rect.top + rect_height/2.0f;
|
||||||
|
|
||||||
// zoom fActor needed to scale the Actor to fill the rectangle
|
// zoom fActor needed to scale the Actor to fill the rectangle
|
||||||
float fNewZoomX = rect_width / m_size.x;
|
float fNewZoomX = rect_width / m_size.x;
|
||||||
|
|||||||
@@ -134,11 +134,11 @@ public:
|
|||||||
|
|
||||||
enum StretchType { fit_inside, cover };
|
enum StretchType { fit_inside, cover };
|
||||||
|
|
||||||
void ScaleToCover( LPRECT rect ) { ScaleTo( rect, cover ); };
|
void ScaleToCover( const RectI &rect ) { ScaleTo( rect, cover ); }
|
||||||
void ScaleToFitInside( LPRECT rect ) { ScaleTo( rect, fit_inside); };
|
void ScaleToFitInside( const RectI &rect ) { ScaleTo( rect, fit_inside); };
|
||||||
void ScaleTo( LPRECT rect, StretchType st );
|
void ScaleTo( const RectI &rect, StretchType st );
|
||||||
|
|
||||||
void StretchTo( LPRECT rect );
|
void StretchTo( const RectI &rect );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,14 +59,14 @@ void BGAnimationLayer::LoadFromStaticGraphic( CString sPath )
|
|||||||
{
|
{
|
||||||
m_iNumSprites = 1;
|
m_iNumSprites = 1;
|
||||||
m_Sprites[0].Load( sPath );
|
m_Sprites[0].Load( sPath );
|
||||||
m_Sprites[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_Sprites[0].StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void BGAnimationLayer::LoadFromMovie( CString sMoviePath, bool bLoop, bool bRewind )
|
void BGAnimationLayer::LoadFromMovie( CString sMoviePath, bool bLoop, bool bRewind )
|
||||||
{
|
{
|
||||||
m_iNumSprites = 1;
|
m_iNumSprites = 1;
|
||||||
m_Sprites[0].Load( sMoviePath );
|
m_Sprites[0].Load( sMoviePath );
|
||||||
m_Sprites[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_Sprites[0].StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
m_Sprites[0].GetTexture()->Play();
|
m_Sprites[0].GetTexture()->Play();
|
||||||
::Sleep( 50 ); // decode a frame so we don't see a black flash at the beginning
|
::Sleep( 50 ); // decode a frame so we don't see a black flash at the beginning
|
||||||
m_Sprites[0].GetTexture()->Pause();
|
m_Sprites[0].GetTexture()->Pause();
|
||||||
@@ -79,7 +79,7 @@ void BGAnimationLayer::LoadFromVisualization( CString sMoviePath )
|
|||||||
{
|
{
|
||||||
m_iNumSprites = 1;
|
m_iNumSprites = 1;
|
||||||
m_Sprites[0].Load( sMoviePath );
|
m_Sprites[0].Load( sMoviePath );
|
||||||
m_Sprites[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_Sprites[0].StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
m_Sprites[0].SetBlendModeAdd();
|
m_Sprites[0].SetBlendModeAdd();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ found_effect:
|
|||||||
case EFFECT_STRETCH_STILL:
|
case EFFECT_STRETCH_STILL:
|
||||||
m_iNumSprites = 1;
|
m_iNumSprites = 1;
|
||||||
m_Sprites[0].Load( sPath );
|
m_Sprites[0].Load( sPath );
|
||||||
m_Sprites[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_Sprites[0].StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
break;
|
break;
|
||||||
case EFFECT_STRETCH_SCROLL_LEFT:
|
case EFFECT_STRETCH_SCROLL_LEFT:
|
||||||
case EFFECT_STRETCH_SCROLL_RIGHT:
|
case EFFECT_STRETCH_SCROLL_RIGHT:
|
||||||
@@ -157,7 +157,7 @@ found_effect:
|
|||||||
case EFFECT_STRETCH_TWIST:
|
case EFFECT_STRETCH_TWIST:
|
||||||
m_iNumSprites = 1;
|
m_iNumSprites = 1;
|
||||||
m_Sprites[0].Load( sPath, false, 4, 4, false, true );
|
m_Sprites[0].Load( sPath, false, 4, 4, false, true );
|
||||||
m_Sprites[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_Sprites[0].StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
m_Sprites[0].SetCustomTextureRect( FRECT(0,0,1,1) );
|
m_Sprites[0].SetCustomTextureRect( FRECT(0,0,1,1) );
|
||||||
|
|
||||||
switch( m_Effect )
|
switch( m_Effect )
|
||||||
@@ -178,7 +178,7 @@ found_effect:
|
|||||||
case EFFECT_STRETCH_SPIN:
|
case EFFECT_STRETCH_SPIN:
|
||||||
m_iNumSprites = 1;
|
m_iNumSprites = 1;
|
||||||
m_Sprites[0].Load( sPath );
|
m_Sprites[0].Load( sPath );
|
||||||
m_Sprites[0].ScaleToCover( CRect(SCREEN_LEFT-200,SCREEN_TOP-200,SCREEN_RIGHT+200,SCREEN_BOTTOM+200) );
|
m_Sprites[0].ScaleToCover( RectI(SCREEN_LEFT-200,SCREEN_TOP-200,SCREEN_RIGHT+200,SCREEN_BOTTOM+200) );
|
||||||
m_fRotationalVelocity = 1;
|
m_fRotationalVelocity = 1;
|
||||||
break;
|
break;
|
||||||
case EFFECT_PARTICLES_SPIRAL_OUT:
|
case EFFECT_PARTICLES_SPIRAL_OUT:
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const float FADE_SECONDS = 1.0f;
|
|||||||
#define RIGHT_EDGE THEME->GetMetricI("Background","RightEdge")
|
#define RIGHT_EDGE THEME->GetMetricI("Background","RightEdge")
|
||||||
#define BOTTOM_EDGE THEME->GetMetricI("Background","BottomEdge")
|
#define BOTTOM_EDGE THEME->GetMetricI("Background","BottomEdge")
|
||||||
|
|
||||||
#define RECT_BACKGROUND CRect(LEFT_EDGE,TOP_EDGE,RIGHT_EDGE,BOTTOM_EDGE)
|
#define RECT_BACKGROUND RectI(LEFT_EDGE,TOP_EDGE,RIGHT_EDGE,BOTTOM_EDGE)
|
||||||
|
|
||||||
int CompareBGSegments(const BGSegment &seg1, const BGSegment &seg2)
|
int CompareBGSegments(const BGSegment &seg1, const BGSegment &seg2)
|
||||||
{
|
{
|
||||||
@@ -58,13 +58,13 @@ Background::Background()
|
|||||||
m_quadBGBrightness.StretchTo( RECT_BACKGROUND );
|
m_quadBGBrightness.StretchTo( RECT_BACKGROUND );
|
||||||
m_quadBGBrightness.SetDiffuse( RageColor(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( RectI(SCREEN_LEFT,SCREEN_TOP,LEFT_EDGE,SCREEN_BOTTOM) );
|
||||||
m_quadBorder[0].SetDiffuse( RageColor(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( RectI(LEFT_EDGE,SCREEN_TOP,RIGHT_EDGE,TOP_EDGE) );
|
||||||
m_quadBorder[1].SetDiffuse( RageColor(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( RectI(RIGHT_EDGE,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
m_quadBorder[2].SetDiffuse( RageColor(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( RectI(LEFT_EDGE,BOTTOM_EDGE,RIGHT_EDGE,SCREEN_BOTTOM) );
|
||||||
m_quadBorder[3].SetDiffuse( RageColor(0,0,0,1) );
|
m_quadBorder[3].SetDiffuse( RageColor(0,0,0,1) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ void CourseContentsFrame::DrawPrimitives()
|
|||||||
// write to z buffer so that top and bottom are clipped
|
// write to z buffer so that top and bottom are clipped
|
||||||
m_quad.SetZ( -1 );
|
m_quad.SetZ( -1 );
|
||||||
|
|
||||||
CRect rectBarSize(-(int)CONTENTS_BAR_WIDTH/2, -(int)CONTENTS_BAR_HEIGHT/2, (int)CONTENTS_BAR_WIDTH/2, (int)CONTENTS_BAR_HEIGHT/2);
|
RectI rectBarSize(-(int)CONTENTS_BAR_WIDTH/2, -(int)CONTENTS_BAR_HEIGHT/2, (int)CONTENTS_BAR_WIDTH/2, (int)CONTENTS_BAR_HEIGHT/2);
|
||||||
m_quad.StretchTo( rectBarSize );
|
m_quad.StretchTo( rectBarSize );
|
||||||
|
|
||||||
m_quad.SetY( (-(MAX_VISIBLE_CONTENTS-1)/2 - 1) * CONTENTS_BAR_HEIGHT );
|
m_quad.SetY( (-(MAX_VISIBLE_CONTENTS-1)/2 - 1) * CONTENTS_BAR_HEIGHT );
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ void CroppedSprite::CropToSize( float fWidth, float fHeight )
|
|||||||
Sprite::StopUsingCustomCoords();
|
Sprite::StopUsingCustomCoords();
|
||||||
|
|
||||||
// first find the correct zoom
|
// first find the correct zoom
|
||||||
Sprite::ScaleToCover( CRect(0, 0,
|
Sprite::ScaleToCover( RectI(0, 0,
|
||||||
(int)m_fCropWidth,
|
(int)m_fCropWidth,
|
||||||
(int)m_fCropHeight )
|
(int)m_fCropHeight )
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public:
|
|||||||
|
|
||||||
void DrawStrip( float fRightEdgePercent )
|
void DrawStrip( float fRightEdgePercent )
|
||||||
{
|
{
|
||||||
RECT rect;
|
RectI rect;
|
||||||
|
|
||||||
const float fChamberWidthInPercent = 1.0f/g_iNumChambers;
|
const float fChamberWidthInPercent = 1.0f/g_iNumChambers;
|
||||||
const float fStripWidthInPercent = 1.0f/g_iNumStrips;
|
const float fStripWidthInPercent = 1.0f/g_iNumStrips;
|
||||||
@@ -161,8 +161,8 @@ public:
|
|||||||
float fPercentCroppedFromRight = max( 0, fCorrectedRightEdgePercent-1 );
|
float fPercentCroppedFromRight = max( 0, fCorrectedRightEdgePercent-1 );
|
||||||
|
|
||||||
|
|
||||||
m_sprStreamNormal.StretchTo( &rect );
|
m_sprStreamNormal.StretchTo( rect );
|
||||||
m_sprStreamHot.StretchTo( &rect );
|
m_sprStreamHot.StretchTo( rect );
|
||||||
|
|
||||||
|
|
||||||
// set custom texture coords
|
// set custom texture coords
|
||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
|
|
||||||
void DrawMask( float fPercent )
|
void DrawMask( float fPercent )
|
||||||
{
|
{
|
||||||
RECT rect;
|
RectI rect;
|
||||||
|
|
||||||
int iChamber;
|
int iChamber;
|
||||||
float fChamberOverflowPercent;
|
float fChamberOverflowPercent;
|
||||||
@@ -204,7 +204,7 @@ public:
|
|||||||
rect.left = MIN( rect.left, + g_iMeterWidth/2 );
|
rect.left = MIN( rect.left, + g_iMeterWidth/2 );
|
||||||
rect.right = MIN( rect.right, + g_iMeterWidth/2 );
|
rect.right = MIN( rect.right, + g_iMeterWidth/2 );
|
||||||
|
|
||||||
m_quadMask.StretchTo( &rect );
|
m_quadMask.StretchTo( rect );
|
||||||
m_quadMask.Draw();
|
m_quadMask.Draw();
|
||||||
|
|
||||||
// draw mask for horizontal chambers
|
// draw mask for horizontal chambers
|
||||||
@@ -216,7 +216,7 @@ public:
|
|||||||
rect.left = MIN( rect.left, + g_iMeterWidth/2 );
|
rect.left = MIN( rect.left, + g_iMeterWidth/2 );
|
||||||
rect.right = MIN( rect.right, + g_iMeterWidth/2 );
|
rect.right = MIN( rect.right, + g_iMeterWidth/2 );
|
||||||
|
|
||||||
m_quadMask.StretchTo( &rect );
|
m_quadMask.StretchTo( rect );
|
||||||
m_quadMask.Draw();
|
m_quadMask.Draw();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
|
|||||||
m_Background.LoadFromAniDir( sBackgroundPath );
|
m_Background.LoadFromAniDir( sBackgroundPath );
|
||||||
|
|
||||||
m_quadBrightness.SetDiffuse( RageColor(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( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
|
|
||||||
m_sprTopEdge.Load( sTopEdgePath );
|
m_sprTopEdge.Load( sTopEdgePath );
|
||||||
m_sprTopEdge.SetXY( TOP_EDGE_X, TOP_EDGE_Y );
|
m_sprTopEdge.SetXY( TOP_EDGE_X, TOP_EDGE_Y );
|
||||||
|
|||||||
@@ -93,10 +93,10 @@ public:
|
|||||||
virtual void SetTweenGlow( RageColor 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( const RectI &rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleToCover(rect); }
|
||||||
void ScaleToFitInside( LPRECT rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleToFitInside(rect); };
|
void ScaleToFitInside( const RectI &rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleToFitInside(rect); }
|
||||||
void ScaleTo( LPRECT rect, StretchType st ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleTo(rect,st); };
|
void ScaleTo( const RectI &rect, StretchType st ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].ScaleTo(rect,st); }
|
||||||
void StretchTo( LPRECT rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].StretchTo(rect); };
|
void StretchTo( const RectI &rect ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].StretchTo(rect); }
|
||||||
|
|
||||||
void SetHorizAlign( HorizAlign ha ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetHorizAlign(ha); };
|
void SetHorizAlign( HorizAlign ha ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetHorizAlign(ha); };
|
||||||
void SetVertAlign( VertAlign va ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetVertAlign(va); };
|
void SetVertAlign( VertAlign va ) { for(int i=0; i<NUM_BLUR_GHOSTS; i++) m_sprites[i].SetVertAlign(va); };
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ void BMSLoader::mapBMSTrackToDanceNote( int iBMSTrack, int &iDanceColOut, char &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out )
|
bool BMSLoader::LoadFromBMSFile( const CString &sPath, Notes &out )
|
||||||
{
|
{
|
||||||
LOG->Trace( "Notes::LoadFromBMSFile( '%s' )", sPath.GetString() );
|
LOG->Trace( "Notes::LoadFromBMSFile( '%s' )", sPath.GetString() );
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ ScreenEdit::ScreenEdit()
|
|||||||
m_NoteFieldEdit.SetZoom( 0.5f );
|
m_NoteFieldEdit.SetZoom( 0.5f );
|
||||||
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( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
m_rectRecordBack.SetDiffuse( RageColor(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 );
|
||||||
@@ -269,7 +269,7 @@ ScreenEdit::ScreenEdit()
|
|||||||
m_textHelp.SetShadowLength( 2 );
|
m_textHelp.SetShadowLength( 2 );
|
||||||
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( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
m_rectShortcutsBack.SetDiffuse( RageColor(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") );
|
||||||
|
|||||||
@@ -207,7 +207,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( RageColor(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( RectI(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. */
|
||||||
m_quadMask.SetZ( -1 );
|
m_quadMask.SetZ( -1 );
|
||||||
@@ -228,7 +228,7 @@ ScreenStage::ScreenStage()
|
|||||||
{
|
{
|
||||||
const Song* pSong = GAMESTATE->m_pCurSong;
|
const Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
m_sprSongBackground.Load( (pSong && pSong->HasBackground()) ? pSong->GetBackgroundPath() : THEME->GetPathTo("Graphics","fallback background") );
|
m_sprSongBackground.Load( (pSong && pSong->HasBackground()) ? pSong->GetBackgroundPath() : THEME->GetPathTo("Graphics","fallback background") );
|
||||||
m_sprSongBackground.StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
m_sprSongBackground.StretchTo( RectI(SCREEN_LEFT,SCREEN_TOP,SCREEN_RIGHT,SCREEN_BOTTOM) );
|
||||||
|
|
||||||
/* Move the stage numbers downward, so they don't overlay the
|
/* Move the stage numbers downward, so they don't overlay the
|
||||||
* center of the image. */
|
* center of the image. */
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ void ScrollBar::SetPercentage( float fStartPercent, float fEndPercent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_sprScrollThumbPart1.StretchTo( CRect(
|
m_sprScrollThumbPart1.StretchTo( RectI(
|
||||||
(int)-m_sprScrollThumbPart1.GetUnzoomedWidth()/2,
|
(int)-m_sprScrollThumbPart1.GetUnzoomedWidth()/2,
|
||||||
iPart1TopY,
|
iPart1TopY,
|
||||||
(int)+m_sprScrollThumbPart1.GetUnzoomedWidth()/2,
|
(int)+m_sprScrollThumbPart1.GetUnzoomedWidth()/2,
|
||||||
@@ -88,7 +88,7 @@ void ScrollBar::SetPercentage( float fStartPercent, float fEndPercent )
|
|||||||
|
|
||||||
if( iPart2TopY != -1 )
|
if( iPart2TopY != -1 )
|
||||||
{
|
{
|
||||||
m_sprScrollThumbPart2.StretchTo( CRect(
|
m_sprScrollThumbPart2.StretchTo( RectI(
|
||||||
(int)-m_sprScrollThumbPart2.GetUnzoomedWidth()/2,
|
(int)-m_sprScrollThumbPart2.GetUnzoomedWidth()/2,
|
||||||
iPart2TopY,
|
iPart2TopY,
|
||||||
(int)+m_sprScrollThumbPart2.GetUnzoomedWidth()/2,
|
(int)+m_sprScrollThumbPart2.GetUnzoomedWidth()/2,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
TransitionFade::TransitionFade()
|
TransitionFade::TransitionFade()
|
||||||
{
|
{
|
||||||
m_rect.StretchTo( CRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
m_rect.StretchTo( RectI(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
||||||
SetDiffuse( RageColor(0,0,0,1) ); // black
|
SetDiffuse( RageColor(0,0,0,1) ); // black
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ void TransitionFadeWipe::DrawPrimitives()
|
|||||||
|
|
||||||
|
|
||||||
m_rectBlack.SetDiffuse( RageColor(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( RectI((int)fDarkOutsideX, 0, (int)fDarkEdgeX, (int)SCREEN_HEIGHT) );
|
||||||
m_rectBlack.Draw();
|
m_rectBlack.Draw();
|
||||||
|
|
||||||
m_rectGradient.SetDiffuseLeftEdge( RageColor(0,0,0,1) );
|
m_rectGradient.SetDiffuseLeftEdge( RageColor(0,0,0,1) );
|
||||||
m_rectGradient.SetDiffuseRightEdge( RageColor(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( RectI((int)fDarkEdgeX, 0, (int)fLightEdgeX, (int)SCREEN_HEIGHT) );
|
||||||
m_rectGradient.Draw();
|
m_rectGradient.Draw();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ TransitionOniFade::TransitionOniFade()
|
|||||||
{
|
{
|
||||||
SetDiffuse( RageColor(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( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
|
|
||||||
m_quadStrip.StretchTo( CRect(SCREEN_LEFT, int(CENTER_Y-30), SCREEN_RIGHT, int(CENTER_Y+30)) );
|
m_quadStrip.StretchTo( RectI(SCREEN_LEFT, int(CENTER_Y-30), SCREEN_RIGHT, int(CENTER_Y+30)) );
|
||||||
|
|
||||||
m_textSongInfo.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
m_textSongInfo.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
m_textSongInfo.TurnShadowOff();
|
m_textSongInfo.TurnShadowOff();
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ void TransitionStarWipe::DrawPrimitives()
|
|||||||
if( m_TransitionState == opened )
|
if( m_TransitionState == opened )
|
||||||
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( RectI(0,0,SCREEN_WIDTH,SCREEN_HEIGHT) );
|
||||||
m_rect.SetDiffuse( RageColor(0,0,0,1) );
|
m_rect.SetDiffuse( RageColor(0,0,0,1) );
|
||||||
m_rect.Draw();
|
m_rect.Draw();
|
||||||
return;
|
return;
|
||||||
@@ -78,7 +78,7 @@ void TransitionStarWipe::DrawPrimitives()
|
|||||||
int x_rect_trailing_edge = ( bIsAnEvenRow ? 0-1 : SCREEN_WIDTH+1 );
|
int x_rect_trailing_edge = ( bIsAnEvenRow ? 0-1 : SCREEN_WIDTH+1 );
|
||||||
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( RectI(x_rect_leading_edge, y_top, x_rect_trailing_edge, y_bot) );
|
||||||
m_rect.SetDiffuse( RageColor(0,0,0,1) );
|
m_rect.SetDiffuse( RageColor(0,0,0,1) );
|
||||||
m_rect.Draw();
|
m_rect.Draw();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user