From 2636a34acb672acb1c3f47d3772867df572e30a5 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 5 Jul 2003 05:34:16 +0000 Subject: [PATCH] no message --- stepmania/src/MusicWheel.cpp | 2 +- stepmania/src/RageBitmapTexture.cpp | 23 ++++++++++++++++++----- stepmania/src/ScreenSandbox.cpp | 4 ++-- stepmania/src/ScreenSelectMusic.cpp | 2 +- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index f21ad4ec3e..e36a53cf94 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -594,7 +594,7 @@ void MusicWheel::GetItemPosition( float fPosOffsetsFromMiddle, float& fX_out, fl { fRotationX_out = SCALE(fPosOffsetsFromMiddle,-7,+7,+PI/2.f,-PI/2.f); - printf( "fRotationX_out = %f\n", fRotationX_out ); +// printf( "fRotationX_out = %f\n", fRotationX_out ); float radius = 200; diff --git a/stepmania/src/RageBitmapTexture.cpp b/stepmania/src/RageBitmapTexture.cpp index 93064b38ef..3cfb986e43 100644 --- a/stepmania/src/RageBitmapTexture.cpp +++ b/stepmania/src/RageBitmapTexture.cpp @@ -298,11 +298,22 @@ apply_color_key: CreateFrameRects(); - /* Enforce frames in the image have even dimensions. Otherwise, - * pixel/texel alignment will be off. - * If it looks like the artist intentionally blanked the image - * by making it very tiny, then don't run the check. */ - if( this->GetSourceWidth()>2 || this->GetSourceHeight()>2 ) + + // + // Enforce frames in the image have even dimensions. Otherwise, + // pixel/texel alignment will be off. + // + bool bRunCheck = true; + + // Don't check if the artist intentionally blanked the image by making it very tiny. + if( this->GetSourceWidth()<=2 || this->GetSourceHeight()<=2 ) + bRunCheck = false; + + // HACK: Don't check song graphics. Many of them are weird dimensions. + if( (actualID.filename.length()>=6 && actualID.filename.Left(6)=="Songs/") ) + bRunCheck = false; + + if( bRunCheck ) { float fFrameWidth = this->GetSourceWidth() / (float)this->GetFramesWide(); float fFrameHeight = this->GetSourceHeight() / (float)this->GetFramesHigh(); @@ -327,6 +338,8 @@ apply_color_key: } } + + SDL_FreeSurface( img ); /* See if the apparent "size" is being overridden. */ diff --git a/stepmania/src/ScreenSandbox.cpp b/stepmania/src/ScreenSandbox.cpp index b1c27970b6..7762f0d979 100644 --- a/stepmania/src/ScreenSandbox.cpp +++ b/stepmania/src/ScreenSandbox.cpp @@ -28,11 +28,11 @@ ScreenSandbox::ScreenSandbox() : Screen("ScreenSandbox") m_quad1.SetDiffuse( RageColor(0,0,1,1) ); m_quad1.SetZ( 0 ); m_quad1.SetUseZBuffer( true ); -// this->AddChild( &m_quad1 ); + this->AddChild( &m_quad1 ); m_quad2.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); m_quad2.SetDiffuse( RageColor(0,1,0,1) ); - m_quad2.SetZ( 1 ); + m_quad2.SetZ( -1 ); m_quad2.SetUseZBuffer( true ); this->AddChild( &m_quad2 ); diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index a6de99a8a1..80fe6932aa 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -95,7 +95,7 @@ ScreenSelectMusic::ScreenSelectMusic() : Screen("ScreenSelectMusic") m_sprBannerMask.Load( THEME->GetPathToG("ScreenSelectMusic banner mask") ); m_sprBannerMask.SetBlendMode( BLEND_NO_EFFECT ); // don't draw to color buffer m_sprBannerMask.SetUseZBuffer( true ); // do draw to the zbuffer - m_sprBannerMask.SetZ( m_sprBannerMask.GetZ()+0.05f ); + m_sprBannerMask.SetZ( m_sprBannerMask.GetZ()+0.05f ); // closer to camera this->AddChild( &m_sprBannerMask ); // this is loaded SetSong and TweenToSong