From 3a91cd08103a4eb45d6ae358b20865e9cf14c517 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 29 Mar 2011 22:42:38 -0400 Subject: [PATCH 1/8] Fix lua error. --- NoteSkins/dance/midi-note/NoteSkin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 53dea206f4d27e689328bfc10a852a1c372658a2 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 29 Mar 2011 23:21:25 -0400 Subject: [PATCH 2/8] Safe to enable mice finding I think. --- src/arch/InputHandler/InputHandler_MacOSX_HID.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); From b91dc690435cd889359eaf442c282288ddcd2ea1 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 23:50:41 -0500 Subject: [PATCH 3/8] change how these are compared by putting the load in the condition too --- src/GameSoundManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From c2b397d43e1369db0601e48c5c354462f2766525 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 30 Mar 2011 13:30:18 -0500 Subject: [PATCH 4/8] add Remove to ScreenEditOptions; fixes issue 242 --- Themes/_fallback/metrics.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" From 34813c26ef2c03bdcd33aa1bd15be9079c063512 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 30 Mar 2011 21:37:11 -0400 Subject: [PATCH 5/8] Disable saving ALL steps in the .sm format. --- src/NotesWriterSM.cpp | 4 +--- src/NotesWriterSM.h | 2 +- src/Song.cpp | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) 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/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 ); } From 58724886d5e6b8467158707897c55eddc65bf2ea Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 30 Mar 2011 21:57:54 -0400 Subject: [PATCH 6/8] It's not delays that are the problem now. --- src/TimingData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 22e2c8f6254d2f6bfdee5ab50ee8edd85b1154d9 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Thu, 31 Mar 2011 23:31:13 +0700 Subject: [PATCH 7/8] fix stops bug on stops longer than 1 seconds, iStepSearchRows is 0. the fix is to look backwards in addition to looking forwards. --- src/Player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ) { From 11a163a395d09d3771469392355d1a7fda6b34d9 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Fri, 1 Apr 2011 00:34:09 +0700 Subject: [PATCH 8/8] added NoOffset. I believe that this should probably fix the global offset offsyncing problem on Windows: http://www.youtube.com/watch?v=6egnvovtfHw --- src/AutoKeysounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )