diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 33b8bef4b4..6e558f43c8 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -323,8 +323,8 @@ void Actor::SetTweenGlow( RageColor c ) { LatestTween().glow = c; }; void Actor::ScaleTo( const RectI &rect, StretchType st ) { // width and height of rectangle - float rect_width = (float)RECTWIDTH(rect); - float rect_height = (float)RECTHEIGHT(rect); + float rect_width = (float) rect.GetWidth(); + float rect_height = (float) rect.GetHeight(); if( rect_width < 0 ) SetRotationY( PI ); if( rect_height < 0 ) SetRotationX( PI ); @@ -356,8 +356,8 @@ void Actor::ScaleTo( const RectI &rect, StretchType st ) void Actor::StretchTo( const RectI &rect ) { // width and height of rectangle - int rect_width = RECTWIDTH(rect); - int rect_height = RECTHEIGHT(rect); + int rect_width = rect.GetWidth(); + int rect_height = rect.GetHeight(); // center of the rectangle float rect_cx = rect.left + rect_width/2.0f; diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 1c3d22c6a7..9663e13b01 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -152,8 +152,8 @@ void Background::LoadFromSong( Song* pSong ) { Unload(); - const float fXZoom = RECTWIDTH(RECT_BACKGROUND) / (float)SCREEN_WIDTH; - const float fYZoom = RECTHEIGHT(RECT_BACKGROUND) / (float)SCREEN_HEIGHT; + const float fXZoom = RECT_BACKGROUND.GetWidth() / (float)SCREEN_WIDTH; + const float fYZoom = RECT_BACKGROUND.GetHeight() / (float)SCREEN_HEIGHT; const CString sSongBackgroundPath = pSong->HasBackground() ? pSong->GetBackgroundPath() : THEME->GetPathTo("Graphics","fallback background"); diff --git a/stepmania/src/RageUtil.h b/stepmania/src/RageUtil.h index f0b9fc786d..10e82310f7 100644 --- a/stepmania/src/RageUtil.h +++ b/stepmania/src/RageUtil.h @@ -23,11 +23,6 @@ #define ZERO(x) memset(&x, 0, sizeof(x)) #define COPY(a,b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&a, &b, sizeof(a)); } -#define RECTWIDTH(rect) ((rect).right - (rect).left) -#define RECTHEIGHT(rect) ((rect).bottom - (rect).top) -inline int RECTCENTERX(RECT rect) { return rect.left + (rect.right-rect.left)/2; } -inline int RECTCENTERY(RECT rect) { return rect.top + (rect.bottom-rect.top)/2; } - /* Common harmless mismatches. */ #ifndef min inline float min(float a, int b) { return a < b? a:b; }