From 060e1297627d99d9e6436c563d6fa7ba0a7096a9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 7 Jan 2007 09:02:00 +0000 Subject: [PATCH] flip; it's more natural to anchor top inside the loop, so texture coordinates increase as fY increases. (Was the bAnchorToBottom code bcakwards? I think it was just symmetric.) --- stepmania/src/NoteDisplay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index e387fddf2f..1ce160d6e8 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -402,7 +402,7 @@ void NoteDisplay::DrawHoldPart( vector &vpSpr, int iCol, int fYStep, fl bool bLast = false; float fAddToTexCoord = 0; - if( !bAnchorToBottom ) + if( bAnchorToBottom ) { float fTexCoordBottom = SCALE( fYBottom - fYTop, 0, fFrameHeight, pRect->bottom, pRect->top ); float fWantTexCoordBottom = ceilf( fTexCoordBottom - 0.0001f ); @@ -435,8 +435,8 @@ void NoteDisplay::DrawHoldPart( vector &vpSpr, int iCol, int fYStep, fl const float fX = ArrowEffects::GetXPos( m_pPlayerState, iCol, fYOffset ); const float fXLeft = fX - fFrameWidth/2; const float fXRight = fX + fFrameWidth/2; - const float fDistFromBottom = fYBottom - fY; - float fTexCoordTop = SCALE( fDistFromBottom, 0, fFrameHeight, pRect->bottom, pRect->top ); + const float fDistFromTop = fY - fYTop; + float fTexCoordTop = SCALE( fDistFromTop, 0, fFrameHeight, pRect->top, pRect->bottom ); fTexCoordTop += fAddToTexCoord; const float fTexCoordLeft = pRect->left;