From 4a8e45843e90afe3a8145c8fda29f4264a6d69fb Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sat, 9 Apr 2011 12:09:54 -0400 Subject: [PATCH 1/9] Add #GAINSECONDS tag. --- Docs/CourseFormat.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Docs/CourseFormat.txt b/Docs/CourseFormat.txt index b23aee8e63..6051a6044a 100644 --- a/Docs/CourseFormat.txt +++ b/Docs/CourseFormat.txt @@ -44,6 +44,11 @@ Complete Course Template TIME:0.500:END:1.000:MODS:2x; TIME:1.500:END:1.500:MODS:0.5x; +#GAINSECONDS:60.5; +-- The number of seconds gained before starting a song. This and #LIVES are +-- mutually exclusive: you can either have one, the other, or none: both +-- is not possible. This is meant to be used for Survival courses. + #SONG:*:Medium:2x; -- #SONG can take quite a variety of parameters, of which may be useful to you -- for testing or randomocity purpose. @@ -80,4 +85,4 @@ Finally, here's an example course: #SONG:In The Groove/Dawn:Overhead; #SONG:In The Groove/Mouth:; #SONG:In The Groove 2/Funk Factory:; -#SONG:In The Groove 3/Disconnected Zeo:; \ No newline at end of file +#SONG:In The Groove 3/Disconnected Zeo:; From 6fa63cfb78e63d29ccd08e7636943e201b9d315c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 9 Apr 2011 23:32:13 -0500 Subject: [PATCH 2/9] todo comment about ordering random, roulette, portal, and custom items --- src/MusicWheel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MusicWheel.cpp b/src/MusicWheel.cpp index e767612f14..0ee25ae52a 100644 --- a/src/MusicWheel.cpp +++ b/src/MusicWheel.cpp @@ -659,6 +659,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelIt if( so != SORT_ROULETTE ) { + // todo: allow themers to change the order of the items. -aj if( SHOW_ROULETTE ) arrayWheelItemDatas.push_back( new MusicWheelItemData(TYPE_ROULETTE, NULL, "", NULL, ROULETTE_COLOR, 0) ); From d1ddea19fc3eab0029085ab72149a06e951526c8 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 10 Apr 2011 03:35:56 -0500 Subject: [PATCH 3/9] fix a crash with Cursors on ScreenSelectMaster. --- src/ScreenSelectMaster.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ScreenSelectMaster.cpp b/src/ScreenSelectMaster.cpp index 3d76c7cdfa..83276d4e33 100644 --- a/src/ScreenSelectMaster.cpp +++ b/src/ScreenSelectMaster.cpp @@ -755,8 +755,11 @@ float ScreenSelectMaster::DoMenuStart( PlayerNumber pn ) } if( SHOW_CURSOR ) { - m_sprCursor[pn]->PlayCommand( "Choose" ); - fSecs = max( fSecs, m_sprCursor[pn]->GetTweenTimeLeft() ); + if(m_sprCursor[pn] != NULL) + { + m_sprCursor[pn]->PlayCommand( "Choose" ); + fSecs = max( fSecs, m_sprCursor[pn]->GetTweenTimeLeft() ); + } } return fSecs; From 6c52b8479f227bf5d0994df2bbd2a3786e3b5e10 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 10 Apr 2011 03:49:30 -0500 Subject: [PATCH 4/9] line ending blargh --- Themes/themekit/Sounds/_Music title (loop).sm | 10 +++++----- Themes/themekit/_library.txt | 20 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Themes/themekit/Sounds/_Music title (loop).sm b/Themes/themekit/Sounds/_Music title (loop).sm index 283865a6c9..960f7c3767 100644 --- a/Themes/themekit/Sounds/_Music title (loop).sm +++ b/Themes/themekit/Sounds/_Music title (loop).sm @@ -1,5 +1,5 @@ -#TITLE:Break The Sabbath; -#OFFSET:0.000; -#BPMS:0.000=140.000; -#STOPS:; - +#TITLE:Break The Sabbath; +#OFFSET:0.000; +#BPMS:0.000=140.000; +#STOPS:; + diff --git a/Themes/themekit/_library.txt b/Themes/themekit/_library.txt index 1b6b60c1e1..54af4efe66 100644 --- a/Themes/themekit/_library.txt +++ b/Themes/themekit/_library.txt @@ -1,11 +1,11 @@ -=== -COLORS -==== - BACKGROUND -==== - Clear #000000 (Black) - Light #646464 (Grey) - Primary #007cd4 (Slate Blue) - Secondary #a4005d (Slate Purple) - the base is black (#000000) +=== +COLORS +==== + BACKGROUND +==== + Clear #000000 (Black) + Light #646464 (Grey) + Primary #007cd4 (Slate Blue) + Secondary #a4005d (Slate Purple) + the base is black (#000000) === \ No newline at end of file From a14d760e0cf94eaf933e2761ef05bc5331a522bd Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 13 Apr 2011 03:41:09 -0500 Subject: [PATCH 5/9] [ScreenSelectMusic] Made score frame into an AutoActor, changed the filename from "score frame p1" to "ScoreFrame P1" for consistency with other elements. --- Docs/Changelog_sm-ssc.txt | 5 +++++ src/ScreenSelectMusic.cpp | 8 ++++---- src/ScreenSelectMusic.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index fa37556d03..eee6838a0c 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -16,6 +16,11 @@ It depends on who you ask. It could be v1.2.5, it could be v1.3.0, it could even be StepMania 5. We will wait and see. +20110413 +-------- +* [ScreenSelectMusic] Made score frame into an AutoActor, changed the filename + from "score frame p1" to "ScoreFrame P1" for consistency with other elements. [AJ] + 20110405 -------- * [ScreenEdit] Allow modifying the #DISPLAYBPM traits in the editor. Look in diff --git a/src/ScreenSelectMusic.cpp b/src/ScreenSelectMusic.cpp index 14cb6bf61c..422487438c 100644 --- a/src/ScreenSelectMusic.cpp +++ b/src/ScreenSelectMusic.cpp @@ -199,10 +199,10 @@ void ScreenSelectMusic::Init() FOREACH_ENUM( PlayerNumber, p ) { - m_sprHighScoreFrame[p].SetName( ssprintf("ScoreFrameP%d",p+1) ); - m_sprHighScoreFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("score frame p%d",p+1)) ); + m_sprHighScoreFrame[p].Load( THEME->GetPathG(m_sName,ssprintf("ScoreFrame P%d",p+1)) ); + m_sprHighScoreFrame[p]->SetName( ssprintf("ScoreFrameP%d",p+1) ); LOAD_ALL_COMMANDS_AND_SET_XY( m_sprHighScoreFrame[p] ); - this->AddChild( &m_sprHighScoreFrame[p] ); + this->AddChild( m_sprHighScoreFrame[p] ); m_textHighScore[p].SetName( ssprintf("ScoreP%d",p+1) ); m_textHighScore[p].LoadFromFont( THEME->GetPathF(m_sName,"score") ); @@ -247,7 +247,7 @@ void ScreenSelectMusic::BeginScreen() { if( GAMESTATE->IsHumanPlayer(pn) ) continue; - m_sprHighScoreFrame[pn].SetVisible( false ); + m_sprHighScoreFrame[pn]->SetVisible( false ); m_textHighScore[pn].SetVisible( false ); } diff --git a/src/ScreenSelectMusic.h b/src/ScreenSelectMusic.h index 6e75a65b34..1531aa80c8 100644 --- a/src/ScreenSelectMusic.h +++ b/src/ScreenSelectMusic.h @@ -123,7 +123,7 @@ protected: FadingBanner m_Banner; Sprite m_sprCDTitleFront, m_sprCDTitleBack; - Sprite m_sprHighScoreFrame[NUM_PLAYERS]; + AutoActor m_sprHighScoreFrame[NUM_PLAYERS]; BitmapText m_textHighScore[NUM_PLAYERS]; MusicWheel m_MusicWheel; OptionsList m_OptionsList[NUM_PLAYERS]; From 445f9a5e321c5e31a4b568d19f662db6b0915c95 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 16 Apr 2011 21:10:44 -0500 Subject: [PATCH 6/9] * [PlayerOptions] Added UsingReverse() Lua binding (automatically tests GetReverse() == 1) * [PlayerState] Added GetCurrentPlayerOptions() Lua binding --- Docs/Changelog_sm-ssc.txt | 10 ++++++---- src/PlayerOptions.cpp | 2 ++ src/PlayerState.cpp | 7 +++++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index eee6838a0c..9bb703d3d1 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -10,11 +10,13 @@ supported but exist anyways.) _____________________________________________________________________________ ================================================================================ -sm-ssc $NEXTVERSION | 2011???? +sm-ssc v1.2.5 | 201104?? -------------------------------------------------------------------------------- -It depends on who you ask. -It could be v1.2.5, it could be v1.3.0, it could even be StepMania 5. -We will wait and see. + +20110416 +-------- +* [PlayerOptions] Added UsingReverse() Lua binding (automatically tests GetReverse() == 1) [AJ] +* [PlayerState] Added GetCurrentPlayerOptions() Lua binding [AJ] 20110413 -------- diff --git a/src/PlayerOptions.cpp b/src/PlayerOptions.cpp index e91dbb8742..8d1a8199cd 100644 --- a/src/PlayerOptions.cpp +++ b/src/PlayerOptions.cpp @@ -908,6 +908,7 @@ public: // Scroll DEFINE_METHOD( GetReverse, m_fScrolls[PlayerOptions::SCROLL_REVERSE] ) + DEFINE_METHOD( UsingReverse, m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1 ) static int GetReversePercentForColumn( T *p, lua_State *L ) { // todo: make sure IArg is within boundaries -aj @@ -1021,6 +1022,7 @@ public: // Scroll ADD_METHOD( GetReverse ); + ADD_METHOD( UsingReverse ); ADD_METHOD( GetReversePercentForColumn ); ADD_METHOD( GetSplit ); ADD_METHOD( GetAlternate ); diff --git a/src/PlayerState.cpp b/src/PlayerState.cpp index a18e85c3e7..070e96c7be 100644 --- a/src/PlayerState.cpp +++ b/src/PlayerState.cpp @@ -229,6 +229,12 @@ public: LuaHelpers::Push( L, s ); return 1; } + static int GetCurrentPlayerOptions( T* p, lua_State *L ) + { + PlayerOptions po = p->m_PlayerOptions.GetCurrent(); + po.PushSelf(L); + return 1; + } DEFINE_METHOD( GetHealthState, m_HealthState ); LunaPlayerState() @@ -239,6 +245,7 @@ public: ADD_METHOD( GetPlayerOptions ); ADD_METHOD( GetPlayerOptionsArray ); ADD_METHOD( GetPlayerOptionsString ); + ADD_METHOD( GetCurrentPlayerOptions ); ADD_METHOD( GetHealthState ); } }; From 6681e062ddd0034571457469d47a0ee20db8dfe9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 16 Apr 2011 22:03:28 -0500 Subject: [PATCH 7/9] remove some hardcoded SetShadowLength() calls --- src/RoomInfoDisplay.cpp | 1 - src/ScreenGameplay.cpp | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/RoomInfoDisplay.cpp b/src/RoomInfoDisplay.cpp index 86b568612b..847db6846f 100644 --- a/src/RoomInfoDisplay.cpp +++ b/src/RoomInfoDisplay.cpp @@ -179,7 +179,6 @@ void RoomInfoDisplay::SetRoomInfo( const RoomInfo& info) m_playerList[i] = new BitmapText; m_playerList[i]->LoadFromFont( THEME->GetPathF(GetName(),"text") ); m_playerList[i]->SetName("PlayerListElement"); - m_playerList[i]->SetShadowLength( 0 ); m_playerList[i]->SetHorizAlign( align_left ); m_playerList[i]->SetX(PLAYERLISTX + (i * PLAYERLISTOFFSETX)); m_playerList[i]->SetY(PLAYERLISTY + (i * PLAYERLISTOFFSETY)); diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index c9ea70bc6e..e6b84cca04 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -590,7 +590,6 @@ void ScreenGameplay::Init() ASSERT( pi->m_ptextCourseSongNumber == NULL ); pi->m_ptextCourseSongNumber = new BitmapText; pi->m_ptextCourseSongNumber->LoadFromFont( THEME->GetPathF(m_sName,"SongNum") ); - pi->m_ptextCourseSongNumber->SetShadowLength( 0 ); pi->m_ptextCourseSongNumber->SetName( ssprintf("SongNumber%s",pi->GetName().c_str()) ); LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_ptextCourseSongNumber ); pi->m_ptextCourseSongNumber->SetText( "" ); @@ -609,7 +608,6 @@ void ScreenGameplay::Init() ASSERT( pi->m_ptextPlayerOptions == NULL ); pi->m_ptextPlayerOptions = new BitmapText; pi->m_ptextPlayerOptions->LoadFromFont( THEME->GetPathF(m_sName,"player options") ); - pi->m_ptextPlayerOptions->SetShadowLength( 0 ); pi->m_ptextPlayerOptions->SetName( ssprintf("PlayerOptions%s",pi->GetName().c_str()) ); LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_ptextPlayerOptions ); this->AddChild( pi->m_ptextPlayerOptions ); From 222c935c97d46da58a4b24de5e198483dcc24c5f Mon Sep 17 00:00:00 2001 From: Colby Klein Date: Sun, 17 Apr 2011 00:16:20 -0700 Subject: [PATCH 8/9] Fix compiling with build.sh (thanks to Matt1360 for the automake help) --- autoconf/m4/bzip.m4 | 27 +++++++++++++++++++++++++++ configure.ac | 1 + 2 files changed, 28 insertions(+) create mode 100644 autoconf/m4/bzip.m4 diff --git a/autoconf/m4/bzip.m4 b/autoconf/m4/bzip.m4 new file mode 100644 index 0000000000..2f0dfc6490 --- /dev/null +++ b/autoconf/m4/bzip.m4 @@ -0,0 +1,27 @@ +AC_DEFUN([SM_BZIP], +[ + AC_REQUIRE([SM_STATIC]) + AC_CHECK_LIB(bz2, BZ2_bzCompressInit, have_bzip=yes, have_bzip=no) + AC_CHECK_HEADER(bzlib.h, have_bzip_header=yes, have_bzip_header=no) + AC_ARG_WITH(static-bzip, AS_HELP_STRING([--with-static-bzip],[Statically link bzip]), with_static_bzip=$withval, with_static_bzip=no) + + if test "$with_static_bzip" = "yes"; then + LIB_PRE=$START_STATIC + LIB_POST=$END_STATIC + fi + + if test "$have_bzip_header" = "no"; then + have_bzip=no + fi + + if test "$have_bzip" = "no"; then + echo "*** bzip is required to build StepMania; please make sure" + echo "*** that bzip is installed to continue the installation process." + exit 0; + fi + + LIBS="$LIBS $LIB_PRE -lbz2 $LIB_POST" + + LIB_PRE= + LIB_POST= +]) diff --git a/configure.ac b/configure.ac index 2fb749062c..786027c60b 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,7 @@ fi AM_CONDITIONAL(WITHOUT_NETWORKING, test "$with_network" = "no") SM_ZLIB +SM_BZIP SM_AUDIO SM_VIDEO SM_TLS From b687c859bb39aa9797384630d6c3898a7c2e3fd3 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Sun, 17 Apr 2011 16:55:01 +0700 Subject: [PATCH 9/9] this might work for the offsynced keysounds issue. --- src/AutoKeysounds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AutoKeysounds.cpp b/src/AutoKeysounds.cpp index 5118be44fd..5aac67976b 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.GetElapsedTimeFromBeatNoOffset( NoteRowToBeat(iRow) ); + float fSeconds = pSong->m_Timing.GetElapsedTimeFromBeatNoOffset( NoteRowToBeat(iRow) ) + SOUNDMAN->GetPlayLatency(); float fPan = 0; if( !bSoundIsGlobal )