From 79050f38047a83fa826706ffaad4b503f7eb0bda Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 13 Oct 2002 22:32:26 +0000 Subject: [PATCH] Gaaah. Head hurts. Fix rounding error: when rect_width is 9, we want rect_cx = pRect->left + 4.5, not 4. This resulted in a gap between the black quad and the gradient quad in TransitionFadeWipe, and possibly other obscure things. (The transition doesn't use a texture at all, so this wasn't actually related to the bilinear filtering issue.) --- stepmania/src/Actor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 26e0d6f591..2c346c28a9 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -348,8 +348,8 @@ void Actor::StretchTo( LPRECT pRect ) int rect_height = RECTHEIGHT(*pRect); // center of the rectangle - int rect_cx = pRect->left + rect_width/2; - int rect_cy = pRect->top + rect_height/2; + float rect_cx = pRect->left + rect_width/2.0f; + float rect_cy = pRect->top + rect_height/2.0f; // zoom fActor needed to scale the Actor to fill the rectangle float fNewZoomX = rect_width / m_size.x;