remove ScreenGameplaySyncMachine - instead concentrage on better sync controls in ScreenGameplay/ScreenSyncOverlay

This commit is contained in:
Chris Danford
2008-05-11 08:16:10 +00:00
parent 21a9849ca9
commit 89a4aeb1ff
11 changed files with 54 additions and 266 deletions
+5 -7
View File
@@ -1196,13 +1196,6 @@ GiveUpAbortedText=Nicht aufgeben!
GiveUpBackText=&BACK; gedrückt haben, um aufzugeben GiveUpBackText=&BACK; gedrückt haben, um aufzugeben
GiveUpStartText=&START; gedrückt haben, um aufzugeben GiveUpStartText=&START; gedrückt haben, um aufzugeben
[ScreenGameplaySyncMachine]
Collecting sample=gesammelte Beispiele
HelpText=Schlag erhöhen, bis die Pfeile mit der Musik synchron sind::&BACK; drücken, wenn Sie fertig sind
New offset=neu ausgleichen
Old offset=alte ausgleichungen
Standard deviation=standard abweichungen
[ScreenJoinMultiplayer] [ScreenJoinMultiplayer]
&MENUUP; Join=&MENUUP; Mitmachen &MENUUP; Join=&MENUUP; Mitmachen
No Controller=Kein Controller No Controller=Kein Controller
@@ -1332,6 +1325,11 @@ Machine offset - notes earlier/later=Maschine ausgleichen - Noten früher / spä
Revert sync changes=Synchronisationswechsel zurücksetzen Revert sync changes=Synchronisationswechsel zurücksetzen
Song offset - notes earlier/later=Songausgleich - Noten früher / später Song offset - notes earlier/later=Songausgleich - Noten früher / später
Sync changes reverted.=Synchronisationsveränderungen rückgängig gemacht. Sync changes reverted.=Synchronisationsveränderungen rückgängig gemacht.
Collecting sample=gesammelte Beispiele
HelpText=Schlag erhöhen, bis die Pfeile mit der Musik synchron sind::&BACK; drücken, wenn Sie fertig sind
New offset=neu ausgleichen
Old offset=alte ausgleichungen
Standard deviation=standard abweichungen
[ScreenSystemLayer] [ScreenSystemLayer]
CreditsCardChanged=SPEICHERKARTE GEWECHSELT CreditsCardChanged=SPEICHERKARTE GEWECHSELT
+4 -6
View File
@@ -1131,12 +1131,6 @@ GiveUpAbortedText=Don't give up!
GiveUpStartText=Continue holding &START; to give up GiveUpStartText=Continue holding &START; to give up
GiveUpBackText=Continue holding &BACK; to give up GiveUpBackText=Continue holding &BACK; to give up
[ScreenGameplaySyncMachine]
Old offset=Old offset
New offset=New offset
Collecting sample=Collecting sample
Standard deviation=Standard deviation
[ScreenInstructions] [ScreenInstructions]
PlayMode_Regular title=How To Play PlayMode_Regular title=How To Play
PlayMode_Regular instructions=Two things to watch out for when you play are Hold Arrows and Mines. PlayMode_Regular instructions=Two things to watch out for when you play are Hold Arrows and Mines.
@@ -1331,6 +1325,10 @@ Current BPM - smaller/larger=Current BPM - smaller/larger
Song offset - notes earlier/later=Song offset - notes earlier/later Song offset - notes earlier/later=Song offset - notes earlier/later
Machine offset - notes earlier/later=Machine offset - notes earlier/later Machine offset - notes earlier/later=Machine offset - notes earlier/later
(hold Alt for smaller increment)=(hold Alt for smaller increment) (hold Alt for smaller increment)=(hold Alt for smaller increment)
Old offset=Old offset
New offset=New offset
Collecting sample=Collecting sample
Standard deviation=Standard deviation
[ScreenSystemLayer] [ScreenSystemLayer]
CreditsCardChanged=CARD SWITCHED CreditsCardChanged=CARD SWITCHED
+5 -7
View File
@@ -1153,13 +1153,6 @@ GiveUpAbortedText=¡No abandones!
GiveUpBackText=Continuar presionando &BACK; para abandonar GiveUpBackText=Continuar presionando &BACK; para abandonar
GiveUpStartText=Continuar presionando &START; para abandonar GiveUpStartText=Continuar presionando &START; para abandonar
[ScreenGameplaySyncMachine]
Collecting sample=Colectando muestra
HelpText=Controlar el ritmo hasta que las flechas esten en sincronía con la música::Presiona &BACK; cuando hayas terminado
New offset=Nuevo offset
Old offset=Antiguo offset
Standard deviation=Deviacion estandar
[ScreenJoinMultiplayer] [ScreenJoinMultiplayer]
&MENUUP; Join=&MENUUP; unir &MENUUP; Join=&MENUUP; unir
No Controller=No Controlador No Controller=No Controlador
@@ -1289,6 +1282,11 @@ Machine offset - notes earlier/later=Offset de la maquina - notas mas tempranas/
Revert sync changes=Sync revertido cambia Revert sync changes=Sync revertido cambia
Song offset - notes earlier/later=offset de la cancion - notas mas tempranar/mas tardes Song offset - notes earlier/later=offset de la cancion - notas mas tempranar/mas tardes
Sync changes reverted.=Revertidos los cambios sync. Sync changes reverted.=Revertidos los cambios sync.
Collecting sample=Colectando muestra
HelpText=Controlar el ritmo hasta que las flechas esten en sincronía con la música::Presiona &BACK; cuando hayas terminado
New offset=Nuevo offset
Old offset=Antiguo offset
Standard deviation=Deviacion estandar
[ScreenSystemLayer] [ScreenSystemLayer]
CreditsCardChanged=TARJETA CONECTADA CreditsCardChanged=TARJETA CONECTADA
+5 -7
View File
@@ -1172,13 +1172,6 @@ GiveUpAbortedText=N'abandonnez pas!
GiveUpBackText=Maintenez le bouton &BACK; enfoncé pour abandonner GiveUpBackText=Maintenez le bouton &BACK; enfoncé pour abandonner
GiveUpStartText=Maintenez le bouton &START; enfoncé pour abandonner GiveUpStartText=Maintenez le bouton &START; enfoncé pour abandonner
[ScreenGameplaySyncMachine]
Collecting sample=Essais collectés
HelpText=Confirmez les flèches jusqu'à ce qu'elles soient synchronisées avec le rythme de la musique::Appuyez sur &BACK; quand vous avez terminé
New offset=Nouveau timing
Old offset=Ancien timing
Standard deviation=Timing par défaut
[ScreenJoinMultiplayer] [ScreenJoinMultiplayer]
&MENUUP; Join=&MENUUP; Participer &MENUUP; Join=&MENUUP; Participer
No Controller=Pas de contrôleur No Controller=Pas de contrôleur
@@ -1308,6 +1301,11 @@ Machine offset - notes earlier/later=Délai machine - notes plus tôt/plus tard
Revert sync changes=Annuler les changements de synchronisation Revert sync changes=Annuler les changements de synchronisation
Song offset - notes earlier/later=Délai chanson - notes plus tôt/plus tard Song offset - notes earlier/later=Délai chanson - notes plus tôt/plus tard
Sync changes reverted.=Changements sync. annulés. Sync changes reverted.=Changements sync. annulés.
Collecting sample=Essais collectés
HelpText=Confirmez les flèches jusqu'à ce qu'elles soient synchronisées avec le rythme de la musique::Appuyez sur &BACK; quand vous avez terminé
New offset=Nouveau timing
Old offset=Ancien timing
Standard deviation=Timing par défaut
[ScreenSystemLayer] [ScreenSystemLayer]
CreditsCardChanged=CARTE ECHANGEE CreditsCardChanged=CARTE ECHANGEE
+5 -7
View File
@@ -1166,13 +1166,6 @@ GiveUpAbortedText=Non arrenderti!
GiveUpBackText=Per ritirarti tieni premuto &BACK; GiveUpBackText=Per ritirarti tieni premuto &BACK;
GiveUpStartText=Per ritirarti tieni premuto &START; GiveUpStartText=Per ritirarti tieni premuto &START;
[ScreenGameplaySyncMachine]
Collecting sample=Raccolta esempi in corso
HelpText=Balla a ritmo finché le frecce non sono in sync con la musica::quando hai finito premi &BACK;
New offset=Nuova struttura
Old offset=Vecchia struttura
Standard deviation=Deviazione standard
[ScreenJoinMultiplayer] [ScreenJoinMultiplayer]
&MENUUP; Join=&MENUUP; Entra &MENUUP; Join=&MENUUP; Entra
No Controller=Non c'è il Controller No Controller=Non c'è il Controller
@@ -1302,6 +1295,11 @@ Machine offset - notes earlier/later=Struttura macchina - note prima/dopo
Revert sync changes=Inverti modifiche sincronizzazione Revert sync changes=Inverti modifiche sincronizzazione
Song offset - notes earlier/later=Struttura canzone - note prima/dopo Song offset - notes earlier/later=Struttura canzone - note prima/dopo
Sync changes reverted.=Modifiche sincronizzazione revertite. Sync changes reverted.=Modifiche sincronizzazione revertite.
Collecting sample=Raccolta esempi in corso
HelpText=Balla a ritmo finché le frecce non sono in sync con la musica::quando hai finito premi &BACK;
New offset=Nuova struttura
Old offset=Vecchia struttura
Standard deviation=Deviazione standard
[ScreenSystemLayer] [ScreenSystemLayer]
CreditsCardChanged=SCHEDA CAMBIATA CreditsCardChanged=SCHEDA CAMBIATA
+2 -27
View File
@@ -1779,6 +1779,7 @@ Fallback="Screen"
[ScreenSyncOverlay] [ScreenSyncOverlay]
Class="ScreenSyncOverlay" Class="ScreenSyncOverlay"
Fallback="Screen" Fallback="Screen"
SyncInfoOnCommand=x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y;zoom,0;decelerate,0.5;zoom,0.6
[ScreenStatsOverlay] [ScreenStatsOverlay]
Class="ScreenStatsOverlay" Class="ScreenStatsOverlay"
@@ -3394,7 +3395,7 @@ HelpX=SCREEN_CENTER_X+256
HelpY=SCREEN_BOTTOM-40 HelpY=SCREEN_BOTTOM-40
HelpOnCommand=draworder,1;wrapwidthpixels,200;zoomy,0;linear,0.5;zoomy,1 HelpOnCommand=draworder,1;wrapwidthpixels,200;zoomy,0;linear,0.5;zoomy,1
HelpText=ScreenString("HelpTextOptionsAndBack") HelpText=ScreenString("HelpTextOptionsAndBack")
LineNames="1,2,3,4,5,6,7,8,9" LineNames="1,2,3,4,5,6,7,8"
Line1="gamecommand;screen,ScreenMapControllers;name,Key Joy Mappings" Line1="gamecommand;screen,ScreenMapControllers;name,Key Joy Mappings"
Line2="gamecommand;screen,ScreenTestInput;name,Test Input" Line2="gamecommand;screen,ScreenTestInput;name,Test Input"
Line3="gamecommand;screen,ScreenAppearanceOptions;name,Appearance Options" Line3="gamecommand;screen,ScreenAppearanceOptions;name,Appearance Options"
@@ -3403,7 +3404,6 @@ Line5="gamecommand;screen,ScreenOptionsAdvanced;name,Advanced Options"
Line6="gamecommand;screen,ScreenNetworkOptions;name,Network Options" Line6="gamecommand;screen,ScreenNetworkOptions;name,Network Options"
Line7="gamecommand;screen,ScreenOptionsManageProfiles;name,Profiles" Line7="gamecommand;screen,ScreenOptionsManageProfiles;name,Profiles"
Line8="gamecommand;screen,ScreenReloadSongs;name,Reload Songs" Line8="gamecommand;screen,ScreenReloadSongs;name,Reload Songs"
Line9="gamecommand;screen,ScreenGameplaySyncMachine;name,Calibrate Machine Sync"
GroupedScreens="ScreenOptionsService,ScreenAppearanceOptions,ScreenMapControllers,ScreenOptionsGraphicsSound,ScreenOptionsAdvanced,ScreenOptionsManageProfiles,ScreenNetworkOptions,ScreenReloadSongs,ScreenTestInput" GroupedScreens="ScreenOptionsService,ScreenAppearanceOptions,ScreenMapControllers,ScreenOptionsGraphicsSound,ScreenOptionsAdvanced,ScreenOptionsManageProfiles,ScreenNetworkOptions,ScreenReloadSongs,ScreenTestInput"
PersistScreens="ScreenOptionsService,ScreenAppearanceOptions,ScreenMapControllers,ScreenOptionsGraphicsSound,ScreenOptionsAdvanced,ScreenOptionsManageProfiles,ScreenNetworkOptions,ScreenReloadSongs,ScreenTestInput" PersistScreens="ScreenOptionsService,ScreenAppearanceOptions,ScreenMapControllers,ScreenOptionsGraphicsSound,ScreenOptionsAdvanced,ScreenOptionsManageProfiles,ScreenNetworkOptions,ScreenReloadSongs,ScreenTestInput"
@@ -4230,31 +4230,6 @@ Class="ScreenJoinMultiplayer"
Fallback="ScreenWithMenuElements" Fallback="ScreenWithMenuElements"
TimerSeconds=-1 TimerSeconds=-1
[ScreenGameplaySyncMachine]
Class="ScreenGameplaySyncMachine"
Fallback="ScreenGameplay"
PrevScreen="ScreenOptionsService"
NextScreen="ScreenOptionsService"
PlayerType="PlayerSyncMachine"
LifeP1OnCommand=visible,false
LifeP2OnCommand=visible,false
ScoreP1OnCommand=visible,false
ScoreP2OnCommand=visible,false
StageDisplayOnCommand=visible,false
ScoreFrameOnCommand=visible,false
LifeFrameOnCommand=visible,false
DifficultyP1OnCommand=visible,false
DifficultyP1ReverseOnCommand=visible,false
DifficultyP2OnCommand=visible,false
DifficultyP2ReverseOnCommand=visible,false
SongOptionsOnCommand=visible,false
HelpX=SCREEN_CENTER_X
HelpY=SCREEN_BOTTOM-24
HelpOnCommand=draworder,1;zoomy,0;linear,0.5;zoomy,1
HelpOffCommand=linear,0.5;zoomy,0
AllowCenter1Player=0
SyncInfoOnCommand=x,SCREEN_CENTER_X+160;y,SCREEN_CENTER_Y;zoom,0;decelerate,0.5;zoom,0.6
[PaneDisplay] [PaneDisplay]
ShiftP1X=-40 ShiftP1X=-40
ShiftP1Y=0 ShiftP1Y=0
-142
View File
@@ -1,142 +0,0 @@
#include "global.h"
#include "ScreenGameplaySyncMachine.h"
#include "NotesLoaderSM.h"
#include "GameState.h"
#include "GameManager.h"
#include "PrefsManager.h"
#include "GamePreferences.h"
#include "AdjustSync.h"
#include "ScreenDimensions.h"
#include "InputEventPlus.h"
#include "SongUtil.h"
REGISTER_SCREEN_CLASS( ScreenGameplaySyncMachine );
void ScreenGameplaySyncMachine::Init()
{
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
AdjustSync::ResetOriginalSyncData();
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music.sm");
SMLoader::LoadFromSMFile( sFile, m_Song );
m_Song.SetSongDir( Dirname(sFile) );
m_Song.TidyUpData();
GAMESTATE->m_pCurSong.Set( &m_Song );
Steps *pSteps = SongUtil::GetOneSteps( &m_Song );
ASSERT( pSteps );
GAMESTATE->m_pCurSteps[0].Set( pSteps );
GamePreferences::m_AutoPlay.Set( PC_HUMAN );
ScreenGameplayNormal::Init();
SO_GROUP_ASSIGN( GAMESTATE->m_SongOptions, ModsLevel_Stage, m_AutosyncType, SongOptions::AUTOSYNC_MACHINE );
ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that animate "ready", "here we go", etc.
GAMESTATE->m_bGameplayLeadIn.Set( false );
m_DancingState = STATE_DANCING;
m_textSyncInfo.SetName( "SyncInfo" );
m_textSyncInfo.LoadFromFont( THEME->GetPathF("Common","normal") );
ActorUtil::LoadAllCommands( m_textSyncInfo, m_sName );
this->AddChild( &m_textSyncInfo );
this->SubscribeToMessage( Message_AutosyncChanged );
RefreshText();
}
void ScreenGameplaySyncMachine::Update( float fDelta )
{
ScreenGameplayNormal::Update( fDelta );
RefreshText();
}
void ScreenGameplaySyncMachine::Input( const InputEventPlus &input )
{
// Hack to make this work from Player2's controls
InputEventPlus _input = input;
if( _input.GameI.controller != GameController_Invalid )
_input.GameI.controller = GAME_CONTROLLER_1;
if( _input.pn != PLAYER_INVALID )
_input.pn = PLAYER_1;
ScreenGameplay::Input( _input );
}
void ScreenGameplaySyncMachine::HandleScreenMessage( const ScreenMessage SM )
{
if( SM == SM_NotesEnded )
{
ResetAndRestartCurrentSong();
return; // handled
}
ScreenGameplayNormal::HandleScreenMessage( SM );
if( SM == SM_GoToPrevScreen || SM == SM_GoToNextScreen )
{
GAMESTATE->m_PlayMode.Set( PlayMode_Invalid );
GAMESTATE->SetCurrentStyle( NULL );
GAMESTATE->m_pCurSong.Set( NULL );
}
}
void ScreenGameplaySyncMachine::ResetAndRestartCurrentSong()
{
m_pSoundMusic->Stop();
ReloadCurrentSong();
StartPlayingSong( 4, 0 );
// reset autosync
AdjustSync::ResetAutosync();
}
static LocalizedString OLD_OFFSET ( "ScreenGameplaySyncMachine", "Old offset" );
static LocalizedString NEW_OFFSET ( "ScreenGameplaySyncMachine", "New offset" );
static LocalizedString COLLECTING_SAMPLE( "ScreenGameplaySyncMachine", "Collecting sample" );
static LocalizedString STANDARD_DEVIATION( "ScreenGameplaySyncMachine", "Standard deviation" );
void ScreenGameplaySyncMachine::RefreshText()
{
float fNew = PREFSMAN->m_fGlobalOffsetSeconds;
float fOld = AdjustSync::s_fGlobalOffsetSecondsOriginal;
float fStdDev = AdjustSync::s_fStandardDeviation;
RString s;
s += OLD_OFFSET.GetValue() + ssprintf( ": %0.3f\n", fOld );
s += NEW_OFFSET.GetValue() + ssprintf( ": %0.3f\n", fNew );
s += STANDARD_DEVIATION.GetValue() + ssprintf( ": %0.3f\n", fStdDev );
s += COLLECTING_SAMPLE.GetValue() + ssprintf( ": %d / %d", AdjustSync::s_iAutosyncOffsetSample+1, AdjustSync::OFFSET_SAMPLE_COUNT );
m_textSyncInfo.SetText( s );
}
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-56
View File
@@ -1,56 +0,0 @@
/* ScreenGameplaySyncMachine - */
#ifndef ScreenGameplaySyncMachine_H
#define ScreenGameplaySyncMachine_H
#include "ScreenGameplayNormal.h"
#include "Song.h"
class ScreenGameplaySyncMachine : public ScreenGameplayNormal
{
public:
virtual void Init();
virtual void Update( float fDelta );
virtual void Input( const InputEventPlus &input );
virtual ScreenType GetScreenType() const { return system_menu; }
void HandleScreenMessage( const ScreenMessage SM );
void ResetAndRestartCurrentSong();
protected:
virtual bool UseSongBackgroundAndForeground() const { return false; }
void RefreshText();
Song m_Song;
const Steps *m_pSteps;
BitmapText m_textSyncInfo;
};
#endif
/*
* (c) 2001-2004 Chris Danford
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, and/or sell copies of the Software, and to permit persons to
* whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+27 -1
View File
@@ -9,6 +9,7 @@
#include "InputEventPlus.h" #include "InputEventPlus.h"
#include "LocalizedString.h" #include "LocalizedString.h"
#include "AdjustSync.h" #include "AdjustSync.h"
#include "ActorUtil.h"
static bool IsGameplay() static bool IsGameplay()
{ {
@@ -60,6 +61,11 @@ void ScreenSyncOverlay::Init()
m_textStatus.SetShadowLength( 2 ); m_textStatus.SetShadowLength( 2 );
this->AddChild( &m_textStatus ); this->AddChild( &m_textStatus );
m_textSyncInfo.SetName( "SyncInfo" );
m_textSyncInfo.LoadFromFont( THEME->GetPathF("Common","normal") );
ActorUtil::LoadAllCommands( m_textSyncInfo, m_sName );
this->AddChild( &m_textSyncInfo );
Update( 0 ); Update( 0 );
} }
@@ -74,7 +80,6 @@ void ScreenSyncOverlay::Update( float fDeltaTime )
Screen::Update(fDeltaTime); Screen::Update(fDeltaTime);
// TODO: Only update when changed.
UpdateText(); UpdateText();
} }
@@ -85,8 +90,15 @@ static LocalizedString AUTO_PLAY_CPU ( "ScreenSyncOverlay", "AutoPlayCPU" );
static LocalizedString AUTO_SYNC_SONG ( "ScreenSyncOverlay", "AutoSync Song" ); static LocalizedString AUTO_SYNC_SONG ( "ScreenSyncOverlay", "AutoSync Song" );
static LocalizedString AUTO_SYNC_MACHINE ( "ScreenSyncOverlay", "AutoSync Machine" ); static LocalizedString AUTO_SYNC_MACHINE ( "ScreenSyncOverlay", "AutoSync Machine" );
static LocalizedString AUTO_SYNC_TEMPO ( "ScreenSyncOverlay", "AutoSync Tempo" ); static LocalizedString AUTO_SYNC_TEMPO ( "ScreenSyncOverlay", "AutoSync Tempo" );
static LocalizedString OLD_OFFSET ( "ScreenSyncOverlay", "Old offset" );
static LocalizedString NEW_OFFSET ( "ScreenSyncOverlay", "New offset" );
static LocalizedString COLLECTING_SAMPLE( "ScreenSyncOverlay", "Collecting sample" );
static LocalizedString STANDARD_DEVIATION( "ScreenSyncOverlay", "Standard deviation" );
void ScreenSyncOverlay::UpdateText() void ScreenSyncOverlay::UpdateText()
{ {
//
// Update Status
//
vector<RString> vs; vector<RString> vs;
if( g_bShowAutoPlayStatus ) if( g_bShowAutoPlayStatus )
@@ -116,6 +128,20 @@ void ScreenSyncOverlay::UpdateText()
} }
m_textStatus.SetText( join("\n",vs) ); m_textStatus.SetText( join("\n",vs) );
//
// Update SyncInfo
//
float fNew = PREFSMAN->m_fGlobalOffsetSeconds;
float fOld = AdjustSync::s_fGlobalOffsetSecondsOriginal;
float fStdDev = AdjustSync::s_fStandardDeviation;
RString s;
s += OLD_OFFSET.GetValue() + ssprintf( ": %0.3f\n", fOld );
s += NEW_OFFSET.GetValue() + ssprintf( ": %0.3f\n", fNew );
s += STANDARD_DEVIATION.GetValue() + ssprintf( ": %0.3f\n", fStdDev );
s += COLLECTING_SAMPLE.GetValue() + ssprintf( ": %d / %d", AdjustSync::s_iAutosyncOffsetSample+1, AdjustSync::OFFSET_SAMPLE_COUNT );
m_textSyncInfo.SetText( s );
} }
static LocalizedString CANT_SYNC_WHILE_PLAYING_A_COURSE ("ScreenSyncOverlay","Can't sync while playing a course."); static LocalizedString CANT_SYNC_WHILE_PLAYING_A_COURSE ("ScreenSyncOverlay","Can't sync while playing a course.");
+1
View File
@@ -24,6 +24,7 @@ private:
Quad m_quad; Quad m_quad;
BitmapText m_textHelp; BitmapText m_textHelp;
BitmapText m_textStatus; BitmapText m_textStatus;
BitmapText m_textSyncInfo;
}; };
-6
View File
@@ -352,12 +352,6 @@ cl /Zl /nologo /c verstub.cpp /Fo&quot;$(IntDir)&quot;\
<File <File
RelativePath=".\ScreenGameplayNormal.h"> RelativePath=".\ScreenGameplayNormal.h">
</File> </File>
<File
RelativePath=".\ScreenGameplaySyncMachine.cpp">
</File>
<File
RelativePath=".\ScreenGameplaySyncMachine.h">
</File>
<File <File
RelativePath="ScreenHowToPlay.cpp"> RelativePath="ScreenHowToPlay.cpp">
</File> </File>