From ee0f54a4cad4116fb4ddbab9b563868692210914 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Thu, 28 Jan 2010 20:48:37 -0600 Subject: [PATCH] cleanup --- src/ScreenDimensions.cpp | 9 ++++----- src/ScreenSelectMusic.cpp | 26 ------------------------- src/StepMania.cpp | 40 +++++++++++++++------------------------ 3 files changed, 19 insertions(+), 56 deletions(-) diff --git a/src/ScreenDimensions.cpp b/src/ScreenDimensions.cpp index 86dd396de4..746849406f 100644 --- a/src/ScreenDimensions.cpp +++ b/src/ScreenDimensions.cpp @@ -8,11 +8,10 @@ static ThemeMetric THEME_SCREEN_WIDTH("Common","ScreenWidth"); static ThemeMetric THEME_SCREEN_HEIGHT("Common","ScreenHeight"); -// -// The theme's logical resolution specifies the minimum screen width -// and the minimum screen height with a 4:3 aspect ratio. Scale just one -// of the dimensions up to meet the requested aspect ratio. -// +/* The theme's logical resolution specifies the minimum screen width and + * the minimum screen height with a 4:3 aspect ratio. Scale just one + * of the dimensions up to meet the requested aspect ratio. + */ /* * The theme resolution isn't necessarily 4:3; a natively widescreen diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index e283772b85..26f75c805f 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -385,32 +385,6 @@ void ScreenSelectMusic::Input( const InputEventPlus &input ) } } - // saturn2888 likes to make me pollute my source code with shit that only - // he will use -#if defined(SAT2888) - if( INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT)) - || INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT)) ) - { - switch( input.DeviceI.button ) - { - case KEY_SPACE: - // clear all mods for all players - FOREACH_HumanPlayer( pn ) - { - /* - GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.Init(); - GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.FromString( PREFSMAN->m_sDefaultModifiers ); - */ - GAMESTATE->m_pPlayerState[pn]->ResetToDefaultPlayerOptions( ModsLevel_Preferred ); - } - m_soundOptionsChange.Play(); - MESSAGEMAN->Broadcast("PlayerOptionsChanged"); - break; - } - } -#endif - // and for that saturn2888 is a nignog - // debugging? // I just like being able to see untransliterated titles occasionally. if( input.DeviceI.device == DEVICE_KEYBOARD && input.DeviceI.button == KEY_F9 ) diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 4339d7405c..e8308abf85 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -105,13 +105,12 @@ void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut ) * -Chris */ int iWidth = PREFSMAN->m_iDisplayWidth; - // SAT2888 but could also be useful disabled - /* if( PREFSMAN->m_bWindowed ) { - iWidth = PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio; + float fRatio = PREFSMAN->m_iDisplayWidth / PREFSMAN->m_iDisplayHeight; + //iWidth = PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio; + iWidth = PREFSMAN->m_iDisplayHeight * fRatio; } - */ paramsOut = VideoModeParams( PREFSMAN->m_bWindowed, @@ -295,11 +294,6 @@ void StepMania::ResetPreferences() * these may still be NULL. */ void ShutdownGame() { -#if defined(SAT2888) - LOG->Info("sm-ssc is Copyright ©2009,2010 the spinal shark collective, all rights reserved. Commercial use of this binary is prohibited by law and will be prosecuted to the fullest extent of the law."); - if(rand()%64 == 24) - LOG->Info("NAKET Coder isn't a fan of four panel footprint either, and would love to shit over your theme like you say NAKET Team shit over the options screen."); -#endif /* First, tell SOUNDMAN that we're shutting down. This signals sound drivers to * stop sounds, which we want to do before any threads that may have started sounds * are closed; this prevents annoying DirectSound glitches and delays. */ @@ -402,7 +396,7 @@ static void AdjustForChangedSystemCapabilities() LOG->Trace( "Memory changed from %i to %i; settings changed", g_iLastSeenMemory.Get(), Memory ); g_iLastSeenMemory.Set( Memory ); - // is this assumption outdated? + // is this assumption outdated? -aj /* Let's consider 128-meg systems low-memory, and 256-meg systems high-memory. * Cut off at 192. This is somewhat conservative; many 128-meg systems can * deal with higher memory profile settings, but some can't. @@ -816,7 +810,7 @@ static void SwitchToLastPlayedGame() /* If the active game type isn't actually available, revert to the default. */ if( pGame == NULL ) pGame = GAMEMAN->GetDefaultGame(); - + if( !GAMEMAN->IsGameEnabled( pGame ) && pGame != GAMEMAN->GetDefaultGame() ) { pGame = GAMEMAN->GetDefaultGame(); @@ -869,7 +863,7 @@ void StepMania::ChangeCurrentGame( const Game* g ) ANNOUNCER->SwitchAnnouncer( sAnnouncer ); THEME->SwitchThemeAndLanguage( sTheme, sLanguage, PREFSMAN->m_bPseudoLocalize ); - /* Set the input scheme for the new game, and load keymaps. */ + // Set the input scheme for the new game, and load keymaps. if( INPUTMAPPER ) { INPUTMAPPER->SetInputScheme( &g->m_InputScheme ); @@ -992,13 +986,13 @@ int main(int argc, char* argv[]) runmode = RunMode_DisplayVersion; - /* Set up arch hooks first. This may set up crash handling. */ + // Set up arch hooks first. This may set up crash handling. HOOKS = ArchHooks::Create(); HOOKS->Init(); LUA = new LuaManager; - /* Almost everything uses this to read and write files. Load this early. */ + // Almost everything uses this to read and write files. Load this early. FILEMAN = new RageFileManager( argv[0] ); FILEMAN->MountInitialFilesystems(); bool bPortable = DoesFileExist("Portable.ini"); @@ -1009,11 +1003,9 @@ int main(int argc, char* argv[]) /* Set this up next. Do this early, since it's needed for RageException::Throw. */ LOG = new RageLog; - /* Whew--we should be able to crash safely now! */ + // Whew--we should be able to crash safely now! - // // load preferences and mount any alternative trees. - // PREFSMAN = new PrefsManager; /* Allow HOOKS to check for multiple instances. We need to do this after PREFS is initialized, @@ -1034,7 +1026,7 @@ int main(int argc, char* argv[]) WriteLogHeader(); - /* Set up alternative filesystem trees. */ + // Set up alternative filesystem trees. if( PREFSMAN->m_sAdditionalFolders.Get() != "" ) { vector dirs; @@ -1064,17 +1056,15 @@ int main(int argc, char* argv[]) * Re-read preferences. */ PREFSMAN->ReadPrefsFromDisk(); ApplyLogPreferences(); - - /* This needs PREFSMAN. */ + + // This needs PREFSMAN. Dialog::Init(); - // // Create game objects - // GAMESTATE = new GameState; - /* This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow. */ + // This requires PREFSMAN, for PREFSMAN->m_bShowLoadingWindow. LoadingWindow *pLoadingWindow = NULL; switch( runmode ) { @@ -1087,8 +1077,8 @@ int main(int argc, char* argv[]) ; // no loading window for other RunModes } - srand( time(NULL) ); // seed number generator - + srand( time(NULL) ); // seed number generator + /* Do this early, so we have debugging output if anything else fails. LOG and * Dialog must be set up first. It shouldn't take long, but it might take a * little time; do this after the LoadingWindow is shown, since we don't want