remove ScreenAutoGraphicDetail (in favor of specific presets for each card)
This commit is contained in:
@@ -294,7 +294,6 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
|||||||
#include "ScreenRaveOptions.h"
|
#include "ScreenRaveOptions.h"
|
||||||
#include "ScreenSelectMode.h"
|
#include "ScreenSelectMode.h"
|
||||||
#include "ScreenBackgroundOptions.h"
|
#include "ScreenBackgroundOptions.h"
|
||||||
#include "ScreenAutoGraphicDetail.h"
|
|
||||||
|
|
||||||
Screen* Screen::Create( CString sClassName )
|
Screen* Screen::Create( CString sClassName )
|
||||||
{
|
{
|
||||||
@@ -360,7 +359,6 @@ Screen* Screen::Create( CString sClassName )
|
|||||||
IF_RETURN( ScreenSelectCharacter );
|
IF_RETURN( ScreenSelectCharacter );
|
||||||
IF_RETURN( ScreenRaveOptions );
|
IF_RETURN( ScreenRaveOptions );
|
||||||
IF_RETURN( ScreenBackgroundOptions );
|
IF_RETURN( ScreenBackgroundOptions );
|
||||||
IF_RETURN( ScreenAutoGraphicDetail );
|
|
||||||
|
|
||||||
RageException::Throw( "Invalid Screen class name '%s'", sClassName.c_str() );
|
RageException::Throw( "Invalid Screen class name '%s'", sClassName.c_str() );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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; i<iBeatsToPlay; i++ )
|
|
||||||
{
|
|
||||||
float fBeat = float(i)+2;
|
|
||||||
int iTrack = i % iNumOfTracks;
|
|
||||||
bool bIsHold = ((i / iNumOfTracks) % 2) == 1;
|
|
||||||
if( bIsHold )
|
|
||||||
pND->AddHoldNote( 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; p<NUM_PLAYERS; p++ )
|
|
||||||
{
|
|
||||||
if( !GAMESTATE->IsPlayerEnabled(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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
OM_APPEARANCE,
|
OM_APPEARANCE,
|
||||||
OM_AUTO_GRAPHIC,
|
|
||||||
OM_AUTOGEN,
|
OM_AUTOGEN,
|
||||||
OM_BACKGROUND,
|
OM_BACKGROUND,
|
||||||
OM_CONFIG_KEY_JOY,
|
OM_CONFIG_KEY_JOY,
|
||||||
@@ -41,7 +40,6 @@ enum {
|
|||||||
|
|
||||||
OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = {
|
OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = {
|
||||||
OptionRow( "", "Appearance Options" ),
|
OptionRow( "", "Appearance Options" ),
|
||||||
OptionRow( "", "Auto Adjust Graphic Detail" ),
|
|
||||||
OptionRow( "", "Autogen Options" ),
|
OptionRow( "", "Autogen Options" ),
|
||||||
OptionRow( "", "Background Options" ),
|
OptionRow( "", "Background Options" ),
|
||||||
OptionRow( "", "Config Key/Joy Mappings" ),
|
OptionRow( "", "Config Key/Joy Mappings" ),
|
||||||
@@ -97,7 +95,6 @@ void ScreenOptionsMenu::GoToNextState()
|
|||||||
switch( this->GetCurrentRow() )
|
switch( this->GetCurrentRow() )
|
||||||
{
|
{
|
||||||
case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break;
|
case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break;
|
||||||
case OM_AUTO_GRAPHIC: SCREENMAN->SetNewScreen("ScreenAutoGraphicDetail"); break;
|
|
||||||
case OM_AUTOGEN: SCREENMAN->SetNewScreen("ScreenAutogenOptions"); break;
|
case OM_AUTOGEN: SCREENMAN->SetNewScreen("ScreenAutogenOptions"); break;
|
||||||
case OM_BACKGROUND: SCREENMAN->SetNewScreen("ScreenBackgroundOptions"); break;
|
case OM_BACKGROUND: SCREENMAN->SetNewScreen("ScreenBackgroundOptions"); break;
|
||||||
case OM_CONFIG_KEY_JOY: SCREENMAN->SetNewScreen("ScreenMapControllers"); break;
|
case OM_CONFIG_KEY_JOY: SCREENMAN->SetNewScreen("ScreenMapControllers"); break;
|
||||||
|
|||||||
@@ -160,9 +160,6 @@ void ResetGame()
|
|||||||
}
|
}
|
||||||
PREFSMAN->SaveGamePrefsToDisk();
|
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;
|
PREFSMAN->m_bFirstRun = false;
|
||||||
|
|
||||||
|
|||||||
+12
-29
@@ -82,23 +82,23 @@ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania
|
|||||||
# PROP Intermediate_Dir "StepMania___Xbox_Debug___VC6"
|
# PROP Intermediate_Dir "StepMania___Xbox_Debug___VC6"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
XBCP=xbecopy.exe
|
CPP=cl.exe
|
||||||
# ADD BASE XBCP /NOLOGO
|
# 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 XBCP /NOLOGO
|
# 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
|
BSC32=bscmake.exe
|
||||||
# ADD BASE XBE /nologo /stack:0x10000 /debug
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD XBE /nologo /stack:0x10000 /debug
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
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"
|
# 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
|
# 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"
|
# 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
|
# SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib
|
||||||
BSC32=bscmake.exe
|
XBE=imagebld.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE XBE /nologo /stack:0x10000 /debug
|
||||||
# ADD BSC32 /nologo
|
# ADD XBE /nologo /stack:0x10000 /debug
|
||||||
CPP=cl.exe
|
XBCP=xbecopy.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 BASE XBCP /NOLOGO
|
||||||
# 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
|
# ADD XBCP /NOLOGO
|
||||||
# Begin Special Build Tool
|
# 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
|
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
|
||||||
@@ -3236,23 +3236,6 @@ SOURCE=.\ScreenAutogenOptions.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin 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
|
SOURCE=.\ScreenBackgroundOptions.cpp
|
||||||
|
|
||||||
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
!IF "$(CFG)" == "StepMania - Win32 Debug"
|
||||||
|
|||||||
@@ -187,12 +187,6 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
|||||||
<File
|
<File
|
||||||
RelativePath="ScreenAttract.h">
|
RelativePath="ScreenAttract.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="ScreenAutoGraphicDetail.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="ScreenAutoGraphicDetail.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="ScreenAutogenOptions.cpp">
|
RelativePath="ScreenAutogenOptions.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
Reference in New Issue
Block a user