diff --git a/NoteSkins/dance/midi-note/NoteSkin.lua b/NoteSkins/dance/midi-note/NoteSkin.lua index 2f97fb4e72..90b3738186 100644 --- a/NoteSkins/dance/midi-note/NoteSkin.lua +++ b/NoteSkins/dance/midi-note/NoteSkin.lua @@ -25,7 +25,7 @@ ret.Redir = function(sButton, sElement) -- Test if sElement == "Hold Head Inactive" or - sElement == "Roll Head Inactive" or + sElement == "Roll Head Inactive" then sElement = "StreamHead Inactive"; end diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 47c1b44bf8..72a53b7a53 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -3615,13 +3615,14 @@ CancelTransitionsOut=true PlayMusic=false TimerSeconds=-1 ShowStyleIcon=false -LineNames="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" +LineNames="1,2,3,4,5,6,R,7,8,9,10,11,12,13,14,15,16" Line1="list,Speed" Line2="list,Accel" Line3="list,Effect" Line4="list,Appearance" Line5="list,Turn" Line6="list,Insert" +LineR="list,Remove" Line7="list,Scroll" Line8="list,NoteSkins" Line9="list,Holds" diff --git a/src/AutoKeysounds.cpp b/src/AutoKeysounds.cpp index b5558456cd..5118be44fd 100644 --- a/src/AutoKeysounds.cpp +++ b/src/AutoKeysounds.cpp @@ -99,7 +99,7 @@ void AutoKeysounds::LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain ) if( tn[pn].iKeysoundIndex >= 0 ) { RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[tn[pn].iKeysoundIndex]; - float fSeconds = pSong->m_Timing.GetElapsedTimeFromBeat( NoteRowToBeat(iRow) ); + float fSeconds = pSong->m_Timing.GetElapsedTimeFromBeatNoOffset( NoteRowToBeat(iRow) ); float fPan = 0; if( !bSoundIsGlobal ) diff --git a/src/GameSoundManager.cpp b/src/GameSoundManager.cpp index f0b0a9d686..2c17b82c6e 100644 --- a/src/GameSoundManager.cpp +++ b/src/GameSoundManager.cpp @@ -142,9 +142,9 @@ static void StartMusic( MusicToPlay &ToPlay ) { LOG->Trace( "Found '%s'", ToPlay.m_sTimingFile.c_str() ); Song song; - if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".ssc" ) + if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".ssc" && + SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song) ) { - SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song); ToPlay.HasTiming = true; ToPlay.m_TimingData = song.m_Timing; // get cabinet lights if any @@ -152,9 +152,9 @@ static void StartMusic( MusicToPlay &ToPlay ) if( pStepsCabinetLights ) pStepsCabinetLights->GetNoteData( ToPlay.m_LightsData ); } - else if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".sm" ) + else if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".sm" && + SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song) ) { - SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song); ToPlay.HasTiming = true; ToPlay.m_TimingData = song.m_Timing; // get cabinet lights if any diff --git a/src/NotesWriterSM.cpp b/src/NotesWriterSM.cpp index 7b80baba19..13d3e21a3b 100644 --- a/src/NotesWriterSM.cpp +++ b/src/NotesWriterSM.cpp @@ -287,7 +287,7 @@ static RString GetSMNotesTag( const Song &song, const Steps &in ) return JoinLineList( lines ); } -bool NotesWriterSM::Write( RString sPath, const Song &out ) +bool NotesWriterSM::Write( RString sPath, const Song &out, const vector& vpStepsToSave ) { int flags = RageFile::WRITE; @@ -302,8 +302,6 @@ bool NotesWriterSM::Write( RString sPath, const Song &out ) WriteGlobalTags( f, out ); - // Save specified Steps to this file - const vector& vpStepsToSave = out.GetAllSteps(); FOREACH_CONST( Steps*, vpStepsToSave, s ) { const Steps* pSteps = *s; diff --git a/src/NotesWriterSM.h b/src/NotesWriterSM.h index 71a5e8b292..ee0ed26441 100644 --- a/src/NotesWriterSM.h +++ b/src/NotesWriterSM.h @@ -11,7 +11,7 @@ namespace NotesWriterSM * @param sPath the path to write the file. * @param out the Song to be written out. * @return its success or failure. */ - bool Write( RString sPath, const Song &out ); + bool Write( RString sPath, const Song &out, const vector& vpStepsToSave ); /** * @brief Get some contents about the edit file first. * @param pSong the Song in question. diff --git a/src/Player.cpp b/src/Player.cpp index 13bae07600..92aeee5f09 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -1973,7 +1973,10 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b * Either option would fundamentally change the grading of two quick notes * "jack hammers." Hmm. */ - const int iStepSearchRows = BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow; + const int iStepSearchRows = max( + BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow, + iSongRow - BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds - StepSearchDistance ) ) + ) + ROWS_PER_BEAT; int iRowOfOverlappingNoteOrRow = row; if( row == -1 ) { diff --git a/src/Song.cpp b/src/Song.cpp index b9d15c3ea8..50537a8b97 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -925,7 +925,22 @@ bool Song::SaveToSMFile() // If the file exists, make a backup. if( IsAFile(sPath) ) FileCopy( sPath, sPath + ".old" ); - return NotesWriterSM::Write( sPath, *this ); + + vector vpStepsToSave; + FOREACH_CONST( Steps*, m_vpSteps, s ) + { + Steps *pSteps = *s; + if( pSteps->IsAutogen() ) + continue; // don't write autogen notes + + // Only save steps that weren't loaded from a profile. + if( pSteps->WasLoadedFromProfile() ) + continue; + + vpStepsToSave.push_back( pSteps ); + } + + return NotesWriterSM::Write( sPath, *this, vpStepsToSave ); } diff --git a/src/TimingData.cpp b/src/TimingData.cpp index 989b780dff..0fa5d50889 100644 --- a/src/TimingData.cpp +++ b/src/TimingData.cpp @@ -546,7 +546,7 @@ void TimingData::GetBeatAndBPSFromElapsedTimeNoOffset( float fElapsedTime, float fBPS = itBPMS->m_fBPS; itBPMS ++; break; - case FOUND_STOP: // TODO: update for Delays. + case FOUND_STOP: { fTimeToNextEvent = itSS->m_fStopSeconds; fNextEventTime = fLastTime + fTimeToNextEvent; diff --git a/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp b/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp index 84bc3283f4..c9e1b86243 100644 --- a/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp +++ b/src/arch/InputHandler/InputHandler_MacOSX_HID.cpp @@ -247,10 +247,10 @@ InputHandler_MacOSX_HID::InputHandler_MacOSX_HID() : m_Sem( "Input thread starte // Add devices. LOG->Trace( "Finding keyboards" ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard, id ); - /* + LOG->Trace( "Finding mice" ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, id ); - */ + LOG->Trace( "Finding joysticks" ); id = DEVICE_JOY1; AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick, id );