diff options
author | Chris Gianelloni <wolf31o2@gentoo.org> | 2006-12-12 17:51:33 +0000 |
---|---|---|
committer | Chris Gianelloni <wolf31o2@gentoo.org> | 2006-12-12 17:51:33 +0000 |
commit | 8a678c2b5c93c83de35c6da4b3c5d690b633b51c (patch) | |
tree | 2eda6076729ed2c67fff0f75bbe73a28cd2ea759 | |
parent | version bump; now includes rawphoto gimp plugin (diff) | |
download | gentoo-2-8a678c2b5c93c83de35c6da4b3c5d690b633b51c.tar.gz gentoo-2-8a678c2b5c93c83de35c6da4b3c5d690b633b51c.tar.bz2 gentoo-2-8a678c2b5c93c83de35c6da4b3c5d690b633b51c.zip |
Added patch from Charles Christie <sonicbhoc@gmail.com> and closing bug #148781.
(Portage version: 2.1.2_rc2-r2)
-rw-r--r-- | games-arcade/stepmania/ChangeLog | 7 | ||||
-rw-r--r-- | games-arcade/stepmania/files/stepmania-3.9-alias.patch | 149 | ||||
-rw-r--r-- | games-arcade/stepmania/stepmania-3.9.ebuild | 7 |
3 files changed, 159 insertions, 4 deletions
diff --git a/games-arcade/stepmania/ChangeLog b/games-arcade/stepmania/ChangeLog index bd0991afe86a..6eaedc544a39 100644 --- a/games-arcade/stepmania/ChangeLog +++ b/games-arcade/stepmania/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-arcade/stepmania # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-arcade/stepmania/ChangeLog,v 1.15 2006/12/10 21:55:08 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-arcade/stepmania/ChangeLog,v 1.16 2006/12/12 17:51:33 wolf31o2 Exp $ + + 12 Dec 2006; Chris Gianelloni <wolf31o2@gentoo.org> + +files/stepmania-3.9-alias.patch, stepmania-3.9.ebuild: + Added patch from Charles Christie <sonicbhoc@gmail.com> and closing bug + #148781. 10 Dec 2006; Tristan Heaven <nyhm@gentoo.org> stepmania-3.9.ebuild: Fix typo and cleanup, bug #157601 diff --git a/games-arcade/stepmania/files/stepmania-3.9-alias.patch b/games-arcade/stepmania/files/stepmania-3.9-alias.patch new file mode 100644 index 000000000000..17ca00467983 --- /dev/null +++ b/games-arcade/stepmania/files/stepmania-3.9-alias.patch @@ -0,0 +1,149 @@ +diff -u StepMania-3.9-src-orig/src/Difficulty.cpp StepMania-3.9-src/src/Difficulty.cpp +--- StepMania-3.9-src-orig/src/Difficulty.cpp 2004-07-11 09:21:29.000000000 +0200 ++++ StepMania-3.9-src/src/Difficulty.cpp 2006-11-27 00:15:25.000000000 +0100 +@@ -57,7 +57,7 @@ + + CourseDifficulty GetNextShownCourseDifficulty( CourseDifficulty cd ) + { +- for( CourseDifficulty d=(CourseDifficulty)(cd+1); d<NUM_DIFFICULTIES; ((int&)d)++ ) ++ for( CourseDifficulty d=(CourseDifficulty)(cd+1); d<NUM_DIFFICULTIES; enum_add(d, 1) ) + { + if( GAMESTATE->IsCourseDifficultyShown(d) ) + return d; +diff -u StepMania-3.9-src-orig/src/PlayerNumber.cpp StepMania-3.9-src/src/PlayerNumber.cpp +--- StepMania-3.9-src-orig/src/PlayerNumber.cpp 2004-07-18 00:15:39.000000000 +0200 ++++ StepMania-3.9-src/src/PlayerNumber.cpp 2006-11-27 00:15:25.000000000 +0100 +@@ -22,41 +22,33 @@ + + PlayerNumber GetNextHumanPlayer( PlayerNumber pn ) + { +- for( PlayerNumber p=(PlayerNumber)(pn+1); p<NUM_PLAYERS; ((int&)p)++ ) +- { +- if( GAMESTATE->IsHumanPlayer(p) ) +- return p; +- } ++ for( enum_add(pn, 1); pn < NUM_PLAYERS; enum_add(pn, 1) ) ++ if( GAMESTATE->IsHumanPlayer(pn) ) ++ return pn; + return PLAYER_INVALID; + } + + PlayerNumber GetNextEnabledPlayer( PlayerNumber pn ) + { +- for( PlayerNumber p=(PlayerNumber)(pn+1); p<NUM_PLAYERS; ((int&)p)++ ) +- { +- if( GAMESTATE->IsPlayerEnabled(p) ) +- return p; +- } ++ for( enum_add(pn, 1); pn < NUM_PLAYERS; enum_add(pn, 1) ) ++ if( GAMESTATE->IsPlayerEnabled(pn) ) ++ return pn; + return PLAYER_INVALID; + } + + PlayerNumber GetNextCpuPlayer( PlayerNumber pn ) + { +- for( PlayerNumber p=(PlayerNumber)(pn+1); p<NUM_PLAYERS; ((int&)p)++ ) +- { +- if( GAMESTATE->IsCpuPlayer(p) ) +- return p; +- } ++ for( enum_add(pn, 1); pn < NUM_PLAYERS; enum_add(pn, 1) ) ++ if( GAMESTATE->IsCpuPlayer(pn) ) ++ return pn; + return PLAYER_INVALID; + } + + PlayerNumber GetNextPotentialCpuPlayer( PlayerNumber pn ) + { +- for( PlayerNumber p=(PlayerNumber)(pn+1); p<NUM_PLAYERS; ((int&)p)++ ) +- { +- if( !GAMESTATE->IsHumanPlayer(p) ) +- return p; +- } ++ for( enum_add(pn, 1); pn < NUM_PLAYERS; enum_add(pn, 1) ) ++ if( !GAMESTATE->IsHumanPlayer(pn) ) ++ return pn; + return PLAYER_INVALID; + } + +diff -u StepMania-3.9-src-orig/src/RageUtil.h StepMania-3.9-src/src/RageUtil.h +--- StepMania-3.9-src-orig/src/RageUtil.h 2004-10-07 19:56:16.000000000 +0200 ++++ StepMania-3.9-src/src/RageUtil.h 2006-11-27 00:15:25.000000000 +0100 +@@ -53,6 +53,14 @@ + return false; + } + ++template<class T> ++inline bool ENUM_CLAMP( T &x, T l, T h ) ++{ ++ if (x > h) { x = h; return true; } ++ else if (x < l) { x = l; return true; } ++ return false; ++} ++ + inline void wrap( int &x, int n) + { + if (x<0) +diff -u StepMania-3.9-src-orig/src/ScreenBookkeeping.cpp StepMania-3.9-src/src/ScreenBookkeeping.cpp +--- StepMania-3.9-src-orig/src/ScreenBookkeeping.cpp 2004-08-22 18:28:19.000000000 +0200 ++++ StepMania-3.9-src/src/ScreenBookkeeping.cpp 2006-11-27 00:15:25.000000000 +0100 +@@ -74,14 +74,14 @@ + void ScreenBookkeeping::MenuLeft( PlayerNumber pn ) + { + m_View = (View)(m_View-1); +- CLAMP( (int&)m_View, 0, NUM_VIEWS-1 ); ++ ENUM_CLAMP( m_View, View(0), View(NUM_VIEWS-1) ); + ChangeView( m_View ); + } + + void ScreenBookkeeping::MenuRight( PlayerNumber pn ) + { + m_View = (View)(m_View+1); +- CLAMP( (int&)m_View, 0, NUM_VIEWS-1 ); ++ ENUM_CLAMP( m_View, View(0), View(NUM_VIEWS-1) ); + ChangeView( m_View ); + } + +diff -u StepMania-3.9-src-orig/src/ScreenSetTime.cpp StepMania-3.9-src/src/ScreenSetTime.cpp +--- StepMania-3.9-src-orig/src/ScreenSetTime.cpp 2004-08-31 10:29:34.000000000 +0200 ++++ StepMania-3.9-src/src/ScreenSetTime.cpp 2006-11-27 00:15:25.000000000 +0100 +@@ -160,7 +160,7 @@ + SetTimeSelection OldSelection = m_Selection; + enum_add<SetTimeSelection>( m_Selection, iDirection ); + +- CLAMP( (int&)m_Selection, 0, NUM_SET_TIME_SELECTIONS-1 ); ++ ENUM_CLAMP( m_Selection, SetTimeSelection(0), SetTimeSelection(NUM_SET_TIME_SELECTIONS-1) ); + if( iDirection != 0 && m_Selection == OldSelection ) + return; // can't move any more + +diff -u StepMania-3.9-src-orig/src/Song.cpp StepMania-3.9-src/src/Song.cpp +--- StepMania-3.9-src-orig/src/Song.cpp 2004-12-20 23:25:12.000000000 +0100 ++++ StepMania-3.9-src/src/Song.cpp 2006-11-27 00:15:25.000000000 +0100 +@@ -916,22 +916,22 @@ + if( pSteps ) + return pSteps; + newDC = (Difficulty)(dc-1); +- CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); ++ ENUM_CLAMP( newDC, Difficulty(0), Difficulty(NUM_DIFFICULTIES-1) ); + pSteps = GetStepsByDifficulty( st, newDC ); + if( pSteps ) + return pSteps; + newDC = (Difficulty)(dc+1); +- CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); ++ ENUM_CLAMP( newDC, Difficulty(0), Difficulty(NUM_DIFFICULTIES-1) ); + pSteps = GetStepsByDifficulty( st, newDC ); + if( pSteps ) + return pSteps; + newDC = (Difficulty)(dc-2); +- CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); ++ ENUM_CLAMP( newDC, Difficulty(0), Difficulty(NUM_DIFFICULTIES-1) ); + pSteps = GetStepsByDifficulty( st, newDC ); + if( pSteps ) + return pSteps; + newDC = (Difficulty)(dc+2); +- CLAMP( (int&)newDC, 0, NUM_DIFFICULTIES-1 ); ++ ENUM_CLAMP( newDC, Difficulty(0), Difficulty(NUM_DIFFICULTIES-1) ); + pSteps = GetStepsByDifficulty( st, newDC ); + return pSteps; + } diff --git a/games-arcade/stepmania/stepmania-3.9.ebuild b/games-arcade/stepmania/stepmania-3.9.ebuild index c60bed52fb4f..5f989bc85b64 100644 --- a/games-arcade/stepmania/stepmania-3.9.ebuild +++ b/games-arcade/stepmania/stepmania-3.9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-arcade/stepmania/stepmania-3.9.ebuild,v 1.7 2006/12/10 21:55:08 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-arcade/stepmania/stepmania-3.9.ebuild,v 1.8 2006/12/12 17:51:33 wolf31o2 Exp $ WANT_AUTOCONF=latest inherit eutils autotools games @@ -48,8 +48,9 @@ src_unpack() { "${FILESDIR}/${P}"-64bits.patch \ "${FILESDIR}/${P}"-ffmpeg.patch \ "${FILESDIR}/${P}"-vorbis.patch \ - "${FILESDIR}"/${P}-sdl.patch \ - "${FILESDIR}/${P}"-alsa.patch + "${FILESDIR}/${P}"-sdl.patch \ + "${FILESDIR}/${P}"-alsa.patch \ + "${FILESDIR}/${P}"-alias.patch eautoconf } |