Improve ScreenEdit compile times in g++ 3.3.
This commit is contained in:
@@ -52,13 +52,13 @@ enum CourseEntryMenuRow
|
||||
lives,
|
||||
};
|
||||
|
||||
Menu g_CourseOptionsMenu
|
||||
(
|
||||
"Course Options",
|
||||
MenuRow( "Repeat", true, 0, "NO","YES" ),
|
||||
MenuRow( "Randomize", true, 0, "NO","YES" ),
|
||||
MenuRow( "Lives", true, 4, "Use Bar Life","1","2","3","4","5","6","7","8","9","10" )
|
||||
);
|
||||
static const MenuRow g_CourseOptionsMenuItems[] =
|
||||
{
|
||||
{ "Repeat", true, 0, { "NO","YES" } },
|
||||
{ "Randomize", true, 0, { "NO","YES" } },
|
||||
{ "Lives", true, 4, { "Use Bar Life","1","2","3","4","5","6","7","8","9","10" } }
|
||||
};
|
||||
static Menu g_CourseOptionsMenu( "Course Options", g_CourseOptionsMenuItems );
|
||||
|
||||
enum CourseOptionsMenuRow
|
||||
{
|
||||
@@ -71,16 +71,16 @@ enum CourseOptionsMenuRow
|
||||
NUM_ENTRY_OPTIONS_MENU_ROWS
|
||||
};
|
||||
|
||||
Menu g_CourseEntryMenu
|
||||
(
|
||||
"Course Entry Options",
|
||||
MenuRow( "Song", true, 0 ),
|
||||
MenuRow( "Group", true, 0 ),
|
||||
MenuRow( "Difficulty", true, 0 ),
|
||||
MenuRow( "Low Meter", true, 0 ),
|
||||
MenuRow( "High Meter", true, 0 ),
|
||||
MenuRow( "Best/Worst value",true, 0 )
|
||||
);
|
||||
static const MenuRow g_CourseEntryMenuItems[] =
|
||||
{
|
||||
{ "Song", true, 0, { } },
|
||||
{ "Group", true, 0, { } },
|
||||
{ "Difficulty", true, 0, { } },
|
||||
{ "Low Meter", true, 0, { } },
|
||||
{ "High Meter", true, 0, { } },
|
||||
{ "Best/Worst value",true, 0, { } },
|
||||
};
|
||||
static Menu g_CourseEntryMenu( "Course Entry Options", g_CourseEntryMenuItems );
|
||||
|
||||
|
||||
const bool g_bRowEnabledForType[NUM_COURSE_ENTRY_TYPES][NUM_ENTRY_OPTIONS_MENU_ROWS] =
|
||||
|
||||
+100
-104
@@ -102,118 +102,114 @@ const CString HELP_TEXT =
|
||||
"F1:\n Show\n keyboard\n shortcuts\n";
|
||||
|
||||
|
||||
Menu g_KeyboardShortcuts
|
||||
(
|
||||
"Keyboard Shortcuts",
|
||||
MenuRow( "PgUp/PgDn: jump measure", false ),
|
||||
MenuRow( "Home/End: jump to first/last beat", false ),
|
||||
MenuRow( "Ctrl + Up/Down: Change zoom", false ),
|
||||
MenuRow( "Shift + Up/Down: Drag area marker", false ),
|
||||
MenuRow( "P: Play selection", false ),
|
||||
MenuRow( "Ctrl + P: Play whole song", false ),
|
||||
MenuRow( "Shift + P: Play current beat to end", false ),
|
||||
MenuRow( "Ctrl + R: Record", false ),
|
||||
MenuRow( "F4: Toggle assist tick", false ),
|
||||
MenuRow( "F5/F6: Next/prev steps of same StepsType", false ),
|
||||
MenuRow( "F7/F8: Decrease/increase BPM at cur beat", false ),
|
||||
MenuRow( "F9/F10: Decrease/increase stop at cur beat", false ),
|
||||
MenuRow( "F11/F12: Decrease/increase music offset", false ),
|
||||
static const MenuRow g_KeyboardShortcutsItems[] =
|
||||
{
|
||||
{ "PgUp/PgDn: jump measure", false, 0, { } },
|
||||
{ "Home/End: jump to first/last beat", false, 0, { } },
|
||||
{ "Ctrl + Up/Down: Change zoom", false, 0, { } },
|
||||
{ "Shift + Up/Down: Drag area marker", false, 0, { } },
|
||||
{ "P: Play selection", false, 0, { } },
|
||||
{ "Ctrl + P: Play whole song", false, 0, { } },
|
||||
{ "Shift + P: Play current beat to end", false, 0, { } },
|
||||
{ "Ctrl + R: Record", false, 0, { } },
|
||||
{ "F4: Toggle assist tick", false, 0, { } },
|
||||
{ "F5/F6: Next/prev steps of same StepsType", false, 0, { } },
|
||||
{ "F7/F8: Decrease/increase BPM at cur beat", false, 0, { } },
|
||||
{ "F9/F10: Decrease/increase stop at cur beat", false, 0, { } },
|
||||
{ "F11/F12: Decrease/increase music offset", false, 0, { } },
|
||||
/* XXX: This would be better as a single submenu, to let people tweak
|
||||
* and play the sample several times (without having to re-enter the
|
||||
* menu each time), so it doesn't use a whole bunch of hotkeys. */
|
||||
MenuRow( "[ and ]: Decrease/increase sample music start", false ),
|
||||
MenuRow( "{ and }: Decrease/increase sample music length", false ),
|
||||
MenuRow( "M: Play sample music", false ),
|
||||
MenuRow( "B: Add/Edit Background Change", false ),
|
||||
MenuRow( "Insert: Insert beat and shift down", false ),
|
||||
MenuRow( "Delete: Delete beat and shift up", false ),
|
||||
MenuRow( "Shift + number: Lay mine", false ),
|
||||
MenuRow( "Alt + number: Add to/remove from right half", false )
|
||||
);
|
||||
{ "[ and ]: Decrease/increase sample music start", false, 0, { } },
|
||||
{ "{ and }: Decrease/increase sample music length", false, 0, { } },
|
||||
{ "M: Play sample music", false, 0, { } },
|
||||
{ "B: Add/Edit Background Change", false, 0, { } },
|
||||
{ "Insert: Insert beat and shift down", false, 0, { } },
|
||||
{ "Delete: Delete beat and shift up", false, 0, { } },
|
||||
{ "Shift + number: Lay mine", false, 0, { } },
|
||||
{ "Alt + number: Add to/remove from right half", false, 0, { } }
|
||||
};
|
||||
static Menu g_KeyboardShortcuts( "Keyboard Shortcuts", g_KeyboardShortcutsItems );
|
||||
|
||||
Menu g_MainMenu
|
||||
(
|
||||
"Main Menu",
|
||||
MenuRow( "Edit Steps Statistics", true ),
|
||||
MenuRow( "Play Whole Song", true ),
|
||||
MenuRow( "Play Current Beat To End", true ),
|
||||
MenuRow( "Save", true ),
|
||||
MenuRow( "Player Options", true ),
|
||||
MenuRow( "Song Options", true ),
|
||||
MenuRow( "Edit Song Info", true ),
|
||||
MenuRow( "Add/Edit BG Change", true ),
|
||||
MenuRow( "Play preview music", true ),
|
||||
MenuRow( "Exit (discards changes since last save)",true )
|
||||
);
|
||||
static const MenuRow g_MainMenuItems[] =
|
||||
{
|
||||
{ "Edit Steps Statistics", true, 0, { } },
|
||||
{ "Play Whole Song", true, 0, { } },
|
||||
{ "Play Current Beat To End", true, 0, { } },
|
||||
{ "Save", true, 0, { } },
|
||||
{ "Player Options", true, 0, { } },
|
||||
{ "Song Options", true, 0, { } },
|
||||
{ "Edit Song Info", true, 0, { } },
|
||||
{ "Add/Edit BG Change", true, 0, { } },
|
||||
{ "Play preview music", true, 0, { } },
|
||||
{ "Exit (discards changes since last save)",true, 0, { } }
|
||||
};
|
||||
static Menu g_MainMenu( "Main Menu", g_MainMenuItems );
|
||||
|
||||
Menu g_AreaMenu
|
||||
(
|
||||
"Area Menu",
|
||||
MenuRow( "Cut", true ),
|
||||
MenuRow( "Copy", true ),
|
||||
MenuRow( "Paste at current beat", true ),
|
||||
MenuRow( "Paste at begin marker", true ),
|
||||
MenuRow( "Clear", true ),
|
||||
MenuRow( "Quantize", true, 0, "4TH","8TH","12TH","16TH","24TH","32ND","48TH","64TH" ),
|
||||
MenuRow( "Turn", true, 0, "Left","Right","Mirror","Shuffle","Super Shuffle" ),
|
||||
MenuRow( "Transform", true, 0, "NoHolds","NoMines","Little","Wide","Big","Quick","Skippy","Mines","Echo","Planted","Stomp","Twister" ),
|
||||
MenuRow( "Alter", true, 0, "Backwards","Swap Sides","Copy Left To Right","Copy Right To Left","Clear Left","Clear Right","Collapse To One","Shift Left","Shift Right" ),
|
||||
MenuRow( "Tempo", true, 0, "Compress 2x","Compress 3->2","Compress 4->3","Expand 3->4","Expand 2->3","Expand 2x" ),
|
||||
MenuRow( "Play selection", true ),
|
||||
MenuRow( "Record in selection", true ),
|
||||
MenuRow( "Insert beat and shift down", true ),
|
||||
MenuRow( "Delete beat and shift up", true ),
|
||||
MenuRow( "Convert beats to pause", true ),
|
||||
MenuRow( "Convert pause to beats", true )
|
||||
);
|
||||
static const MenuRow g_AreaMenuItems[] =
|
||||
{
|
||||
{ "Cut", true, 0, { } },
|
||||
{ "Copy", true, 0, { } },
|
||||
{ "Paste at current beat", true, 0, { } },
|
||||
{ "Paste at begin marker", true, 0, { } },
|
||||
{ "Clear", true, 0, { } },
|
||||
{ "Quantize", true, 0, { "4TH","8TH","12TH","16TH","24TH","32ND","48TH","64TH", 0 } },
|
||||
{ "Turn", true, 0, { "Left","Right","Mirror","Shuffle","Super Shuffle", 0 } },
|
||||
{ "Transform", true, 0, { "NoHolds","NoMines","Little","Wide","Big","Quick","Skippy","Mines","Echo","Planted","Stomp","Twister", 0 } },
|
||||
{ "Alter", true, 0, { "Backwards","Swap Sides","Copy Left To Right","Copy Right To Left","Clear Left","Clear Right","Collapse To One","Shift Left","Shift Right", 0 } },
|
||||
{ "Tempo", true, 0, { "Compress 2x","Compress 3->2","Compress 4->3","Expand 3->4","Expand 2->3","Expand 2x", 0 } },
|
||||
{ "Play selection", true, 0, { } },
|
||||
{ "Record in selection", true, 0, { } },
|
||||
{ "Insert beat and shift down", true, 0, { } },
|
||||
{ "Delete beat and shift up", true, 0, { } },
|
||||
{ "Convert beats to pause", true, 0, { } },
|
||||
{ "Convert pause to beats", true, 0, { } }
|
||||
};
|
||||
static Menu g_AreaMenu( "Area Menu", g_AreaMenuItems );
|
||||
|
||||
static const MenuRow g_EditNotesStatisticsItems[] =
|
||||
{
|
||||
{ "Difficulty", true, 0, { "BEGINNER","EASY","MEDIUM","HARD","CHALLENGE", 0 } },
|
||||
{ "Meter", true, 0, { "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15", 0 } },
|
||||
{ "Description", true, 0, { } },
|
||||
{ "Tap Steps", false, 0, { } },
|
||||
{ "Hold Steps", false, 0, { } },
|
||||
{ "Stream", false, 0, { } },
|
||||
{ "Voltage", false, 0, { } },
|
||||
{ "Air", false, 0, { } },
|
||||
{ "Freeze", false, 0, { } },
|
||||
{ "Chaos", false, 0, { } }
|
||||
};
|
||||
static Menu g_EditNotesStatistics( "Statistics", g_EditNotesStatisticsItems );
|
||||
|
||||
Menu g_EditNotesStatistics
|
||||
(
|
||||
"Statistics",
|
||||
MenuRow( "Difficulty", true, 0, "BEGINNER","EASY","MEDIUM","HARD","CHALLENGE" ),
|
||||
MenuRow( "Meter", true, 0, "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15" ),
|
||||
MenuRow( "Description", true ),
|
||||
MenuRow( "Tap Steps", false ),
|
||||
MenuRow( "Hold Steps", false ),
|
||||
MenuRow( "Stream", false ),
|
||||
MenuRow( "Voltage", false ),
|
||||
MenuRow( "Air", false ),
|
||||
MenuRow( "Freeze", false ),
|
||||
MenuRow( "Chaos", false )
|
||||
);
|
||||
|
||||
|
||||
Menu g_EditSongInfo
|
||||
(
|
||||
"Edit Song Info",
|
||||
MenuRow( "Main title", true ),
|
||||
MenuRow( "Sub title", true ),
|
||||
MenuRow( "Artist", true ),
|
||||
MenuRow( "Credit", true ),
|
||||
MenuRow( "Main title transliteration", true ),
|
||||
MenuRow( "Sub title transliteration", true ),
|
||||
MenuRow( "Artist transliteration", true )
|
||||
);
|
||||
|
||||
|
||||
Menu g_BGChange
|
||||
(
|
||||
"Background Change",
|
||||
MenuRow( "Rate (applies to new adds)", true, 15, "-100%","-80%","-60%","-40%","-20%","0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%","120%","140%","160%","180%","200%" ),
|
||||
MenuRow( "Fade Last (applies to new adds)", true, 0, "NO","YES" ),
|
||||
MenuRow( "Rewind Movie (applies to new adds)", true, 0, "NO","YES" ),
|
||||
MenuRow( "Loop (applies to new adds)", true, 1, "NO","YES" ),
|
||||
MenuRow( "Add Change to random", true ),
|
||||
MenuRow( "Add Change to song BGAnimation", true ),
|
||||
MenuRow( "Add Change to song Movie", true ),
|
||||
MenuRow( "Add Change to song Still", true ),
|
||||
MenuRow( "Add Change to global Random Movie", true ),
|
||||
MenuRow( "Add Change to global BGAnimation", true ),
|
||||
MenuRow( "Add Change to global Visualization", true ),
|
||||
MenuRow( "Remove Change", true )
|
||||
);
|
||||
static const MenuRow g_EditSongInfoItems[] =
|
||||
{
|
||||
{ "Main title", true, 0, { } },
|
||||
{ "Sub title", true, 0, { } },
|
||||
{ "Artist", true, 0, { } },
|
||||
{ "Credit", true, 0, { } },
|
||||
{ "Main title transliteration", true, 0, { } },
|
||||
{ "Sub title transliteration", true, 0, { } },
|
||||
{ "Artist transliteration", true, 0, { } }
|
||||
};
|
||||
static Menu g_EditSongInfo( "Edit Song Info", g_EditSongInfoItems );
|
||||
|
||||
static const MenuRow g_BGChangeItems[] =
|
||||
{
|
||||
{ "Rate (applies to new adds)", true, 15, { "-100%","-80%","-60%","-40%","-20%","0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%","120%","140%","160%","180%","200%", 0 } },
|
||||
{ "Fade Last (applies to new adds)", true, 0, { "NO","YES", 0 } },
|
||||
{ "Rewind Movie (applies to new adds)", true, 0, { "NO","YES", 0 } },
|
||||
{ "Loop (applies to new adds)", true, 1, { "NO","YES", 0 } },
|
||||
{ "Add Change to random", true, 0, { } },
|
||||
{ "Add Change to song BGAnimation", true, 0, { } },
|
||||
{ "Add Change to song Movie", true, 0, { } },
|
||||
{ "Add Change to song Still", true, 0, { } },
|
||||
{ "Add Change to global Random Movie", true, 0, { } },
|
||||
{ "Add Change to global BGAnimation", true, 0, { } },
|
||||
{ "Add Change to global Visualization", true, 0, { } },
|
||||
{ "Remove Change", true, 0, { } }
|
||||
};
|
||||
static Menu g_BGChange( "Background Change", g_BGChangeItems );
|
||||
|
||||
ScreenEdit::ScreenEdit( CString sName ) : Screen( sName )
|
||||
{
|
||||
|
||||
@@ -115,7 +115,6 @@ public:
|
||||
};
|
||||
void HandleMainMenuChoice( MainMenuChoice c, int* iAnswers );
|
||||
|
||||
// MD 11/02/03 - added conversions of beats to pauses and vice-versa
|
||||
enum AreaMenuChoice {
|
||||
cut,
|
||||
copy,
|
||||
|
||||
@@ -67,7 +67,7 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes
|
||||
|
||||
for( unsigned i=0; i<m_Def.rows.size(); i++ )
|
||||
{
|
||||
MenuRow& line = m_Def.rows[i];
|
||||
MenuRowInternal& line = m_Def.rows[i];
|
||||
m_iCurAnswers[i] = 0;
|
||||
|
||||
float fY = SCALE( i, 0.f, m_Def.rows.size()-1.f, CENTER_Y-fHeightOfAll/2, CENTER_Y+fHeightOfAll/2 );
|
||||
@@ -296,3 +296,24 @@ bool ScreenMiniMenu::CanGoRight()
|
||||
else
|
||||
return m_iCurAnswers[m_iCurLine] != iNumInCurRow-1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Menu::Menu( CString t, const MenuRow *rowp )
|
||||
{
|
||||
title = t;
|
||||
for( int i = 0; rowp[i].name; ++i )
|
||||
rows.push_back( rowp[i] );
|
||||
}
|
||||
|
||||
MenuRowInternal::MenuRowInternal( const MenuRow &r )
|
||||
{
|
||||
name = r.name;
|
||||
enabled = r.enabled;
|
||||
defaultChoice = r.defaultChoice;
|
||||
#define PUSH( c ) if(c!=NULL) choices.push_back(c);
|
||||
for( unsigned i = 0; i < ARRAYSIZE(r.choices); ++i )
|
||||
PUSH( r.choices[i] );
|
||||
#undef PUSH
|
||||
}
|
||||
|
||||
|
||||
@@ -22,44 +22,37 @@
|
||||
|
||||
struct MenuRow
|
||||
{
|
||||
CString name;
|
||||
const char *name;
|
||||
bool enabled;
|
||||
int defaultChoice;
|
||||
const char *choices[32];
|
||||
};
|
||||
|
||||
|
||||
struct MenuRowInternal
|
||||
{
|
||||
CString name;
|
||||
bool enabled;
|
||||
int defaultChoice;
|
||||
vector<CString> choices;
|
||||
|
||||
MenuRow()
|
||||
MenuRowInternal()
|
||||
{
|
||||
enabled = true;
|
||||
defaultChoice = 0;
|
||||
}
|
||||
|
||||
MenuRow( const char * n, bool e, int d=0, 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, const char * c20=NULL, const char * c21=NULL, const char * c22=NULL, const char * c23=NULL, const char * c24=NULL )
|
||||
{
|
||||
name = n;
|
||||
enabled = e;
|
||||
defaultChoice = d;
|
||||
#define PUSH( c ) if(c!=NULL) choices.push_back(c);
|
||||
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);PUSH(c20);PUSH(c21);PUSH(c22);PUSH(c23);PUSH(c24);
|
||||
#undef PUSH
|
||||
// printf( "choices.size = %u", choices.size() );
|
||||
}
|
||||
MenuRowInternal( const MenuRow &r );
|
||||
};
|
||||
|
||||
|
||||
struct Menu
|
||||
{
|
||||
CString title;
|
||||
vector<MenuRow> rows;
|
||||
vector<MenuRowInternal> rows;
|
||||
|
||||
Menu() {}
|
||||
|
||||
Menu( CString t, MenuRow r0, MenuRow r1=MenuRow(), MenuRow r2=MenuRow(), MenuRow r3=MenuRow(), MenuRow r4=MenuRow(), MenuRow r5=MenuRow(), MenuRow r6=MenuRow(), MenuRow r7=MenuRow(), MenuRow r8=MenuRow(), MenuRow r9=MenuRow(), MenuRow r10=MenuRow(), MenuRow r11=MenuRow(), MenuRow r12=MenuRow(), MenuRow r13=MenuRow(), MenuRow r14=MenuRow(), MenuRow r15=MenuRow(), MenuRow r16=MenuRow(), MenuRow r17=MenuRow(), MenuRow r18=MenuRow(), MenuRow r19=MenuRow(), MenuRow r20=MenuRow(), MenuRow r21=MenuRow() )
|
||||
{
|
||||
title = t;
|
||||
#define PUSH( r ) if(r.name!="" || !r.choices.empty()) rows.push_back(r);
|
||||
PUSH(r0);PUSH(r1);PUSH(r2);PUSH(r3);PUSH(r4);PUSH(r5);PUSH(r6);PUSH(r7);PUSH(r8);PUSH(r9);PUSH(r10);PUSH(r11);PUSH(r12);PUSH(r13);PUSH(r14);PUSH(r15);PUSH(r16);PUSH(r17);PUSH(r18);PUSH(r19);PUSH(r20);PUSH(r21);
|
||||
#undef PUSH
|
||||
}
|
||||
Menu( CString t, const MenuRow *rows );
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user