autosync screen cleanup
This commit is contained in:
@@ -89,7 +89,7 @@ void AdjustSync::HandleAutosync( float fNoteOffBySeconds )
|
|||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( stddev < .03 && stddev < fabsf(mean) ) // If they stepped with less than .03 error
|
if( stddev < .03 ) // If they stepped with less than .03 error
|
||||||
{
|
{
|
||||||
switch( GAMESTATE->m_SongOptions.m_AutosyncType )
|
switch( GAMESTATE->m_SongOptions.m_AutosyncType )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
#include "AdjustSync.h"
|
#include "AdjustSync.h"
|
||||||
|
#include "ScreenDimensions.h"
|
||||||
|
|
||||||
REGISTER_SCREEN_CLASS( ScreenGameplaySyncMachine );
|
REGISTER_SCREEN_CLASS( ScreenGameplaySyncMachine );
|
||||||
|
|
||||||
@@ -35,6 +36,22 @@ void ScreenGameplaySyncMachine::Init()
|
|||||||
GAMESTATE->m_bGameplayLeadIn.Set( false );
|
GAMESTATE->m_bGameplayLeadIn.Set( false );
|
||||||
|
|
||||||
m_DancingState = STATE_DANCING;
|
m_DancingState = STATE_DANCING;
|
||||||
|
|
||||||
|
m_textSyncInfo.LoadFromFont( THEME->GetPathF("Common","normal") );
|
||||||
|
m_textSyncInfo.SetXY( SCREEN_CENTER_X+160, SCREEN_CENTER_Y );
|
||||||
|
m_textSyncInfo.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
|
m_textSyncInfo.SetZoom( 0.6f );
|
||||||
|
this->AddChild( &m_textSyncInfo );
|
||||||
|
|
||||||
|
this->SubscribeToMessage( Message_AutosyncChanged );
|
||||||
|
|
||||||
|
RefreshText();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenGameplaySyncMachine::Update( float fDelta )
|
||||||
|
{
|
||||||
|
ScreenGameplayNormal::Update( fDelta );
|
||||||
|
RefreshText();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGameplaySyncMachine::HandleScreenMessage( const ScreenMessage SM )
|
void ScreenGameplaySyncMachine::HandleScreenMessage( const ScreenMessage SM )
|
||||||
@@ -64,6 +81,19 @@ void ScreenGameplaySyncMachine::ResetAndRestartCurrentSong()
|
|||||||
StartPlayingSong( 4, 0 );
|
StartPlayingSong( 4, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenGameplaySyncMachine::RefreshText()
|
||||||
|
{
|
||||||
|
float fNew = PREFSMAN->m_fGlobalOffsetSeconds;
|
||||||
|
float fOld = AdjustSync::s_fGlobalOffsetSecondsOriginal;
|
||||||
|
RString s;
|
||||||
|
s += ssprintf( "Old offset: %0.3f\n", fOld );
|
||||||
|
s += ssprintf( "New offset: %0.3f\n", fNew );
|
||||||
|
s += ssprintf( "Collecting sample: %d / %d", AdjustSync::s_iAutosyncOffsetSample+1, SAMPLE_COUNT );
|
||||||
|
|
||||||
|
m_textSyncInfo.SetText( s );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2001-2004 Chris Danford
|
* (c) 2001-2004 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -10,11 +10,19 @@ class ScreenGameplaySyncMachine : public ScreenGameplayNormal
|
|||||||
public:
|
public:
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
|
|
||||||
|
virtual void Update( float fDelta );
|
||||||
|
|
||||||
|
virtual ScreenType GetScreenType() const { return system_menu; }
|
||||||
|
|
||||||
void HandleScreenMessage( const ScreenMessage SM );
|
void HandleScreenMessage( const ScreenMessage SM );
|
||||||
void ResetAndRestartCurrentSong();
|
void ResetAndRestartCurrentSong();
|
||||||
protected:
|
protected:
|
||||||
|
void RefreshText();
|
||||||
|
|
||||||
Song m_Song;
|
Song m_Song;
|
||||||
const Steps *m_pSteps;
|
const Steps *m_pSteps;
|
||||||
|
|
||||||
|
BitmapText m_textSyncInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user