From 049a1bc5bc1ea9178d70aa237369920e6431d329 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 6 Jun 2003 21:58:40 +0000 Subject: [PATCH] remove ScreenAutoGraphicDetail (in favor of specific presets for each card) --- stepmania/src/Screen.cpp | 2 - stepmania/src/ScreenAutoGraphicDetail.cpp | 161 ---------------------- stepmania/src/ScreenAutoGraphicDetail.h | 35 ----- stepmania/src/ScreenOptionsMenu.cpp | 3 - stepmania/src/StepMania.cpp | 5 +- stepmania/src/StepMania.dsp | 47 ++----- stepmania/src/StepMania.vcproj | 6 - 7 files changed, 16 insertions(+), 243 deletions(-) delete mode 100644 stepmania/src/ScreenAutoGraphicDetail.cpp delete mode 100644 stepmania/src/ScreenAutoGraphicDetail.h diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 251867b749..dfbb692cf1 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -294,7 +294,6 @@ void Screen::ClearMessageQueue( const ScreenMessage SM ) #include "ScreenRaveOptions.h" #include "ScreenSelectMode.h" #include "ScreenBackgroundOptions.h" -#include "ScreenAutoGraphicDetail.h" Screen* Screen::Create( CString sClassName ) { @@ -360,7 +359,6 @@ Screen* Screen::Create( CString sClassName ) IF_RETURN( ScreenSelectCharacter ); IF_RETURN( ScreenRaveOptions ); IF_RETURN( ScreenBackgroundOptions ); - IF_RETURN( ScreenAutoGraphicDetail ); RageException::Throw( "Invalid Screen class name '%s'", sClassName.c_str() ); } diff --git a/stepmania/src/ScreenAutoGraphicDetail.cpp b/stepmania/src/ScreenAutoGraphicDetail.cpp deleted file mode 100644 index 323d815081..0000000000 --- a/stepmania/src/ScreenAutoGraphicDetail.cpp +++ /dev/null @@ -1,161 +0,0 @@ -#include "global.h" -/* ------------------------------------------------------------------------------ - Class: ScreenAutoGraphicDetail - - Desc: See header. - - Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. - Chris Danford ------------------------------------------------------------------------------ -*/ - -#include "ScreenAutoGraphicDetail.h" -#include "ThemeManager.h" -#include "GameState.h" -#include "GameDef.h" -#include "RageLog.h" -#include "SongManager.h" -#include "NoteFieldPositioning.h" -#include "GameManager.h" -#include "PrefsManager.h" -#include "StepMania.h" -#include "ScreenManager.h" -#include "RageTimer.h" -#include "RageDisplay.h" - -#define SONG_BPM THEME->GetMetricF("ScreenAutoGraphicDetail","SongBPM") -#define SECONDS_TO_SHOW THEME->GetMetricF("ScreenAutoGraphicDetail","SecondsToShow") - -enum Detail { low, medium, high, NUM_DETAIL_SETTINGS }; -struct DetailSettings -{ - int width, height, displaybpp, texturebpp; -}; - -/* XXX: It'd be nice to set 800x600 or 1024x768 (instead of increasing the framebuffer - * bit depth), and to increase the refresh rate to 70 or so; it makes a huge difference, - * and many people I see playing games play them at the default resolution and refresh, - * never changing anything. - * - * However, on some systems the change will succeed but the monitor won't actually - * be able to handle it. Should we do the "press a key in 15 seconds" deal like - * Windows does? */ -const DetailSettings g_DetailSettings[NUM_DETAIL_SETTINGS] = { - { 320, 240, 16, 16 }, - { 640, 480, 16, 16 }, - { 640, 480, 32, 32 }, -}; - -void ApplyDetailSetting( Detail detail ) -{ - PREFSMAN->m_bVsync = false; // TODO: preserve vsync pref - PREFSMAN->m_iDisplayWidth = g_DetailSettings[detail].width; - PREFSMAN->m_iDisplayHeight = g_DetailSettings[detail].height; - PREFSMAN->m_iDisplayColorDepth = g_DetailSettings[detail].displaybpp; - PREFSMAN->m_iTextureColorDepth = g_DetailSettings[detail].texturebpp; - - ApplyGraphicOptions(); -} - -ScreenAutoGraphicDetail::ScreenAutoGraphicDetail() : Screen("ScreenAutoGraphicDetail") -{ - ApplyDetailSetting( medium ); - - m_Background.LoadFromAniDir( THEME->GetPathToB("ScreenAutoGraphicDetail background") ); - this->AddChild( &m_Background ); - - GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS; - NotesType nt = GAMESTATE->GetCurrentStyleDef()->m_NotesType; - int iNumOfTracks = GAMEMAN->NotesTypeToNumTracks( nt ); - - ASSERT(iNumOfTracks > 0); // crazy to have less than 1 track.... - - NoteData* pND = new NoteData; - pND->SetNumTracks( iNumOfTracks ); - - float fSongBPM = SONG_BPM; - float fSongBPS = fSongBPM / 60.f; - int iBeatsToPlay = int(fSongBPS * SECONDS_TO_SHOW); - - for( int i=0; iAddHoldNote( HoldNote(iTrack, fBeat, fBeat+1) ); - else - { - pND->SetTapNote( iTrack, BeatToNoteRow(fBeat), TAP_TAP ); - pND->SetTapNote( iTrack, BeatToNoteRow(fBeat+0.5f), TAP_TAP ); - } - } - - m_pSong = new Song; - m_pSong->AddBPMSegment( BPMSegment(0,fSongBPM) ); - - GAMESTATE->m_pCurSong = m_pSong; - GAMESTATE->m_bPastHereWeGo = true; - - for( int p=0; pIsPlayerEnabled(p) ) - continue; // skip - - GAMESTATE->m_PlayerController[p] = PC_AUTOPLAY; - m_Player[p].Load( (PlayerNumber)p, pND, NULL, NULL, NULL, NULL ); - m_Player[p].SetX( (float) GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p] ); - this->AddChild( &m_Player[p] ); - } - - delete pND; - - - m_Overlay.LoadFromAniDir( THEME->GetPathToB("ScreenAutoGraphicDetail overlay") ); - this->AddChild( &m_Overlay ); - - m_textMessage.LoadFromFont( THEME->GetPathToF("Common normal") ); - m_textMessage.SetXY( CENTER_X, CENTER_Y ); - this->AddChild( &m_textMessage ); - - m_fFakeSecondsIntoSong = 0; - this->ClearMessageQueue(); - this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); -} - -ScreenAutoGraphicDetail::~ScreenAutoGraphicDetail() -{ - delete m_pSong; -} - -void ScreenAutoGraphicDetail::Update( float fDelta ) -{ - m_fFakeSecondsIntoSong += fDelta; - GAMESTATE->UpdateSongPosition( m_fFakeSecondsIntoSong ); - - int iThisSecond = (int)RageTimer::GetTimeSinceStart(); - int iLastSecond = (int)(RageTimer::GetTimeSinceStart()-fDelta); - if( iThisSecond != iLastSecond ) - m_textMessage.SetText( ssprintf("Analyzing peformance... (FPS: %d)", DISPLAY->GetCumFPS()) ); - - Screen::Update( fDelta ); -} - -void ScreenAutoGraphicDetail::HandleScreenMessage( const ScreenMessage SM ) -{ - switch( SM ) - { - case SM_BeginFadingOut: - int cumFPS = DISPLAY->GetCumFPS(); - if( cumFPS > 120 ) - ApplyDetailSetting( high ); - else if( cumFPS < 60 ) - ApplyDetailSetting( low ); - else - ApplyDetailSetting( medium ); - GAMESTATE->m_pCurSong = NULL; - SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") ); - break; - } -} diff --git a/stepmania/src/ScreenAutoGraphicDetail.h b/stepmania/src/ScreenAutoGraphicDetail.h deleted file mode 100644 index 39240edc6c..0000000000 --- a/stepmania/src/ScreenAutoGraphicDetail.h +++ /dev/null @@ -1,35 +0,0 @@ -/* ------------------------------------------------------------------------------ - Class: ScreenAutoGraphicDetail - - Desc: Base class for all attraction screens. - - Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. - Chris Danford ------------------------------------------------------------------------------ -*/ - -#include "Screen.h" -#include "Player.h" - -class ScreenAutoGraphicDetail : public Screen -{ -public: - ScreenAutoGraphicDetail(); - ~ScreenAutoGraphicDetail(); - - virtual void Update( float fDelta ); - virtual void HandleScreenMessage( const ScreenMessage SM ); - -protected: - BGAnimation m_Background; - Player m_Player[NUM_PLAYERS]; - BGAnimation m_Overlay; - BitmapText m_textMessage; - - Song* m_pSong; - float m_fFakeSecondsIntoSong; -}; - - - diff --git a/stepmania/src/ScreenOptionsMenu.cpp b/stepmania/src/ScreenOptionsMenu.cpp index eb2d5841f2..49b491fca3 100644 --- a/stepmania/src/ScreenOptionsMenu.cpp +++ b/stepmania/src/ScreenOptionsMenu.cpp @@ -27,7 +27,6 @@ enum { OM_APPEARANCE, - OM_AUTO_GRAPHIC, OM_AUTOGEN, OM_BACKGROUND, OM_CONFIG_KEY_JOY, @@ -41,7 +40,6 @@ enum { OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = { OptionRow( "", "Appearance Options" ), - OptionRow( "", "Auto Adjust Graphic Detail" ), OptionRow( "", "Autogen Options" ), OptionRow( "", "Background Options" ), OptionRow( "", "Config Key/Joy Mappings" ), @@ -97,7 +95,6 @@ void ScreenOptionsMenu::GoToNextState() switch( this->GetCurrentRow() ) { case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break; - case OM_AUTO_GRAPHIC: SCREENMAN->SetNewScreen("ScreenAutoGraphicDetail"); break; case OM_AUTOGEN: SCREENMAN->SetNewScreen("ScreenAutogenOptions"); break; case OM_BACKGROUND: SCREENMAN->SetNewScreen("ScreenBackgroundOptions"); break; case OM_CONFIG_KEY_JOY: SCREENMAN->SetNewScreen("ScreenMapControllers"); break; diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index f92f58096b..3cacfbb0cd 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -160,10 +160,7 @@ void ResetGame() } PREFSMAN->SaveGamePrefsToDisk(); - if( PREFSMAN->m_bFirstRun ) - SCREENMAN->SetNewScreen( "ScreenAutoGraphicDetail" ); - else - SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") ); + SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") ); PREFSMAN->m_bFirstRun = false; if( PREFSMAN->m_bAutoMapJoysticks ) diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 59567a2486..968187936f 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -64,7 +64,7 @@ IntDir=.\../Debug6 TargetDir=\stepmania\stepmania TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -82,25 +82,25 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania # PROP Intermediate_Dir "StepMania___Xbox_Debug___VC6" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" -XBCP=xbecopy.exe -# ADD BASE XBCP /NOLOGO -# ADD XBCP /NOLOGO -XBE=imagebld.exe -# ADD BASE XBE /nologo /stack:0x10000 /debug -# ADD XBE /nologo /stack:0x10000 /debug +CPP=cl.exe +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe" # SUBTRACT BASE LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # ADD LINK32 $(intdir)\verstub.obj kernel32.lib shell32.lib user32.lib gdi32.lib advapi32.lib winmm.lib /nologo /pdb:"../debug6/StepMania-debug.pdb" /map /debug /machine:IX86 /nodefaultlib:"libcmtd.lib" /out:"../StepMania-debug.exe" # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -CPP=cl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "." /I "SDL-1.2.5\include" /I "SDL_image-1.2" /I "plib-1.6.0" /D "WIN32" /D "_XBOX" /D "_DEBUG" /Fr /YX"global.h" /FD /c +XBE=imagebld.exe +# ADD BASE XBE /nologo /stack:0x10000 /debug +# ADD XBE /nologo /stack:0x10000 /debug +XBCP=xbecopy.exe +# ADD BASE XBCP /NOLOGO +# ADD XBCP /NOLOGO # Begin Special Build Tool -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -140,7 +140,7 @@ IntDir=.\../Release6 TargetDir=\stepmania\stepmania TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -3236,23 +3236,6 @@ SOURCE=.\ScreenAutogenOptions.h # End Source File # Begin Source File -SOURCE=.\ScreenAutoGraphicDetail.cpp - -!IF "$(CFG)" == "StepMania - Win32 Debug" - -!ELSEIF "$(CFG)" == "StepMania - Xbox Debug" - -!ELSEIF "$(CFG)" == "StepMania - Win32 Release" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\ScreenAutoGraphicDetail.h -# End Source File -# Begin Source File - SOURCE=.\ScreenBackgroundOptions.cpp !IF "$(CFG)" == "StepMania - Win32 Debug" diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index 59e31f4ac9..ec49321002 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -187,12 +187,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ - - - -