diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 2738ad13ea..ed75fd979d 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -293,8 +293,9 @@ Actor * NoteDisplay::GetTapNoteActor( float fNoteBeat ) NoteType nt = NoteType(0); if( cache->m_bTapNoteAnimationIsNoteColor ) nt = BeatToNoteType( fNoteBeat ); +// NOTE_TYPE_INVALID is 192nds at this point. if( nt == NOTE_TYPE_INVALID ) - nt = NOTE_TYPE_32ND; + nt = NOTE_TYPE_192ND; nt = min( nt, (NoteType) (NOTE_COLOR_IMAGES-1) ); Actor *pActorOut = m_pTapNote[nt]; @@ -338,8 +339,9 @@ Sprite * NoteDisplay::GetHoldTopCapSprite( float fNoteBeat, bool bActive ) NoteType nt = NoteType(0); if( cache->m_bHoldTopCapAnimationIsNoteColor ) nt = BeatToNoteType( fNoteBeat ); +// NOTE_TYPE_INVALID is 192nds at this point. if( nt == NOTE_TYPE_INVALID ) - nt = NOTE_TYPE_32ND; + nt = NOTE_TYPE_192ND; nt = min( nt, (NoteType) (NOTE_COLOR_IMAGES-1) ); Sprite *pSpriteOut = bActive ? &m_sprHoldTopCapActive[nt] : &m_sprHoldTopCapInactive[nt]; @@ -359,8 +361,9 @@ Sprite * NoteDisplay::GetHoldBottomCapSprite( float fNoteBeat, bool bActive ) NoteType nt = NoteType(0); if( cache->m_bHoldBottomCapAnimationIsNoteColor ) nt = BeatToNoteType( fNoteBeat ); +// NOTE_TYPE_INVALID is 192nds at this point. if( nt == NOTE_TYPE_INVALID ) - nt = NOTE_TYPE_32ND; + nt = NOTE_TYPE_192ND; nt = min( nt, (NoteType) (NOTE_COLOR_IMAGES-1) ); Sprite *pSpriteOut = bActive ? &m_sprHoldBottomCapActive[nt] : &m_sprHoldBottomCapInactive[nt]; @@ -381,8 +384,9 @@ Actor* NoteDisplay::GetHoldHeadActor( float fNoteBeat, bool bActive ) NoteType nt = NoteType(0); if( cache->m_bHoldHeadAnimationIsNoteColor ) nt = BeatToNoteType( fNoteBeat ); +// NOTE_TYPE_INVALID is 192nds at this point. if( nt == NOTE_TYPE_INVALID ) - nt = NOTE_TYPE_32ND; + nt = NOTE_TYPE_192ND; nt = min( nt, (NoteType) (NOTE_COLOR_IMAGES-1) ); Actor *pActorOut = bActive ? m_pHoldHeadActive[nt] : m_pHoldHeadInactive[nt]; @@ -402,8 +406,9 @@ Sprite *NoteDisplay::GetHoldBodySprite( float fNoteBeat, bool bActive ) NoteType nt = NoteType(0); if( cache->m_bHoldBodyAnimationIsNoteColor ) nt = BeatToNoteType( fNoteBeat ); +// NOTE_TYPE_INVALID is 192nds at this point. if( nt == NOTE_TYPE_INVALID ) - nt = NOTE_TYPE_32ND; + nt = NOTE_TYPE_192ND; nt = min( nt, (NoteType) (NOTE_COLOR_IMAGES-1) ); Sprite *pSpriteOut = bActive ? &m_sprHoldBodyActive[nt] : &m_sprHoldBodyInactive[nt]; @@ -423,8 +428,9 @@ Actor* NoteDisplay::GetHoldTailActor( float fNoteBeat, bool bActive ) NoteType nt = NoteType(0); if( cache->m_bHoldTailAnimationIsNoteColor ) nt = BeatToNoteType( fNoteBeat ); +// NOTE_TYPE_INVALID is 192nds at this point. if( nt == NOTE_TYPE_INVALID ) - nt = NOTE_TYPE_32ND; + nt = NOTE_TYPE_192ND; nt = min( nt, (NoteType) (NOTE_COLOR_IMAGES-1) ); Actor *pActorOut = bActive ? m_pHoldTailActive[nt] : m_pHoldTailInactive[nt]; diff --git a/stepmania/src/NoteDisplay.h b/stepmania/src/NoteDisplay.h index ee8abf06ee..26069655b8 100644 --- a/stepmania/src/NoteDisplay.h +++ b/stepmania/src/NoteDisplay.h @@ -53,7 +53,7 @@ protected: struct NoteMetricCache_t *cache; -#define NOTE_COLOR_IMAGES 6 +#define NOTE_COLOR_IMAGES 9 Actor* m_pTapNote[NOTE_COLOR_IMAGES]; Actor* m_pTapAddition; diff --git a/stepmania/src/NoteTypes.cpp b/stepmania/src/NoteTypes.cpp index 4ebd5ffd80..7fc2fe1ac1 100644 --- a/stepmania/src/NoteTypes.cpp +++ b/stepmania/src/NoteTypes.cpp @@ -26,8 +26,12 @@ float NoteTypeToBeat( NoteType nt ) case NOTE_TYPE_64TH: return 1.0f/16; // MD 11/03/03 - NOTE_TYPE_INVALID should be treated as equivalent to // NOTE_TYPE_192ND; NOTE_TYPE_96TH should not exist. + // MD 11/12/03 - And, really, since NOTE_TYPE_192ND had to be added, we'll + // keep the behavior of NOTE_TYPE_INVALID being the same, but + // it shouldn't ever come up anyway. + case NOTE_TYPE_192ND: return 1.0f/48; + default: ASSERT(0); // and fall through case NOTE_TYPE_INVALID: return 1.0f/48; - default: ASSERT(0); return 0; } } @@ -56,6 +60,7 @@ CString NoteTypeToString( NoteType nt ) case NOTE_TYPE_32ND: return "32nd"; case NOTE_TYPE_48TH: return "48th"; case NOTE_TYPE_64TH: return "64th"; + case NOTE_TYPE_192ND: // fall through case NOTE_TYPE_INVALID: return "192nd"; default: ASSERT(0); return ""; } diff --git a/stepmania/src/NotesLoaderBMS.cpp b/stepmania/src/NotesLoaderBMS.cpp index 59f3a562e9..2ef28e7d15 100644 --- a/stepmania/src/NotesLoaderBMS.cpp +++ b/stepmania/src/NotesLoaderBMS.cpp @@ -49,6 +49,9 @@ int iTracks[MAX_NOTE_TRACKS]; +void BMSLoader::ResetTracksMagic( void ) { + for (int ix = 0; ixSetNumTracks( MAX_NOTE_TRACKS ); + ResetTracksMagic(); ifstream file(sPath); if( file.bad() ) diff --git a/stepmania/src/NotesLoaderBMS.h b/stepmania/src/NotesLoaderBMS.h index 5d4a815c39..d34adba35e 100644 --- a/stepmania/src/NotesLoaderBMS.h +++ b/stepmania/src/NotesLoaderBMS.h @@ -10,6 +10,7 @@ class BMSLoader: public NotesLoader { void mapBMSTrackToDanceNote( int iBMSTrack, int &iDanceColOut, char &cNoteCharOut ); void PushTrackNumForMagic( int iTrackNum ); StepsType CheckTracksMagic( void ); + void ResetTracksMagic( void ); public: void GetApplicableFiles( CString sPath, CStringArray &out ); diff --git a/stepmania/src/SnapDisplay.cpp b/stepmania/src/SnapDisplay.cpp index 673c573a5b..4298c27011 100644 --- a/stepmania/src/SnapDisplay.cpp +++ b/stepmania/src/SnapDisplay.cpp @@ -25,7 +25,9 @@ SnapDisplay::SnapDisplay() for( i=0; i<2; i++ ) { m_sprIndicators[i].Load( THEME->GetPathToG("SnapDisplay icon 8x1") ); - ASSERT( m_sprIndicators[i].GetNumStates() == NUM_NOTE_TYPES ); + // MD 11/12/03 - this assert doesn't allow us to set the editor's maximum + // resolution to less than the maximum one we have available. Meh. + // ASSERT( m_sprIndicators[i].GetNumStates() == NUM_NOTE_TYPES ); m_sprIndicators[i].StopAnimating(); this->AddChild( &m_sprIndicators[i] ); }