diff options
Diffstat (limited to 'games-puzzle')
-rw-r--r-- | games-puzzle/tong/ChangeLog | 7 | ||||
-rw-r--r-- | games-puzzle/tong/files/tong-1.0-fps.patch | 25 | ||||
-rw-r--r-- | games-puzzle/tong/files/tong-1.0-makefile.patch (renamed from games-puzzle/tong/files/1.0-makefile.patch) | 0 | ||||
-rw-r--r-- | games-puzzle/tong/tong-1.0.ebuild | 20 |
4 files changed, 41 insertions, 11 deletions
diff --git a/games-puzzle/tong/ChangeLog b/games-puzzle/tong/ChangeLog index 7a13dbaabc93..84446011c476 100644 --- a/games-puzzle/tong/ChangeLog +++ b/games-puzzle/tong/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-puzzle/tong # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tong/ChangeLog,v 1.6 2009/02/10 16:32:32 tupone Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tong/ChangeLog,v 1.7 2009/04/06 21:57:42 mr_bones_ Exp $ + + 06 Apr 2009; Michael Sterrett <mr_bones_@gentoo.org> + +files/tong-1.0-fps.patch, -files/1.0-makefile.patch, + +files/tong-1.0-makefile.patch, tong-1.0.ebuild: + add fps limiting patch from Rudi Lippert (bug #196013) 10 Feb 2009; Alfredo Tupone <tupone@gentoo.org> files/1.0-makefile.patch: Fix --as-needed bug #247448 by flameeyes@gentoo.org diff --git a/games-puzzle/tong/files/tong-1.0-fps.patch b/games-puzzle/tong/files/tong-1.0-fps.patch new file mode 100644 index 000000000000..59c1244d3537 --- /dev/null +++ b/games-puzzle/tong/files/tong-1.0-fps.patch @@ -0,0 +1,25 @@ +--- tong.cpp.ori 2007-10-15 19:27:54.000000000 +0200 ++++ tong.cpp 2007-10-15 19:36:51.000000000 +0200 +@@ -54,6 +54,8 @@ + #define MENUMOUSE_THRESHOLD 40 + #define DEMO_TIME 8000 + ++#define MIN_TIME 45 ++ + bool drop_piece(Tetrad*, Tetrad*, Bucket*, Uint32&, bool&, bool&, Option*, + int&); + +@@ -1979,6 +1981,13 @@ + SDL_Flip(screen); + lastlastupdate=lastupdate; + lastupdate=SDL_GetTicks(); ++ ++ // limit to 1000/MIN_TIME fps ++ if (lastupdate-lastlastupdate < MIN_TIME) { ++ SDL_Delay(MIN_TIME - (lastupdate - lastlastupdate)); ++ } ++ lastupdate = SDL_GetTicks(); ++ + } //main game loop + + if(Mix_PlayingMusic()) { diff --git a/games-puzzle/tong/files/1.0-makefile.patch b/games-puzzle/tong/files/tong-1.0-makefile.patch index 4c7fc65fc103..4c7fc65fc103 100644 --- a/games-puzzle/tong/files/1.0-makefile.patch +++ b/games-puzzle/tong/files/tong-1.0-makefile.patch diff --git a/games-puzzle/tong/tong-1.0.ebuild b/games-puzzle/tong/tong-1.0.ebuild index 7b783263de71..3e609526a04e 100644 --- a/games-puzzle/tong/tong-1.0.ebuild +++ b/games-puzzle/tong/tong-1.0.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tong/tong-1.0.ebuild,v 1.5 2008/02/29 19:29:34 carlo Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tong/tong-1.0.ebuild,v 1.6 2009/04/06 21:57:42 mr_bones_ Exp $ +EAPI=2 inherit eutils games DESCRIPTION="Tetris and Pong in the same place at the same time" @@ -14,14 +15,13 @@ KEYWORDS="amd64 ~ppc x86" IUSE="" DEPEND="media-libs/libsdl - media-libs/sdl-image - media-libs/sdl-mixer" + media-libs/sdl-image[png] + media-libs/sdl-mixer[vorbis]" -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}/${PV}-makefile.patch" +src_prepare() { + epatch \ + "${FILESDIR}/${P}-makefile.patch" \ + "${FILESDIR}/${P}-fps.patch" sed -i \ -e "s:\"media/:\"${GAMES_DATADIR}/${PN}/media/:" \ media.cpp option.cpp option.h pong.cpp tetris.cpp text.cpp \ @@ -35,7 +35,7 @@ src_install() { cp -r media/ "${D}/${GAMES_DATADIR}/${PN}" || die "cp failed" dodoc CHANGELOG README making-of.txt CREDITS - make_desktop_entry tong TONG ${PN} + make_desktop_entry tong TONG doicon "${T}/${PN}.png" prepgamesdirs } |