fix hold notes

This commit is contained in:
Glenn Maynard
2002-11-12 01:55:25 +00:00
parent ec764db169
commit 0178e1e3df
+20 -19
View File
@@ -223,14 +223,13 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
const int fYStep = 8; // draw a segment every 8 pixels // this requires that the texture dimensions be a multiple of 8
// DISPLAY->SetBlendModeNormal();
// if( bDrawGlowOnly )
// DISPLAY->SetColorDiffuse();
// else
// DISPLAY->SetColorTextureMultDiffuse();
// DISPLAY->SetAlphaTextureMultDiffuse();
// DISPLAY->EnableTextureWrapping();
// DISPLAY->SetTexture( m_sprHoldParts.GetTexture() );
DISPLAY->SetBlendModeNormal();
if( bDrawGlowOnly )
DISPLAY->SetTextureModeGlow();
else
DISPLAY->SetTextureModeModulate();
DISPLAY->EnableTextureWrapping();
DISPLAY->SetTexture( m_sprHoldParts.GetTexture() );
//
// Draw the tail
@@ -274,8 +273,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
static RageVertex v[4];
v[0].p = RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0); v[0].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[0].t = RageVector2(fTexCoordLeft, fTexCoordTop),
v[1].p = RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0); v[1].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[1].t = RageVector2(fTexCoordRight, fTexCoordTop);
v[2].p = RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0); v[2].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordLeft, fTexCoordBottom);
v[3].p = RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0); v[3].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[3].t = RageVector2(fTexCoordRight, fTexCoordBottom);
v[2].p = RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0); v[2].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordRight, fTexCoordBottom);
v[3].p = RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0); v[3].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[3].t = RageVector2(fTexCoordLeft, fTexCoordBottom);
DISPLAY->DrawQuad( v );
}
@@ -315,10 +314,11 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
continue;
static RageVertex v[4];
v[0].p = RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0); v[0].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[2].t = RageVector2(fTexCoordLeft, fTexCoordTop);
v[1].p = RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0); v[1].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[2].t = RageVector2(fTexCoordRight, fTexCoordTop);
v[2].p = RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0); v[2].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordLeft, fTexCoordBottom);
v[3].p = RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0); v[3].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordRight, fTexCoordBottom);
v[0].p = RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0); v[0].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[0].t = RageVector2(fTexCoordLeft, fTexCoordTop);
v[1].p = RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0); v[1].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[1].t = RageVector2(fTexCoordRight, fTexCoordTop);
v[2].p = RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0); v[2].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordRight, fTexCoordBottom);
v[3].p = RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0); v[3].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[3].t = RageVector2(fTexCoordLeft, fTexCoordBottom);
DISPLAY->DrawQuad( v );
}
if( g_bDrawTapOnTopOfHoldHead )
@@ -361,11 +361,12 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
if( !bDrawGlowOnly && colorDiffuseTop.a==0 && colorDiffuseBottom.a==0 )
continue;
static RageVertex v[4];
v[0].p = RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0); v[0].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[2].t = RageVector2(fTexCoordLeft, fTexCoordTop);
v[0].p = RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0); v[0].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[2].t = RageVector2(fTexCoordRight, fTexCoordTop);
v[0].p = RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0); v[0].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordLeft, fTexCoordBottom);
v[0].p = RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0); v[0].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordRight, fTexCoordBottom);
static RageVertex v[4];
v[0].p = RageVector3(fXTopLeft-0.5f, fYTop-0.5f, 0); v[0].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[0].t = RageVector2(fTexCoordLeft, fTexCoordTop);
v[1].p = RageVector3(fXTopRight-0.5f, fYTop-0.5f, 0); v[1].c = bDrawGlowOnly ? colorGlowTop : colorDiffuseTop; v[1].t = RageVector2(fTexCoordRight, fTexCoordTop);
v[2].p = RageVector3(fXBottomRight-0.5f,fYBottom-0.5f,0); v[2].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[2].t = RageVector2(fTexCoordRight, fTexCoordBottom);
v[3].p = RageVector3(fXBottomLeft-0.5f, fYBottom-0.5f,0); v[3].c = bDrawGlowOnly ? colorGlowBottom : colorDiffuseBottom; v[3].t = RageVector2(fTexCoordLeft, fTexCoordBottom);
DISPLAY->DrawQuad( v );
}
}
else