The changes I have made have mostly to do with the Edit mode, but do pay
attention, because one of my code additions might save you some work in the future. * NotesTypeToStyle(nt) and StyleToNotesType(s) Look in GameConstantsAndTypes.h for these two new functions. Essentially, they provide a centralized automation for the NotesType/Style switch() tables in several functions. On top of that, I've even included a Perl script which will actually rewrite the two functions for you - all you have to do is keep the array at the beginning of the script updated, then run the script and paste the results. See the notes in GameConstantsAndTypes.h for details. * Changes in ScreenEditMenu and ScreenEdit I changed ScreenEditMenu and ScreenEdit in order to correct a bug that made it so that in Edit mode, when working with a (NEW) sequence (previously created sequences were not affected), no matter which style was selected, it was only possible to edit the leftmost four arrows of the style. This made creating ez2-single, pump-single, and dance-solo (among others) impractical (one would have to manually add a new section to the .sm file with the correct number of columns; then it would be editable). The change made to ScreenEditMenu is only to update the NotesType to Style conversion; the former switch() table in HandleScreenMessage() was already out of date and unable to support EZ2 styles/types. The change made to ScreenEdit changes the m_NotesType of the freshly initialized Notes object. In Notes::Notes(), m_NotesType is initialized to NOTES_TYPE_DANCE_SINGLE (hence the locking to four arrows). My addition changes m_NotesType to reflect the selection made in ScreenEditMenu. Word up. - Dro -
This commit is contained in:
@@ -162,15 +162,21 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM )
|
||||
break;
|
||||
case SM_GoToNextState:
|
||||
// set the current style based on the notes type
|
||||
switch( GetSelectedNotesType() )
|
||||
{
|
||||
case NOTES_TYPE_DANCE_SINGLE: GAMEMAN->m_CurStyle = STYLE_DANCE_SINGLE; break;
|
||||
case NOTES_TYPE_DANCE_DOUBLE: GAMEMAN->m_CurStyle = STYLE_DANCE_DOUBLE; break;
|
||||
case NOTES_TYPE_DANCE_COUPLE: GAMEMAN->m_CurStyle = STYLE_DANCE_COUPLE; break;
|
||||
case NOTES_TYPE_DANCE_SOLO: GAMEMAN->m_CurStyle = STYLE_DANCE_SOLO; break;
|
||||
case NOTES_TYPE_PUMP_SINGLE: GAMEMAN->m_CurStyle = STYLE_PUMP_SINGLE; break;
|
||||
case NOTES_TYPE_PUMP_DOUBLE: GAMEMAN->m_CurStyle = STYLE_PUMP_DOUBLE; break;
|
||||
}
|
||||
|
||||
//switch( GetSelectedNotesType() )
|
||||
//{
|
||||
//case NOTES_TYPE_DANCE_SINGLE: GAMEMAN->m_CurStyle = STYLE_DANCE_SINGLE; break;
|
||||
//case NOTES_TYPE_DANCE_DOUBLE: GAMEMAN->m_CurStyle = STYLE_DANCE_DOUBLE; break;
|
||||
//case NOTES_TYPE_DANCE_COUPLE: GAMEMAN->m_CurStyle = STYLE_DANCE_COUPLE; break;
|
||||
//case NOTES_TYPE_DANCE_SOLO: GAMEMAN->m_CurStyle = STYLE_DANCE_SOLO; break;
|
||||
//case NOTES_TYPE_PUMP_SINGLE: GAMEMAN->m_CurStyle = STYLE_PUMP_SINGLE; break;
|
||||
//case NOTES_TYPE_PUMP_DOUBLE: GAMEMAN->m_CurStyle = STYLE_PUMP_DOUBLE; break;
|
||||
//}
|
||||
|
||||
// Dro Kulix:
|
||||
// A centralized solution for this switching mess...
|
||||
// (See GameConstantsAndTypes.h)
|
||||
GAMEMAN->m_CurStyle = NotesTypeToStyle( GetSelectedNotesType() );
|
||||
|
||||
SCREENMAN->SetNewScreen( new ScreenEdit );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user