From: Glenn M. <gma...@us...> - 2003-05-30 21:37:00
|
Update of /cvsroot/stepmania/stepmania/src In directory sc8-pr-cvs1:/tmp/cvs-serv6857 Modified Files: ScreenOptions.h ScreenOptionsMenu.cpp Log Message: improve abstraction Index: ScreenOptions.h =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenOptions.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- ScreenOptions.h 21 May 2003 01:10:13 -0000 1.26 +++ ScreenOptions.h 30 May 2003 21:36:56 -0000 1.27 @@ -84,16 +84,21 @@ void MenuUp( PlayerNumber pn ); void MenuDown( PlayerNumber pn ); + int GetCurrentRow(PlayerNumber pn = PLAYER_1) const { return m_iCurrentRow[pn]; } + + MenuElements m_Menu; + OptionRow* m_OptionRow; + + int m_iSelectedOption[NUM_PLAYERS][MAX_OPTION_LINES]; + +private: CString m_sName; InputMode m_InputMode; bool m_bUseIcons; bool m_bLoadExplanations; - OptionRow* m_OptionRow; int m_iNumOptionRows; - MenuElements m_Menu; - ActorFrame m_framePage; Sprite m_sprPage; Sprite m_sprBullets[MAX_OPTION_LINES]; @@ -101,14 +106,13 @@ BitmapText m_textItems[MAX_OPTION_LINES][MAX_OPTIONS_PER_LINE]; // this array has to be big enough to hold all of the options bool m_bRowIsLong[MAX_OPTION_LINES]; // goes off edge of screen - int m_iSelectedOption[NUM_PLAYERS][MAX_OPTION_LINES]; + int m_iCurrentRow[NUM_PLAYERS]; OptionsCursor m_Underline[NUM_PLAYERS][MAX_OPTION_LINES]; OptionIcon m_OptionIcons[NUM_PLAYERS][MAX_OPTION_LINES]; OptionsCursor m_Highlight[NUM_PLAYERS]; -private: BitmapText m_textExplanation; RageSound m_SoundChangeCol; Index: ScreenOptionsMenu.cpp =================================================================== RCS file: /cvsroot/stepmania/stepmania/src/ScreenOptionsMenu.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ScreenOptionsMenu.cpp 27 May 2003 01:59:43 -0000 1.19 +++ ScreenOptionsMenu.cpp 30 May 2003 21:36:56 -0000 1.20 @@ -95,7 +95,7 @@ void ScreenOptionsMenu::GoToNextState() { - switch( this->m_iCurrentRow[0] ) + switch( this->GetCurrentRow() ) { case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break; case OM_AUTO_GRAPHIC: SCREENMAN->SetNewScreen("ScreenAutoGraphicDetail"); break; |