diff --git a/stepmania/src/ScreenAutogenOptions.cpp b/stepmania/src/ScreenAutogenOptions.cpp new file mode 100644 index 0000000000..ae6468b1bb --- /dev/null +++ b/stepmania/src/ScreenAutogenOptions.cpp @@ -0,0 +1,74 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: ScreenAutogenOptions + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScreenAutogenOptions.h" +#include "RageTextureManager.h" +#include "RageUtil.h" +#include "RageSoundManager.h" +#include "ScreenManager.h" +#include "PrefsManager.h" +#include "GameConstantsAndTypes.h" +#include "StepMania.h" +#include "PrefsManager.h" +#include "RageLog.h" +#include "ThemeManager.h" + + +enum { + AO_AUTOGEN_MISSING_TYPES, + AO_AUTOGEN_GROUP_COURSES, + NUM_AUTOGEN_OPTIONS_LINES +}; + +OptionRow g_AutogenOptionsLines[NUM_AUTOGEN_OPTIONS_LINES] = { + OptionRow( "Autogen\nMissing Types", "OFF","ON" ), + OptionRow( "Autogen\nGroup Courses", "OFF","ON" ), +}; + +ScreenAutogenOptions::ScreenAutogenOptions() : + ScreenOptions("ScreenAutogenOptions",false) +{ + LOG->Trace( "ScreenAutogenOptions::ScreenAutogenOptions()" ); + + Init( + INPUTMODE_BOTH, + g_AutogenOptionsLines, + NUM_AUTOGEN_OPTIONS_LINES, + false, true ); + m_Menu.m_MenuTimer.Disable(); + + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenAutogenOptions music") ); +} + +void ScreenAutogenOptions::ImportOptions() +{ + m_iSelectedOption[0][AO_AUTOGEN_MISSING_TYPES] = PREFSMAN->m_bAutogenMissingTypes ? 1:0; + m_iSelectedOption[0][AO_AUTOGEN_GROUP_COURSES] = PREFSMAN->m_bAutogenGroupCourses ? 1 : 0; +} + +void ScreenAutogenOptions::ExportOptions() +{ + PREFSMAN->m_bAutogenMissingTypes = m_iSelectedOption[0][AO_AUTOGEN_MISSING_TYPES] == 1; + PREFSMAN->m_bAutogenGroupCourses = m_iSelectedOption[0][AO_AUTOGEN_GROUP_COURSES] == 1; +} + +void ScreenAutogenOptions::GoToPrevState() +{ + SCREENMAN->SetNewScreen( "ScreenOptionsMenu" ); +} + +void ScreenAutogenOptions::GoToNextState() +{ + PREFSMAN->SaveGlobalPrefsToDisk(); + GoToPrevState(); +} + diff --git a/stepmania/src/ScreenAutogenOptions.h b/stepmania/src/ScreenAutogenOptions.h new file mode 100644 index 0000000000..168785955e --- /dev/null +++ b/stepmania/src/ScreenAutogenOptions.h @@ -0,0 +1,29 @@ +#ifndef ScreenAutogenOptions_H +#define ScreenAutogenOptions_H +/* +----------------------------------------------------------------------------- + File: ScreenAutogenOptions + + Desc: Select a song. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScreenOptions.h" + +class ScreenAutogenOptions : public ScreenOptions +{ +public: + ScreenAutogenOptions(); + +private: + void ImportOptions(); + void ExportOptions(); + + void GoToNextState(); + void GoToPrevState(); +}; + +#endif diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 4230130a88..14626efc6b 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -1,5 +1,5 @@ # Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# Microsoft Developer Studio Generated Build File, Format Version 60000 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Application" 0x0101 @@ -60,7 +60,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 @@ -95,7 +95,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 @@ -1484,6 +1484,14 @@ SOURCE=.\ScreenAttract.h # End Source File # Begin Source File +SOURCE=.\ScreenAutogenOptions.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenAutogenOptions.h +# End Source File +# Begin Source File + SOURCE=.\ScreenCaution.cpp # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index 66e6a27ab0..349d2d2022 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -187,6 +187,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ + + + +