Fixed crash drawing area highlight if boost is on
This commit is contained in:
@@ -45,7 +45,8 @@ float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat )
|
|||||||
switch( GAMESTATE->m_PlayerOptions[pn].m_AccelType )
|
switch( GAMESTATE->m_PlayerOptions[pn].m_AccelType )
|
||||||
{
|
{
|
||||||
case PlayerOptions::ACCEL_BOOST:
|
case PlayerOptions::ACCEL_BOOST:
|
||||||
fYOffset *= 1.5f / ((fYOffset+SCREEN_HEIGHT/1.2f)/SCREEN_HEIGHT);
|
if( fYOffset > 0 ) // speed the arrows back to normal after they cross 0
|
||||||
|
fYOffset *= 1.5f / ((fYOffset+SCREEN_HEIGHT/1.2f)/SCREEN_HEIGHT);
|
||||||
break;
|
break;
|
||||||
case PlayerOptions::ACCEL_LAND:
|
case PlayerOptions::ACCEL_LAND:
|
||||||
if( fYOffset > 0 ) // speed the arrows back to normal after they cross 0
|
if( fYOffset > 0 ) // speed the arrows back to normal after they cross 0
|
||||||
|
|||||||
@@ -140,10 +140,14 @@ void NoteField::DrawMarkerBar( const float fBeat )
|
|||||||
|
|
||||||
void NoteField::DrawAreaHighlight( const float fStartBeat, const float fEndBeat )
|
void NoteField::DrawAreaHighlight( const float fStartBeat, const float fEndBeat )
|
||||||
{
|
{
|
||||||
const float fYStartOffset = ArrowGetYOffset( m_PlayerNumber, fStartBeat );
|
float fYStartOffset = ArrowGetYOffset( m_PlayerNumber, fStartBeat );
|
||||||
const float fYStartPos = ArrowGetYPos( m_PlayerNumber, fYStartOffset );
|
float fYStartPos = ArrowGetYPos( m_PlayerNumber, fYStartOffset );
|
||||||
const float fYEndOffset = ArrowGetYOffset( m_PlayerNumber, fEndBeat );
|
float fYEndOffset = ArrowGetYOffset( m_PlayerNumber, fEndBeat );
|
||||||
const float fYEndPos = ArrowGetYPos( m_PlayerNumber, fYEndOffset );
|
float fYEndPos = ArrowGetYPos( m_PlayerNumber, fYEndOffset );
|
||||||
|
|
||||||
|
// Something in OpenGL crashes if this is values are too large. Strange. -Chris
|
||||||
|
fYStartPos = max( fYStartPos, -1000 );
|
||||||
|
fYEndPos = min( fYEndPos, +5000 );
|
||||||
|
|
||||||
m_rectAreaHighlight.StretchTo( RectI(0, (int)fYStartPos-ARROW_SIZE/2, 1, (int)fYEndPos+ARROW_SIZE/2) );
|
m_rectAreaHighlight.StretchTo( RectI(0, (int)fYStartPos-ARROW_SIZE/2, 1, (int)fYEndPos+ARROW_SIZE/2) );
|
||||||
m_rectAreaHighlight.SetZoomX( (float)(GetNumTracks()+1) * ARROW_SIZE );
|
m_rectAreaHighlight.SetZoomX( (float)(GetNumTracks()+1) * ARROW_SIZE );
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ ScreenEdit::ScreenEdit()
|
|||||||
|
|
||||||
m_NoteFieldEdit.SetXY( EDIT_X, EDIT_GRAY_Y );
|
m_NoteFieldEdit.SetXY( EDIT_X, EDIT_GRAY_Y );
|
||||||
m_NoteFieldEdit.SetZoom( 0.5f );
|
m_NoteFieldEdit.SetZoom( 0.5f );
|
||||||
m_NoteFieldEdit.Load( ¬eData, PLAYER_1, -200, 800 );
|
m_NoteFieldEdit.Load( ¬eData, PLAYER_1, -220, 800 );
|
||||||
|
|
||||||
m_rectRecordBack.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
m_rectRecordBack.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
m_rectRecordBack.SetDiffuse( RageColor(0,0,0,0) );
|
m_rectRecordBack.SetDiffuse( RageColor(0,0,0,0) );
|
||||||
|
|||||||
Reference in New Issue
Block a user