ScreenOptionsMasterPrefs.h
Go to the documentation of this file.00001
#ifndef SCREEN_OPTIONS_MASTER_PREFS_H
00002
#define SCREEN_OPTIONS_MASTER_PREFS_H
00003
00004 static const int MAX_OPTIONS=16;
00005 #define OPT_SAVE_PREFERENCES (1<<0)
00006 #define OPT_APPLY_GRAPHICS (1<<1)
00007 #define OPT_APPLY_THEME (1<<2)
00008 #define OPT_RESET_GAME (1<<3)
00009 #define OPT_APPLY_SOUND (1<<4)
00010 #define OPT_APPLY_SONG (1<<5)
00011 #define OPT_APPLY_ASPECT_RATIO (1<<6)
00012
00013 struct ConfOption
00014 {
00015
static ConfOption *
Find(
CString name );
00016
00017
00018
00019 CString name;
00020 typedef void (*MoveData_t)(
int &sel,
bool ToSel,
const ConfOption *pConfOption );
00021 MoveData_t MoveData;
00022 int m_iEffects;
00023
00024
00025
00026
void UpdateAvailableOptions();
00027
00028
00029
00030
void MakeOptionsList( CStringArray &out )
const;
00031
00032 inline int Get()
const {
int sel;
MoveData( sel,
true,
this );
return sel; }
00033 inline void Put(
int sel )
const {
MoveData( sel,
false,
this ); }
00034
int GetEffects() const;
00035
00036 ConfOption( const
char *n, MoveData_t m,
00037 const
char *c0=NULL, const
char *c1=NULL, const
char *c2=NULL, const
char *c3=NULL, const
char *c4=NULL, const
char *c5=NULL, const
char *c6=NULL, const
char *c7=NULL, const
char *c8=NULL, const
char *c9=NULL, const
char *c10=NULL, const
char *c11=NULL, const
char *c12=NULL, const
char *c13=NULL, const
char *c14=NULL, const
char *c15=NULL, const
char *c16=NULL, const
char *c17=NULL, const
char *c18=NULL, const
char *c19=NULL )
00038 {
00039
name = n;
00040
MoveData = m;
00041
MakeOptionsListCB = NULL;
00042
m_iEffects = 0;
00043
#define PUSH( c ) if(c) names.push_back(c);
00044
PUSH(c0);
PUSH(c1);
PUSH(c2);
PUSH(c3);
PUSH(c4);
PUSH(c5);
PUSH(c6);
PUSH(c7);
PUSH(c8);
PUSH(c9);
PUSH(c10);
PUSH(c11);
PUSH(c12);
PUSH(c13);
PUSH(c14);
PUSH(c15);
PUSH(c16);
PUSH(c17);
PUSH(c18);
PUSH(c19);
00045
#undef PUSH
00046
}
00047
00048 ConfOption(
const char *n, MoveData_t m,
00049
void (*lst)( CStringArray &out ) )
00050 {
00051
name = n;
00052
MoveData = m;
00053
MakeOptionsListCB = lst;
00054
m_iEffects = 0;
00055 }
00056
00057
00058
private:
00059 vector<CString>
names;
00060
void (*MakeOptionsListCB)(
CStringArray &out );
00061 };
00062
00063
00064
00065
void LifeDifficulty(
int &sel,
bool ToSel,
const ConfOption *pConfOption );
00066
00067
00068
#endif
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
Generated on Thu Jan 27 20:57:32 2005 for StepMania by
1.3.7