... and associated cast changes.
This commit is contained in:
@@ -79,7 +79,7 @@ Font::Font( const CString &sASCIITexturePath )
|
||||
if( ini.GetValueF( "Char Widths", "ScaleAllWidthsBy", fScaleAllWidthsBy ) )
|
||||
{
|
||||
for( int i=0; i<256; i++ )
|
||||
m_iFrameNoToWidth[i] = roundf( m_iFrameNoToWidth[i] * fScaleAllWidthsBy );
|
||||
m_iFrameNoToWidth[i] = int(roundf( m_iFrameNoToWidth[i] * fScaleAllWidthsBy ));
|
||||
}
|
||||
|
||||
m_iLineSpacing = m_pTexture->GetSourceFrameHeight();
|
||||
|
||||
@@ -185,7 +185,7 @@ void LifeMeterBar::DrawPrimitives()
|
||||
static RECT rectSize;
|
||||
rectSize.left = -m_iMeterWidth/2;
|
||||
rectSize.top = -m_iMeterHeight/2;
|
||||
rectSize.right = -m_iMeterWidth/2 + roundf(m_iMeterWidth*m_fTrailingLifePercentage);
|
||||
rectSize.right = -m_iMeterWidth/2 + int(roundf(m_iMeterWidth*m_fTrailingLifePercentage));
|
||||
rectSize.bottom = +m_iMeterHeight/2;
|
||||
|
||||
float fPrecentOffset = TIMER->GetTimeSinceStart();
|
||||
|
||||
@@ -610,7 +610,7 @@ void MusicWheel::SwitchSortOrder()
|
||||
|
||||
float MusicWheel::GetBannerY( float fPosOffsetsFromMiddle )
|
||||
{
|
||||
return (float)roundf( fPosOffsetsFromMiddle*g_fItemSpacingY );
|
||||
return roundf( fPosOffsetsFromMiddle*g_fItemSpacingY );
|
||||
}
|
||||
|
||||
float MusicWheel::GetBannerBrightness( float fPosOffsetsFromMiddle )
|
||||
@@ -648,7 +648,7 @@ float MusicWheel::GetBannerX( float fPosOffsetsFromMiddle )
|
||||
{
|
||||
float fX = (1-cosf((fPosOffsetsFromMiddle)/3))*95.0f;
|
||||
|
||||
return (float)roundf( fX );
|
||||
return roundf( fX );
|
||||
}
|
||||
|
||||
void MusicWheel::RebuildWheelItemDisplays()
|
||||
|
||||
@@ -109,7 +109,7 @@ CString NoteData::GetSMNoteDataString()
|
||||
if( nt == NOTE_TYPE_INVALID )
|
||||
iRowSpacing = 1;
|
||||
else
|
||||
iRowSpacing = roundf( NoteTypeToBeat(nt) * ROWS_PER_BEAT );
|
||||
iRowSpacing = int(roundf( NoteTypeToBeat(nt) * ROWS_PER_BEAT ));
|
||||
|
||||
CStringArray asMeasureLines;
|
||||
asMeasureLines.Add( ssprintf(" // measure %d", m+1) );
|
||||
@@ -864,7 +864,7 @@ NoteType NoteData::GetSmallestNoteTypeForMeasure( int iMeasureIndex )
|
||||
for( nt=(NoteType)0; nt<NUM_NOTE_TYPES; nt=NoteType(nt+1) ) // for each NoteType, largest to largest
|
||||
{
|
||||
float fBeatSpacing = NoteTypeToBeat( nt );
|
||||
int iRowSpacing = roundf( fBeatSpacing * ROWS_PER_BEAT );
|
||||
int iRowSpacing = int(roundf( fBeatSpacing * ROWS_PER_BEAT ));
|
||||
|
||||
bool bFoundSmallerNote = false;
|
||||
for( int i=iMeasureStartIndex; i<=iMeasureLastIndex; i++ ) // for each index in this measure
|
||||
|
||||
@@ -186,7 +186,7 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out )
|
||||
fprintf( fp, "#ARTIST:%s;\n", out.m_sArtist );
|
||||
ASSERT( out.m_BPMSegments[0].m_fStartBeat == 0 );
|
||||
fprintf( fp, "#BPM:%.2f;\n", out.m_BPMSegments[0].m_fBPM );
|
||||
fprintf( fp, "#GAP:%d;\n", -roundf( out.m_fBeat0OffsetInSeconds*1000 ) );
|
||||
fprintf( fp, "#GAP:%d;\n", int(-roundf( out.m_fBeat0OffsetInSeconds*1000 )) );
|
||||
|
||||
if( out.m_StopSegments.GetSize() )
|
||||
{
|
||||
@@ -195,7 +195,8 @@ bool NotesWriterDWI::Write( CString sPath, const Song &out )
|
||||
for( int i=0; i<out.m_StopSegments.GetSize(); i++ )
|
||||
{
|
||||
const StopSegment &fs = out.m_StopSegments[i];
|
||||
fprintf( fp, "%.2f=%.2f", BeatToNoteRow( fs.m_fStartBeat ) / ROWS_PER_BEAT * 4.0f, roundf(fs.m_fStopSeconds*1000) );
|
||||
fprintf( fp, "%.2f=%.2f", BeatToNoteRow( fs.m_fStartBeat ) / ROWS_PER_BEAT * 4.0f,
|
||||
roundf(fs.m_fStopSeconds*1000) );
|
||||
if( i != out.m_StopSegments.GetSize()-1 )
|
||||
fprintf( fp, "," );
|
||||
}
|
||||
|
||||
@@ -207,8 +207,8 @@ ScreenStage::ScreenStage()
|
||||
const float fStageOffScreenY = CENTER_Y+fStageHeight;
|
||||
|
||||
m_quadMask.SetDiffuse( D3DXCOLOR(0,0,0,0) );
|
||||
m_quadMask.StretchTo( CRect(SCREEN_LEFT, roundf(fStageOffScreenY-fStageHeight/2),
|
||||
SCREEN_RIGHT, roundf(fStageOffScreenY+fStageHeight/2)) );
|
||||
m_quadMask.StretchTo( CRect(SCREEN_LEFT, int(roundf(fStageOffScreenY-fStageHeight/2)),
|
||||
SCREEN_RIGHT, int(roundf(fStageOffScreenY+fStageHeight/2))) );
|
||||
/* Put the quad mask on top, so draws to the Stage will be "under" it. */
|
||||
m_quadMask.SetZ( -1 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user