improved snaking alignment, fixed crash in BackgroundAnimation if image is small enough to have > MAX_SPRITES
This commit is contained in:
@@ -440,7 +440,7 @@ SectionColor7=0.8, 0.6, 0.0, 1
|
|||||||
MeterWidth=258
|
MeterWidth=258
|
||||||
MeterHeight=20
|
MeterHeight=20
|
||||||
DangerThreshold=0.2
|
DangerThreshold=0.2
|
||||||
NumChambers=30
|
NumChambers=32
|
||||||
NumStrips=2
|
NumStrips=2
|
||||||
|
|
||||||
[TransitionKeepAlive]
|
[TransitionKeepAlive]
|
||||||
|
|||||||
@@ -116,7 +116,8 @@ public:
|
|||||||
|
|
||||||
DrawMask( m_fPercent );
|
DrawMask( m_fPercent );
|
||||||
|
|
||||||
const float fPercentBetweenStrips = 1.0f/g_iNumStrips;
|
const float fChamberWidthInPercent = 1.0f/g_iNumChambers;
|
||||||
|
const float fPercentBetweenStrips = froundf( 1.0f/g_iNumStrips, fChamberWidthInPercent );
|
||||||
|
|
||||||
const float fPercentOffset = fmodf( GAMESTATE->m_fSongBeat/4+1000, fPercentBetweenStrips );
|
const float fPercentOffset = fmodf( GAMESTATE->m_fSongBeat/4+1000, fPercentBetweenStrips );
|
||||||
ASSERT( fPercentOffset >= 0 && fPercentOffset <= fPercentBetweenStrips );
|
ASSERT( fPercentOffset >= 0 && fPercentOffset <= fPercentBetweenStrips );
|
||||||
@@ -206,10 +207,10 @@ public:
|
|||||||
m_quadMask.Draw();
|
m_quadMask.Draw();
|
||||||
|
|
||||||
// draw mask for horizontal chambers
|
// draw mask for horizontal chambers
|
||||||
rect.left = LONG(-g_iMeterWidth/2 + fRightPercent*g_iMeterWidth);
|
rect.left = (LONG)(-g_iMeterWidth/2 + fRightPercent*g_iMeterWidth);
|
||||||
rect.top = LONG(-g_iMeterHeight/2);
|
rect.top = -g_iMeterHeight/2;
|
||||||
rect.right = LONG(+g_iMeterWidth/2);
|
rect.right = +g_iMeterWidth/2;
|
||||||
rect.bottom = LONG(+g_iMeterHeight/2);
|
rect.bottom = +g_iMeterHeight/2;
|
||||||
|
|
||||||
rect.left = MIN( rect.left, + g_iMeterWidth/2 );
|
rect.left = MIN( rect.left, + g_iMeterWidth/2 );
|
||||||
rect.right = MIN( rect.right, + g_iMeterWidth/2 );
|
rect.right = MIN( rect.right, + g_iMeterWidth/2 );
|
||||||
@@ -358,10 +359,6 @@ void LifeMeterBar::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
|
|
||||||
const float fDelta = m_fLifePercentage - m_fTrailingLifePercentage;
|
const float fDelta = m_fLifePercentage - m_fTrailingLifePercentage;
|
||||||
// const float fSign = (fDelta>0) ? 1.0f : -1.0f;
|
|
||||||
|
|
||||||
// const float fLinearForce = fSign * 0.2f;
|
|
||||||
// m_fLifeVelocity += fSpringForce * fDeltaTime;
|
|
||||||
|
|
||||||
const float fSpringForce = fDelta * 2.0f;
|
const float fSpringForce = fDelta * 2.0f;
|
||||||
m_fLifeVelocity += fSpringForce * fDeltaTime;
|
m_fLifeVelocity += fSpringForce * fDeltaTime;
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ void ScreenGraphicOptions::ImportOptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
||||||
m_iSelectedOption[0][GO_BGBRIGHTNESS] = roundf( PREFSMAN->m_fBGBrightness*10 );
|
m_iSelectedOption[0][GO_BGBRIGHTNESS] = (int)( PREFSMAN->m_fBGBrightness*10+0.5f );
|
||||||
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
||||||
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
||||||
m_iSelectedOption[0][GO_VSYNC] = PREFSMAN->m_bVsync ? 1:0;
|
m_iSelectedOption[0][GO_VSYNC] = PREFSMAN->m_bVsync ? 1:0;
|
||||||
|
|||||||
Reference in New Issue
Block a user