From b50d6a04c770a65499c0225415665fb5b0d5660c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 27 Mar 2011 20:17:09 -0500 Subject: [PATCH 01/19] Texture Font Generator changes to make it compile in VS2008 --- .../Texture Font Generator-net2008.vcproj | 6 ++++++ src/Texture Font Generator/Utils.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Texture Font Generator/Texture Font Generator-net2008.vcproj b/src/Texture Font Generator/Texture Font Generator-net2008.vcproj index 2c3e2f450e..dee8b0dace 100644 --- a/src/Texture Font Generator/Texture Font Generator-net2008.vcproj +++ b/src/Texture Font Generator/Texture Font Generator-net2008.vcproj @@ -46,6 +46,7 @@ jmpbuf) ) { - png_destroy_read_struct( &pPng, &pInfo, png_infopp_NULL ); + png_destroy_read_struct( &pPng, &pInfo, NULL ); return false; } From 24db439ed3ab78b48ca2d3cf1fc4eb9693b44c2e Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 27 Mar 2011 22:11:34 -0400 Subject: [PATCH 02/19] Add more noteskins to GameData.smzip. --- Utils/CreatePackage.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Utils/CreatePackage.pl b/Utils/CreatePackage.pl index 48c85f50ac..81457e0f87 100755 --- a/Utils/CreatePackage.pl +++ b/Utils/CreatePackage.pl @@ -150,6 +150,7 @@ my @files = ( "Characters/default", "Courses/Default", "Data", + "NoteSkins/beat/default", "NoteSkins/common/common", # dance noteskins "NoteSkins/dance/default", @@ -166,8 +167,13 @@ my @files = ( "NoteSkins/dance/retrobar-splithand_whiteblue", # pump noteskins "NoteSkins/pump/cmd", + "NoteSkins/pump/cmd-routine-p1", + "NoteSkins/pump/cmd-routine-p2", "NoteSkins/pump/complex", "NoteSkins/pump/default", + "NoteSkins/pump/frame5p", + "NoteSkins/pump/newextra", + "NoteSkins/pump/rhythm", "NoteSkins/pump/simple", # kb7 noteskins "NoteSkins/kb7/default", @@ -175,6 +181,8 @@ my @files = ( "NoteSkins/kb7/retrobar", "NoteSkins/kb7/retrobar-iidx", "NoteSkins/kb7/retrobar-o2jam", + "NoteSkins/kb7/retrobar-razor", + "NoteSkins/kb7/retrobar-razor_o2", # themes "Themes/_fallback", "Themes/_portKit-sm4", From 2f4572c7f28eecce7bf06140ff87ce6d27171234 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 27 Mar 2011 22:11:48 -0400 Subject: [PATCH 03/19] Don't display GameData.smzip here. --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index aac27be6ce..8e4aa8d71e 100644 --- a/.hgignore +++ b/.hgignore @@ -21,6 +21,7 @@ ___* .cvsignore .DS_Store Thumbs.db +GameData.smzip config.log config.status *.pbxuser From 8916f58dae13bb82dd13222a9b47687acbcb2050 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Mon, 28 Mar 2011 15:08:09 -0400 Subject: [PATCH 04/19] Allow numbers <= 0 to cancel Warp segments. --- src/ScreenEdit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index 939b788890..febaaf9d22 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -2647,8 +2647,7 @@ void ScreenEdit::HandleScreenMessage( const ScreenMessage SM ) else if ( SM == SM_BackFromWarpChange ) { float fWarp = StringToFloat( ScreenTextEntry::s_sLastAnswer ); - if( fWarp > 0 ) - m_pSong->m_Timing.SetWarpAtBeat( GAMESTATE->m_fSongBeat, fWarp ); + m_pSong->m_Timing.SetWarpAtBeat( GAMESTATE->m_fSongBeat, fWarp ); SetDirty( true ); } else if( SM == SM_BackFromBGChange ) From 93e2bce579561740fbb451b96493c5cf048fab53 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 11:56:19 -0500 Subject: [PATCH 05/19] [ScreenEdit] Changed sample playback button to L. --- src/ScreenEdit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScreenEdit.cpp b/src/ScreenEdit.cpp index febaaf9d22..30d900fa2b 100644 --- a/src/ScreenEdit.cpp +++ b/src/ScreenEdit.cpp @@ -207,7 +207,7 @@ void ScreenEdit::InitEditMappings() m_EditMappingsDeviceInput.hold[EDIT_BUTTON_SAMPLE_LENGTH_DOWN][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LSHIFT); m_EditMappingsDeviceInput.hold[EDIT_BUTTON_SAMPLE_LENGTH_DOWN][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RSHIFT); - m_EditMappingsDeviceInput.button[EDIT_BUTTON_PLAY_SAMPLE_MUSIC][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Cm); + m_EditMappingsDeviceInput.button[EDIT_BUTTON_PLAY_SAMPLE_MUSIC][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Cl); m_EditMappingsDeviceInput.button[EDIT_BUTTON_OPEN_BGCHANGE_LAYER1_MENU][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Cb); m_EditMappingsDeviceInput.button[EDIT_BUTTON_OPEN_BGCHANGE_LAYER2_MENU][0] = DeviceInput(DEVICE_KEYBOARD, KEY_Cb); From 91e6e1def8684797623dabf1a5d3904efe8e85c9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 11:56:32 -0500 Subject: [PATCH 06/19] changelog --- Docs/Changelog_sm-ssc.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 5904c2283c..910803d9b5 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -9,6 +9,16 @@ Not all changes are documented, for various reasons. supported but exist anyways.) _____________________________________________________________________________ +================================================================================ +sm-ssc $NEXTVERSION | 2011???? +-------------------------------------------------------------------------------- +It depends on who you ask. +It could be v1.2.5, it could be v1.3.0, it could even be StepMania 5. + +20110329 +-------- +* [ScreenEdit] Changed sample playback button to L. [AJ] + ================================================================================ sm-ssc v1.2.4 | 20110327 -------------------------------------------------------------------------------- From a3e0bbeb4722f892f02376e8e1dbae3779073848 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 12:05:18 -0500 Subject: [PATCH 07/19] get rid of command on StepsDisplay Autogen in fallback --- Themes/_fallback/metrics.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Themes/_fallback/metrics.ini b/Themes/_fallback/metrics.ini index 3cacf67bed..47c1b44bf8 100644 --- a/Themes/_fallback/metrics.ini +++ b/Themes/_fallback/metrics.ini @@ -1996,7 +1996,7 @@ ShowAutogen=true AutogenX=40 AutogenY=0 AutogenOnCommand= -AutogenSetCommand=%function(self,param) if param.CustomDifficulty then self:diffuse(CustomDifficultyToLightColor(param.CustomDifficulty)); self:strokecolor(CustomDifficultyToDarkColor(param.CustomDifficulty)); end end +AutogenSetCommand= ShowStepsType=false StepsTypeX=0 StepsTypeY=0 From 54415fa8fbc7605a3d8c713c1746ae01d1285d70 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 12:56:39 -0500 Subject: [PATCH 08/19] [ScreenGameplay] Announcers say combo messages again. --- Docs/Changelog_sm-ssc.txt | 1 + src/ScreenGameplay.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 910803d9b5..8916f99138 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -18,6 +18,7 @@ It could be v1.2.5, it could be v1.3.0, it could even be StepMania 5. 20110329 -------- * [ScreenEdit] Changed sample playback button to L. [AJ] +* [ScreenGameplay] Announcers say combo messages again. [AJ] ================================================================================ sm-ssc v1.2.4 | 20110327 diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index fc34084c53..c9ea70bc6e 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -2517,9 +2517,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) if( !m_Toasty.IsTransitioning() && !m_Toasty.IsFinished() ) // don't play if we've already played it once m_Toasty.StartTransitioning(); } - else if( SM >= SM_100Combo && SM <= SM_1000Combo ) + else if( ScreenMessageHelpers::ScreenMessageToString(SM).find("0Combo") != string::npos ) { - int iCombo = ( SM-(SM_100Combo+1) ) * 100; + int iCombo; + RString sCropped = ScreenMessageHelpers::ScreenMessageToString(SM).substr(3); + sscanf(sCropped.c_str(),"%d%*s",&iCombo); PlayAnnouncer( ssprintf("gameplay %d combo",iCombo), 2 ); } else if( SM == SM_ComboStopped ) From 9445f3391da72feda7468b57104adf0d418285de Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 13:06:59 -0500 Subject: [PATCH 09/19] update ignore file --- .hgignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.hgignore b/.hgignore index 8e4aa8d71e..173f31ccc7 100644 --- a/.hgignore +++ b/.hgignore @@ -74,6 +74,8 @@ Program/StepMania*.lib crashinfo.txt Utils/temp* *.lnk +BuildLog.htm +*.pch syntax: regexp .*\#.*\#$ From 6c4d9673f3b6305dfdeecd0e9349d9d7b34c34b7 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 15:13:59 -0500 Subject: [PATCH 10/19] [GameSoundManager] properly load .sm and .ssc files instead of assuming they're ssc files --- src/GameSoundManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GameSoundManager.cpp b/src/GameSoundManager.cpp index ca07566f8a..f0b0a9d686 100644 --- a/src/GameSoundManager.cpp +++ b/src/GameSoundManager.cpp @@ -142,8 +142,9 @@ static void StartMusic( MusicToPlay &ToPlay ) { LOG->Trace( "Found '%s'", ToPlay.m_sTimingFile.c_str() ); Song song; - if( SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song) ) + if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".ssc" ) { + SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song); ToPlay.HasTiming = true; ToPlay.m_TimingData = song.m_Timing; // get cabinet lights if any @@ -151,8 +152,9 @@ static void StartMusic( MusicToPlay &ToPlay ) if( pStepsCabinetLights ) pStepsCabinetLights->GetNoteData( ToPlay.m_LightsData ); } - else if( SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song) ) + else if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".sm" ) { + SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song); ToPlay.HasTiming = true; ToPlay.m_TimingData = song.m_Timing; // get cabinet lights if any From dceebe50052be0b71de3ca2adbfac6a001b0c8e9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 18:02:28 -0500 Subject: [PATCH 11/19] trying to work on mouse stuff and not getting anywhere --- src/RageInputDevice.h | 15 ++++++------- .../InputHandler/InputHandler_DirectInput.cpp | 21 ++++++++++++++----- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/RageInputDevice.h b/src/RageInputDevice.h index 89084be39d..a81401e6a3 100644 --- a/src/RageInputDevice.h +++ b/src/RageInputDevice.h @@ -315,8 +315,9 @@ public: float level; // Mouse coordinates - unsigned x; - unsigned y; + //unsigned x; + //unsigned y; + int z; // mousewheel /* Whether this button is pressed. This is level with a threshold and * debouncing applied. */ @@ -324,12 +325,12 @@ public: RageTimer ts; - DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), x(0), y(0), bDown(false), ts(RageZeroTimer) { } - DeviceInput( InputDevice d, DeviceButton b, float l=0 ): device(d), button(b), level(l), x(0), y(0), bDown(l > 0.5f), ts(RageZeroTimer) { } + DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), z(0), bDown(false), ts(RageZeroTimer) { } + DeviceInput( InputDevice d, DeviceButton b, float l=0 ): device(d), button(b), level(l), z(0), bDown(l > 0.5f), ts(RageZeroTimer) { } DeviceInput( InputDevice d, DeviceButton b, float l, const RageTimer &t ): - device(d), button(b), level(l), x(0), y(0), bDown(level > 0.5f), ts(t) { } - DeviceInput( InputDevice d, DeviceButton b, const RageTimer &t, unsigned xPos=0, unsigned yPos=0 ): - device(d), button(b), level(0), x(xPos), y(yPos), bDown(false), ts(t) { } + device(d), button(b), level(l), z(0), bDown(level > 0.5f), ts(t) { } + DeviceInput( InputDevice d, DeviceButton b, const RageTimer &t, int zVal=0 ): + device(d), button(b), level(0), z(zVal), bDown(false), ts(t) { } bool operator==( const DeviceInput &other ) const { diff --git a/src/arch/InputHandler/InputHandler_DirectInput.cpp b/src/arch/InputHandler/InputHandler_DirectInput.cpp index 6dedbeba21..a0a9316e64 100644 --- a/src/arch/InputHandler/InputHandler_DirectInput.cpp +++ b/src/arch/InputHandler/InputHandler_DirectInput.cpp @@ -413,12 +413,21 @@ void InputHandler_DInput::UpdatePolled( DIDevice &device, const RageTimer &tm ) break; case DIMOFS_Z: { - neg = MOUSE_WHEELUP; pos = MOUSE_WHEELDOWN; + neg = MOUSE_WHEELDOWN; pos = MOUSE_WHEELUP; val = state.lZ; + //LOG->Trace("MouseWheel polled: %i",val); + INPUTFILTER->UpdateMouseWheel(val); - float l = SCALE( int(val), -120.0f, 120.0f, 0.0f, 1.0f ); - ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); - ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + /* + if( (int)val != 0 ) + { + // positive values: WheelUp + // negative values: WheelDown + float l = SCALE( int(val), -120.0f, 120.0f, -1.0f, 1.0f ); + ButtonPressed( DeviceInput(dev, neg, max(-l,0), tm) ); + ButtonPressed( DeviceInput(dev, pos, max(+l,0), tm) ); + } + */ } break; default: LOG->MapLog( "unknown input", @@ -515,10 +524,12 @@ void InputHandler_DInput::UpdateBuffered( DIDevice &device, const RageTimer &tm INPUTFILTER->UpdateCursorLocation((float)cursorPos.x,(float)cursorPos.y); break; case DIMOFS_Z: + // positive values: WheelUp + // negative values: WheelDown INPUTFILTER->UpdateMouseWheel(l); { up = MOUSE_WHEELUP; down = MOUSE_WHEELDOWN; - l = SCALE( int(evtbuf[i].dwData), -120.0f, 120.0f, 1.0f, -1.0f ); + l = SCALE( int(evtbuf[i].dwData), -WHEEL_DELTA, WHEEL_DELTA, 1.0f, -1.0f ); DeviceInput diUp = DeviceInput(dev, up, max(-l,0), tm); DeviceInput diDown = DeviceInput(dev, down, max(+l,0), tm); ButtonPressed( diUp ); From 3c8d5fcb8c5c3061a916a3594a10fa50426cf7f9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 18:16:35 -0500 Subject: [PATCH 12/19] attempt to log mouse position on mac --- src/archutils/Darwin/MouseDevice.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/archutils/Darwin/MouseDevice.cpp b/src/archutils/Darwin/MouseDevice.cpp index b968b0cfb9..1e7a47b630 100644 --- a/src/archutils/Darwin/MouseDevice.cpp +++ b/src/archutils/Darwin/MouseDevice.cpp @@ -60,6 +60,7 @@ void MouseDevice::AddElement( int usagePage, int usage, IOHIDElementCookie cooki m.y_max = iMax; break; case kHIDUsage_GD_Z: + case kHIDUsage_GD_Wheel: // also handle wheel m.z_axis = cookie; m.z_min = iMin; m.z_max = iMax; @@ -104,11 +105,13 @@ void MouseDevice::GetButtonPresses( vector& vPresses, IOHIDElementC const Mouse& m = m_Mouse; if( m.x_axis == cookie ) { -// INPUTFILTER->UpdateCursorLocation(value,m.y_axis); + //INPUTFILTER->UpdateCursorLocation(value,m.y_axis); + LOG->Trace("Mouse X: Value = %i",value); } else if( m.y_axis == cookie ) { -// INPUTFILTER->UpdateCursorLocation(m.x_axis,value); + //INPUTFILTER->UpdateCursorLocation(m.x_axis,value); + LOG->Trace("Mouse Y: Value = %i",value); } else if( m.z_axis == cookie ) { From 066f2ee2d19eae1227050081e4d2f4ab2682ddf7 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Tue, 29 Mar 2011 18:44:02 -0500 Subject: [PATCH 13/19] notes --- src/archutils/Darwin/MouseDevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/archutils/Darwin/MouseDevice.cpp b/src/archutils/Darwin/MouseDevice.cpp index 1e7a47b630..12d5f6b886 100644 --- a/src/archutils/Darwin/MouseDevice.cpp +++ b/src/archutils/Darwin/MouseDevice.cpp @@ -103,6 +103,10 @@ void MouseDevice::GetButtonPresses( vector& vPresses, IOHIDElementC { // todo: add mouse axis stuff -aj const Mouse& m = m_Mouse; + HRESULT result; + IOHIDEventStruct hidEvent; + // result = (*m_Interface)->getElementValue(hidDeviceInterface,cookie,&hidEvent); + if( m.x_axis == cookie ) { //INPUTFILTER->UpdateCursorLocation(value,m.y_axis); From 3a91cd08103a4eb45d6ae358b20865e9cf14c517 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 29 Mar 2011 22:42:38 -0400 Subject: [PATCH 14/19] 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 15/19] 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 16/19] 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 17/19] 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 18/19] 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 19/19] 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;