debian/0000755000000000000000000000000011677771751007211 5ustar debian/fretsonfire-game.docs0000644000000000000000000000005111004520004013253 0ustar readme.txt todo.txt debian/README.Debian debian/fretsonfire.xpm0000644000000000000000000001037311004520004012230 0ustar /* XPM */ static char * fretsonfire_xpm[] = { "31 32 136 2", " c None", ". c #FF1100", "+ c #FF2E00", "@ c #FF1200", "# c #FF1300", "$ c #FF1400", "% c #FF3800", "& c #FF3C00", "* c #FF2A00", "= c #FF1E00", "- c #FF1500", "; c #FF1F00", "> c #FF1D00", ", c #FF2300", "' c #FF2400", ") c #FF2C00", "! c #FF3E00", "~ c #FF3D00", "{ c #FF3B00", "] c #FF3F00", "^ c #FF4500", "/ c #FF4700", "( c #FF4400", "_ c #FF3A00", ": c #FF2D00", "< c #FF2700", "[ c #FF2100", "} c #FF2200", "| c #FF1C00", "1 c #FF2800", "2 c #FF3500", "3 c #FF3400", "4 c #FF3900", "5 c #FF4200", "6 c #FF3700", "7 c #FF3300", "8 c #FF3200", "9 c #FF4900", "0 c #FF4B00", "a c #FF4800", "b c #FF4C00", "c c #FF4100", "d c #FF4300", "e c #FF4000", "f c #FF5400", "g c #FF5900", "h c #FF5D00", "i c #FF6500", "j c #FF5200", "k c #FF5800", "l c #FF6600", "m c #FF6A00", "n c #FF6C00", "o c #FF7200", "p c #FF5B00", "q c #FF6800", "r c #FF7100", "s c #FF7900", "t c #FF7B00", "u c #FF7F00", "v c #FF7000", "w c #FF8400", "x c #FF8800", "y c #FF8600", "z c #FF8F00", "A c #FF7A00", "B c #FF9200", "C c #FF9700", "D c #FF9600", "E c #FFA300", "F c #FFA500", "G c #FF9500", "H c #FFA800", "I c #FFA700", "J c #FFBE00", "K c #FFB200", "L c #FF9900", "M c #FFB600", "N c #FFB500", "O c #FFB100", "P c #FFD000", "Q c #FFC300", "R c #FFBA00", "S c #FF8700", "T c #FF9E00", "U c #FFC000", "V c #FFBF00", "W c #FFD500", "X c #FFC900", "Y c #FFC100", "Z c #FFCA00", "` c #FFE300", " . c #FFD900", ".. c #FFD100", "+. c #FFC700", "@. c #FFD400", "#. c #FFD600", "$. c #FFD200", "%. c #FFDA00", "&. c #FFDC00", "*. c #FFD700", "=. c #FFAD00", "-. c #FFCF00", ";. c #FF9F00", ">. c #FFCE00", ",. c #FF9100", "'. c #FFC200", "). c #FFBB00", "!. c #FFBD00", "~. c #FFB300", "{. c #FF8C00", "]. c #FFA200", "^. c #FFAC00", "/. c #FFA100", "(. c #FF8E00", "_. c #FFA600", ":. c #FF9C00", "<. c #FF9000", "[. c #FF8000", "}. c #FF7800", "|. c #FF8500", "1. c #FF7D00", "2. c #FF5A00", "3. c #FF6F00", "4. c #FF7500", "5. c #FF7300", "6. c #FF6300", "7. c #FF6100", "8. c #FF5300", "9. c #FF4F00", "0. c #FF3600", "a. c #FF2B00", "b. c #FF3000", "c. c #FF3100", "d. c #FF1800", "e. c #FF1A00", " . . ", " . . . ", " . + @ . . . ", " # $ % & * = - $ # ", " ; > , ' ) ! ~ { ] ^ / ( _ : < [ } | ", " 1 * 2 3 2 4 ~ & ! 5 & & ] & 6 7 7 8 8 [ ", " 7 ! ! ( 9 0 a a b / 5 c c c d d d ~ ", " e b f g h i j j j ( ", " k l m n o h p ", " q r s t u ", " v w x y z ", " A B C D E F ", " G H I I J K ", " L M N O P Q R ", " S T U V M W X Y ", " B H Z Z Q ` ...+. ", " I Q @.#.$.@.%.&. .*.X ", " =.W #.#...-.@.*.*.#.+. ", " ;.X >.X Q P >.>.Y ", " ,.M '.).K Y !.~. ", " {.].N ^./. ", " (._.:.<. ", " [.D z y ", " }.y |.1. ", " 2.3.4.4.5. ", " 4 ~ j 6.i 6.7. ", " 8 & e a 8.f 8.9. j ", " ) 0.3 4 ] ( 5 ] c d ", " [ ) : a.b.7 b.c.3 3 ", " d.e.| = ; [ } , , ", " ", " "}; debian/README.Debian0000644000000000000000000000335411004520004011216 0ustar fretsonfire for Debian ---------------------- Frets on Fire has a number of ways to acquire songs to play. It has a built in editor and a function to import tracks from the popular Guitar Hero games for the Sony PlayStation 2 (the importer does not yet work with the X-Box version) To play Frets on Fire you will need working sound and an OpenGL-capable graphics card. X must be configured with OpenGL. There are also songs available in the fretsonfire-songs packages. Due to licencing restrictions from the Finnish copyright association (Teosto), Debian cannot ship the songs written by the authors of Frets on Fire. Therefore, the Debian version of Frets on Fire has had the tracks replaced with free ones. Much thanks goes to Carlos Viola Iborra for providing the songs in the fretsonfire-songs-sectoid package under an open source licence. The original tracks can still be downloaded from http://fretsonfire.sourceforge.net and other tracks can be found on the community website http://www.keyboardsonfire.net/. Downloaded tracks should be unzipped into $HOME/.fretsonfire/songs/ The fonts that were originally distributed with the game have been removed: * Font data/title.ttf, copyright by Astigmatic One Eye. * Font data/default.ttf, copyright by 1001 Free Fonts. * Font data/international.ttf, copyright by Bitstream Vera. The game is distributed by upstream in two different tarball files, one containing the precompiled game along with the data and the songs, and the other one containing only the sources. Both the data (excluding the songs and the font files mentioned above) and the program are distributed under the GNU General Public License. -- Matthew Johnson Fri, 11 May 2007 15:08:03 +0100 debian/control0000644000000000000000000000363611677763751010625 0ustar Source: fretsonfire Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Matthew Johnson , Miriam Ruiz , David Martínez Martí , Barry deFreese Build-Depends: debhelper (>= 5) Build-Depends-Indep: python, python-support (>= 0.4), docbook-to-man Standards-Version: 3.8.3 Homepage: http://fretsonfire.sourceforge.net/ Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/fretsonfire/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/fretsonfire/?op=log Package: fretsonfire Architecture: all Depends: fretsonfire-game, fretsonfire-songs-sectoid, fretsonfire-songs-muldjord, ${misc:Depends} Description: game of musical skill and fast fingers A game of musical skill and fast fingers. The aim of the game is to play guitar with the keyboard as accurately as possible. . Players must press buttons to keep in time with the rhythm of the music, shown by markers on screen. An official online high score list allows players to show off their skills to competitors around the globe. . The game comes with an easy to understand tutorial to get players started, and a song editor lets players edit and compose songs for use in the game. Package: fretsonfire-game Architecture: all Depends: ${python:Depends}, python-pygame, python-opengl, python-imaging, python-ogg, python-pyvorbis, ${misc:Depends}, ttf-dejavu, fonts-mgopen Recommends: fretsonfire-songs-sectoid, fretsonfire-songs-muldjord Suggests: vorbis-tools Description: game of musical skill and fast fingers - Game files A game of musical skill and fast fingers. The aim of the game is to play guitar with the keyboard as accurately as possible. . This is the package containing the game executable code. You will need working sound and a 3D capable graphics card. debian/fretsonfire-game.install0000644000000000000000000000120311004520004013771 0ustar # Data data/*.ini data/*.svg data/*.png data/*.ogg data/*.dae data/*.txt usr/share/games/fretsonfire/data translations/*.mo usr/share/games/fretsonfire/data/translations data/mods/Chilly data/mods/LightGraphics usr/share/games/fretsonfire/data/mods data/songs/tutorial usr/share/games/fretsonfire/data/songs # Source src/*py src/*pot usr/share/games/fretsonfire/game src/midi/*py usr/share/games/fretsonfire/game/midi # Wrapper and icons fretsonfire usr/games debian/fretsonfire.xpm usr/share/pixmaps fretsonfire.png usr/share/icons/hicolor/48x48/apps fretsonfire.png usr/share/pixmaps debian/fretsonfire-game.desktop usr/share/applications debian/watch0000644000000000000000000000016311152411362010213 0ustar version=3 opts=dversionmangle=s/\.dfsg.*// \ http://sf.net/fretsonfire/FretsOnFire-src-(.*).tar.gz debian uupdate debian/changelog0000644000000000000000000001525111677771703011064 0ustar fretsonfire (1.3.110.dfsg-3) unstable; urgency=low * Team upload. [ Paul Wise ] * Fix hard-coded symlink to the mgopen font (Closes: #653657) * Switch from ttf-mgopen to fonts-mgopen * Drop dependency on libgl1-mesa-dev since it is no longer needed (Closes: #561314, #561985) * FoF is implemented in python, no need for ${shlibs:Depends} * Add missing ${misc:Depends} to fretsonfire Depends * Switch to dpkg-source v3 instead of manual patching using quilt * Don't need python-dev in build-deps, switch to python * Clean up the patches and add DEP-3 headers to them * Link to the correct version of the GPL [ Andrew Higginson ] * Better description for package 'fretsonfire' describing gameplay, included applications etc. and removing non-user-friendly 'this is a metapackage...' (LP: #599525) (Closes: #587621) -- Paul Wise Sun, 01 Jan 2012 13:48:45 +0800 fretsonfire (1.3.110.dfsg-2) unstable; urgency=low [ Matthew Johnson ] * Change credits to use sectoid/Feelings instead of defy. (Closes: #526399) + I'd like to ignore the error / have no music, + but that doesn't seem to work. I can't figure out how to + catch the exception. [ Barry deFreese ] * Add myself to uploaders. * Remove python-numpy and python-numeric depends. (Closes: #547960). * Add depends on libgl1-mesa-dev for now. (Closes: #524731). * Add README.source for quilt patch system. * Clean up some syntax in debian/copyright. * Bump Standards Version to 3.8.3. (No changes needed). -- Barry deFreese Wed, 21 Oct 2009 16:57:43 -0400 fretsonfire (1.3.110.dfsg-1) unstable; urgency=low [ Ansgar Burchardt ] * python-pyogg was renamed into python-ogg, update dependencies accordingly (Closes: #494893) [ Peter De Wachter ] * Fixed watch file. [ Matthew Johnson ] * New upstream release (Closes: #516912) - Rewrote get-orig-source for new source format - Removed png-generation from debian/rules since they are provided upstream - Removed patches svg.patch, stage.ini.patch and fix_glow_svg.patch because they are obsolete - Removed build-deps on inkscape and *sdl*, since we are not converting svgs any more * Add Depends/Recommends on fretsonfire-songs-muldjord -- Matthew Johnson Mon, 02 Mar 2009 23:17:47 +0000 fretsonfire (1.2.512.dfsg-3) unstable; urgency=low [ Miriam Ruiz ] * Added David Martínez Martí as comaintainer. [ David Martínez Martí ] * Added fix_glow_svg.patch to fix bug in glow.svg * Added keep_sound_when_failed.patch si that the sound does not disappear completely when you fail a note and there's no base soundtrack -- Miriam Ruiz Wed, 23 Jul 2008 19:45:04 +0200 fretsonfire (1.2.512.dfsg-2) unstable; urgency=low * Added fonts_lower_cpu.patch to reduce CPU consumption. Closes: #462624 Thanks to David Martínez Martí * Added patch: fix_window_height_bug.patch to fix a bug calculating window size when the orthogonal projection window is set. Thanks to David Martínez Martí -- Miriam Ruiz Tue, 22 Jul 2008 12:38:20 +0200 fretsonfire (1.2.512.dfsg-1) unstable; urgency=low [ Miriam Ruiz ] * New Upstream Release. * Removed old Spanish translations. The ones from upstream are up-to-date now. * Refreshed patch typeerror.patch * Standards-Version set to 3.8.0 * Added call to dh_desktop in debian/rules. * Added check in debian/rules to make sure that the images have been successfully converted from svg to png files. [ Matthew Johnson ] * Correct obvious inaccuracies in man page. * Add dependency on python-numty * Enable use of cached png files * Add patch reverting Font.py changes to make text render * Use ttf-dejavu instead of ttf-bitstream-vera (Closes: #455580) * Reformat Depends: to be more readable * Compress using bzip2 * Apply stage.ini patch from Sami [ Jon Dowland ] * Add Homepage: control field to source stanza * Remove a bashism from the clean target (Closes: #462237) [ Ansgar Burchardt ] * Remove deprecated Encoding key from .desktop file * debian/control: Change XS-Vcs-* to Vcs-* -- Miriam Ruiz Tue, 22 Jul 2008 12:12:09 +0200 fretsonfire (1.2.451.dfsg-2) unstable; urgency=low [ Matthew Johnson ] * Update debian/copyright to be utf8 * reformat README.Debian-source to be 80 characters/line * Added watch file * Fixed stage.ini so that lights are smaller (only a problem with the pngs) (Closes: #428350) * Depend on python-pyvorbis (Closes: #427579) * Add note to README.Debian and long description that FoF won't work without proper GL support. * Add note to README.Debian that only PS2 importing is supported (Closes: #428346) * Update menu to format menu-2, change menu section as-per menu transition [ Gonéri Le Bouder ] * fixed the watch file [Miriam Ruiz] * Updated Sami's address in debian/copyright * Added patch to fix a crashing on startup due to wrong type. Closes: #437330 -- Miriam Ruiz Sat, 01 Sep 2007 17:46:06 +0000 fretsonfire (1.2.451.dfsg-1) unstable; urgency=low [ Matthew Johnson ] * DFSG version/tarball (remove songs and fonts) * Add depends on python-pyogg, new version needs it * Add recommends on fretsonfire-songs-sectoid * Rewrite get-orig-source to use makefile targets * Add depends on ttf-bitstream-vera and ttf-mgopen * Patch Svg.py no to try and initialise amanith * Rename game package to fretsonfire-game * Add fretsonfire metapackage * Create xpm * Move installation to .install * Remove lintian-override * Added and install .desktop file [ Miriam Ruiz ] * Fetch translation sources from SVN in get-orig-source * Added translations to the building system * New Spanish translations -- Matthew Johnson Thu, 24 May 2007 13:18:11 +0100 fretsonfire (1.2.451-1) unstable; urgency=low [ Miriam Ruiz ] * New Upstream Version. * Added vorbis-tools to Suggests. * Updated copyright notices. -- Miriam Ruiz Sat, 28 Apr 2007 16:40:28 +0200 fretsonfire (1.1.324-1) unstable; urgency=low [ Miriam Ruiz ] * Initial release (Closes: #383316) [ Matthew Johnson ] * Update packaging - add manpages - clean up debian directory - add wrapper executable - add menu entry - add icon - fix lintian errors - use install -m rather than cp -a to ensure correct mode for installed files * Change maintainer and Uploaders * Add suggests on vorbis-tools -- Matthew Johnson Tue, 17 Apr 2007 08:35:02 +0100 debian/README.Debian-source0000644000000000000000000000102011004520004012500 0ustar The fretsonfire source package has to be rebuilt to deal with a few DFSG problems: 1. The songs supplied with the game are not DFSG (no separate redistribution or modification). These have been removed. 2. The fonts supplied are not Open. These have been removed. They are replaced by symlinks to other packages in debian/rules Other things which are done: - turn off the executable bit on files (probably uploaded from windows) The dfsg source can be obtained from debian/rules get-orig-source. Matt debian/fretsonfire-game.dirs0000644000000000000000000000013611004520004013270 0ustar usr/games usr/share/games/fretsonfire/data usr/share/games/fretsonfire/game usr/share/pixmaps debian/source/0000755000000000000000000000000011677771751010511 5ustar debian/source/format0000644000000000000000000000001411677763421011712 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000304411677766474011153 0ustar This package was debianized by Miriam Ruiz on Thu, 12 Oct 2006 21:05:58 +0200. It was downloaded from http://sourceforge.net/projects/fretsonfire/ Upstream Authors: "Sami Kyöstilä" "Joonas Kerttula" "Tommi Inkilä" Copyright: All source code and data files are Copyright (C) 2006 by Sami Kyöstilä, Tommi Inkilä, Joonas Kerttula. This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is Copyright (C) 2006-2007, Miriam Ruiz and Matthew Johnson , and is licensed under the GPL. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/fretsonfire-game.desktop0000644000000000000000000000055011164374071014022 0ustar [Desktop Entry] Name=Frets on Fire Name[en_GB]=Frets on Fire Comment=Rock out with your keyboard Comment[ca]=Toca la guitarra amb el teclat Comment[en_GB]=Rock out with your keyboard Comment[es]=Toca la guitarra con tu teclado Comment[gl]=Toca a guitarra co teclado Exec=fretsonfire Icon=fretsonfire Terminal=false Type=Application Categories=Game;ArcadeGame; debian/compat0000644000000000000000000000000211004520004010346 0ustar 5 debian/patches/0000755000000000000000000000000011677771751010640 5ustar debian/patches/series0000644000000000000000000000022411202044557012030 0ustar datapath.patch typeerror.patch font-revert.patch fonts_lower_cpu.patch fix_window_height_bug.patch keep_sound_when_failed.patch credits_music.patch debian/patches/keep_sound_when_failed.patch0000644000000000000000000000077311677766313016347 0ustar Author: David Martinez Marti License: GNU GPL, see /usr/share/common-licenses/GPL Description: Ensure that the sound does not disappear completely when you fail a note and there's no base soundtrack Last-Update: 2008-07-23 --- a/src/Song.py +++ b/src/Song.py @@ -525,6 +525,8 @@ self.engine.audio.unpause() def setGuitarVolume(self, volume): + if not self.rhythmTrack: + volume+=0.1 if self.guitarTrack: self.guitarTrack.setVolume(volume) else: debian/patches/fonts_lower_cpu.patch0000644000000000000000000000603311677766272015075 0ustar Author: David Martinez Marti License: GNU GPL, see /usr/share/common-licenses/GPL Description: Reduce CPU consumption with fonts Bug-Debian: http://bugs.debian.org/462624 Last-Update: 2008-07-22 --- a/src/Font.py +++ b/src/Font.py @@ -107,30 +107,42 @@ scale *= self.scale glPushMatrix() glTranslatef(pos[0], pos[1], 0) - + if self.reversed: text = "".join(reversed(text)) if self.outline: + #outline_list=[(-.7, -.7), (0, -1), (.7, -.7), (-1, 0), (1, 0), (-.7, .7), (0, 1), (.7, .7)] + #outline_list=[(-.7, -.7), (.7, -.7), (-.7, .7), (.7, .7)] + outline_list=[(.7, .7)] glPushAttrib(GL_CURRENT_BIT) glPushMatrix() - glColor4f(0, 0, 0, .25 * glGetDoublev(GL_CURRENT_COLOR)[3]) + glColor4f(0, 0, 0, glGetDoublev(GL_CURRENT_COLOR)[3]/len(outline_list)) for ch in text: g = self.getGlyph(ch) w, h = self.getStringSize(ch, scale = scale) tw, th = g.size - - glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)]) - glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)]) - g.bind() - - blur = 2 * 0.002 - for offset in [(-.7, -.7), (0, -1), (.7, -.7), (-1, 0), (1, 0), (-.7, .7), (0, 1), (.7, .7)]: - glPushMatrix() - glTranslatef( blur * offset[0], blur * offset[1], 0) - glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3]) - glPopMatrix() + + glPushMatrix() + + blur = 2 * 0.003 + + glPopMatrix() + + for offset in outline_list: + glPushMatrix() + glTranslatef( blur * offset[0], blur * offset[1], 0) + glBegin (GL_TRIANGLE_STRIP) + glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0) + glTexCoord2f (tw, th); glVertex2f (w, 0.0) + glTexCoord2f (tw, 0.0); glVertex2f (w, h) + glTexCoord2f (0.0, 0.0); glVertex2f (0.0, h) + glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0) + glEnd() + + glPopMatrix() + glTranslatef(w * direction[0], w * direction[1], @@ -144,11 +156,20 @@ w, h = self.getStringSize(ch, scale = scale) tw, th = g.size - glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)]) - glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)]) + #glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)]) + #glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)]) g.bind() - glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3]) + + #glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3]) + + glBegin (GL_TRIANGLE_STRIP) + glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0) + glTexCoord2f (tw, th); glVertex2f (w, 0.0) + glTexCoord2f (tw, 0.0); glVertex2f (w, h) + glTexCoord2f (0.0, 0.0); glVertex2f (0.0, h) + glTexCoord2f (0.0, th); glVertex2f (0.0, 0.0) + glEnd() glTranslatef(w * direction[0], w * direction[1], debian/patches/credits_music.patch0000644000000000000000000000221711677766144014520 0ustar Author: Matthew Johnson Description: This using sectoid/Feelings instead of defy as the song for the credits. I'd like to ignore errors / disable music there, since we can't guarantee that even Feelings will be available, but I can't figure out how to catch the exception this bit of code is throwing. Bug-Debian: http://bugs.debian.org/526399 Last-Update: 2009-05-02 --- a/src/Credits.py +++ b/src/Credits.py @@ -91,8 +91,8 @@ self.engine = engine self.time = 0.0 self.offset = 1.0 - self.songLoader = self.engine.resource.load(self, "song", lambda: Song.loadSong(self.engine, "defy", playbackOnly = True), - onLoad = self.songLoaded) + self.songLoader = self.engine.resource.load(self, "song", lambda: Song.loadSong(self.engine, "sectoid/Feelings", playbackOnly = True), + onLoad = self.songLoaded) self.engine.loadSvgDrawing(self, "background1", "editor.svg") self.engine.loadSvgDrawing(self, "background2", "keyboard.svg") self.engine.loadSvgDrawing(self, "background3", "cassette.svg") debian/patches/datapath.patch0000644000000000000000000000061711677764665013461 0ustar Author: Miriam Ruiz License: GNU GPL, see /usr/share/common-licenses/GPL Description: Set the correct data path Last-Update: 2007-09-01 --- a/src/Version.py +++ b/src/Version.py @@ -43,6 +43,6 @@ else: dataPath = "data" else: - dataPath = os.path.join("..", "data") + dataPath = os.path.join("/usr/share/games/fretsonfire", "data") return dataPath debian/patches/fix_window_height_bug.patch0000644000000000000000000000106711677766206016226 0ustar Author: David Martinez Marti License: GNU GPL, see /usr/share/common-licenses/GPL Description: fix a bug calculating window size when the orthogonal projection window is set. Last-Update: 2008-07-22 --- a/src/View.py +++ b/src/View.py @@ -139,7 +139,7 @@ w = int ( viewport[2] - viewport[0] ) h = int ( viewport[3] - viewport[1] ) # aspect ratio correction - h *= int((float(w) / float(h)) / (4.0 / 3.0)) + h *= float((float(w) / float(h)) / (4.0 / 3.0)) viewport = [0, 0, 1, h / w] if yIsDown: debian/patches/typeerror.patch0000644000000000000000000000301011677766334013707 0ustar Author: Andreas Henriksson License: GNU GPL, see /usr/share/common-licenses/GPL Description: Fixes crashing on startup due to wrong types Bug-Debian: http://bugs.debian.org/437330 Last-Update: 2007-11-20 --- a/src/DummyAmanith.py +++ b/src/DummyAmanith.py @@ -42,7 +42,9 @@ pass def SetViewport(self, x, y, w, h): - glViewport(int(x), int(y), int(w), int(h)) + glw = int(w) + glh = int(h) + glViewport(int(x), int(y), int(glw), int(glh)) def SetProjection(self, left, right, bottom, top): glMatrixMode(GL_PROJECTION) --- a/src/GameEngine.py +++ b/src/GameEngine.py @@ -165,7 +165,9 @@ geometry = (0, 0, w, h) self.svg = SvgContext(geometry) self.svg.setRenderingQuality(self.config.get("opengl", "svgquality")) - glViewport(int(viewport[0]), int(viewport[1]), int(viewport[2]), int(viewport[3])) + glw = int(viewport[2]) + glh = int(viewport[3]) + glViewport(int(viewport[0]), int(viewport[1]), int(glh), int(glh)) self.input = Input() self.view = View(self, geometry) --- a/src/View.py +++ b/src/View.py @@ -136,10 +136,10 @@ viewport = glGetIntegerv(GL_VIEWPORT) if normalize: - w = viewport[2] - viewport[0] - h = viewport[3] - viewport[1] + w = int ( viewport[2] - viewport[0] ) + h = int ( viewport[3] - viewport[1] ) # aspect ratio correction - h *= (float(w) / float(h)) / (4.0 / 3.0) + h *= int((float(w) / float(h)) / (4.0 / 3.0)) viewport = [0, 0, 1, h / w] if yIsDown: debian/patches/font-revert.patch0000644000000000000000000001742011677766245014142 0ustar Author: Matthew Johnson Description: revert Font.py changes to make text render Last-Update: 2007-09-04 --- a/src/Font.py +++ b/src/Font.py @@ -21,26 +21,22 @@ ##################################################################### import pygame -import numpy from OpenGL.GL import * import sys -from Texture import Texture, TextureAtlas, TextureAtlasFullException +from Texture import Texture class Font: """A texture-mapped font.""" def __init__(self, fileName, size, bold = False, italic = False, underline = False, outline = True, scale = 1.0, reversed = False, systemFont = False): pygame.font.init() - self.size = size - self.scale = scale - self.glyphCache = {} - self.glyphSizeCache = {} - self.outline = outline - self.glyphTextures = [] - self.reversed = reversed - self.stringCache = {} - self.stringCacheLimit = 256 + self.size = size + self.scale = scale + self.glyphCache = {} + self.glyphSizeCache = {} + self.outline = outline + self.reversed = reversed # Try loading a system font first if one was requested self.font = None if systemFont and sys.platform != "win32": @@ -91,71 +87,11 @@ """ texture.setFilter(GL_LINEAR, GL_LINEAR) texture.setRepeat(GL_CLAMP, GL_CLAMP) - self.glyphCache[character] = (texture, (0.0, 0.0, texture.size[0], texture.size[1])) + self.glyphCache[character] = texture s = .75 * self.getHeight() / float(texture.pixelSize[0]) self.glyphSizeCache[character] = (texture.pixelSize[0] * s, texture.pixelSize[1] * s) - def _renderString(self, text, pos, direction, scale): - if not text: - return - - if not (text, scale) in self.stringCache: - currentTexture = None - #x, y = pos[0], pos[1] - x, y = 0.0, 0.0 - vertices = numpy.empty((4 * len(text), 2), numpy.float32) - texCoords = numpy.empty((4 * len(text), 2), numpy.float32) - vertexCount = 0 - cacheEntry = [] - - for i, ch in enumerate(text): - g, coordinates = self.getGlyph(ch) - w, h = self.getStringSize(ch, scale = scale) - tx1, ty1, tx2, ty2 = coordinates - - # Set the initial texture - if currentTexture is None: - currentTexture = g - - # If the texture changed, flush the geometry - if currentTexture != g: - cacheEntry.append((currentTexture, vertexCount, numpy.array(vertices[:vertexCount]), numpy.array(texCoords[:vertexCount]))) - currentTexture = g - vertexCount = 0 - - vertices[vertexCount + 0] = (x, y) - vertices[vertexCount + 1] = (x + w, y) - vertices[vertexCount + 2] = (x + w, y + h) - vertices[vertexCount + 3] = (x, y + h) - texCoords[vertexCount + 0] = (tx1, ty2) - texCoords[vertexCount + 1] = (tx2, ty2) - texCoords[vertexCount + 2] = (tx2, ty1) - texCoords[vertexCount + 3] = (tx1, ty1) - vertexCount += 4 - - x += w * direction[0] - y += w * direction[1] - cacheEntry.append((currentTexture, vertexCount, vertices[:vertexCount], texCoords[:vertexCount])) - - # Don't store very short strings - if len(text) > 5: - # Limit the cache size - if len(self.stringCache) > self.stringCacheLimit: - del self.stringCache[self.stringCache.keys()[0]] - self.stringCache[(text, scale)] = cacheEntry - else: - cacheEntry = self.stringCache[(text, scale)] - - glPushMatrix() - glTranslatef(pos[0], pos[1], 0) - for texture, vertexCount, vertices, texCoords in cacheEntry: - texture.bind() - glVertexPointer(2, GL_FLOAT, 0, vertices) - glTexCoordPointer(2, GL_FLOAT, 0, texCoords) - glDrawArrays(GL_QUADS, 0, vertexCount) - glPopMatrix() - - def render(self, text, pos = (0, 0), direction = (1, 0), scale = 0.002): + def render(self, text, pos = (0, 0), direction = (1, 0, 0), scale = 0.002): """ Draw some text. @@ -169,43 +105,75 @@ glEnableClientState(GL_TEXTURE_COORD_ARRAY) scale *= self.scale - + glPushMatrix() + glTranslatef(pos[0], pos[1], 0) + if self.reversed: text = "".join(reversed(text)) if self.outline: glPushAttrib(GL_CURRENT_BIT) - glColor4f(0, 0, 0, glGetFloatv(GL_CURRENT_COLOR)[3]) - self._renderString(text, (pos[0] + 0.003, pos[1] + 0.003), direction, scale) + glPushMatrix() + glColor4f(0, 0, 0, .25 * glGetDoublev(GL_CURRENT_COLOR)[3]) + for ch in text: + g = self.getGlyph(ch) + w, h = self.getStringSize(ch, scale = scale) + tw, th = g.size + + glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)]) + glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)]) + + g.bind() + + blur = 2 * 0.002 + for offset in [(-.7, -.7), (0, -1), (.7, -.7), (-1, 0), (1, 0), (-.7, .7), (0, 1), (.7, .7)]: + glPushMatrix() + glTranslatef( blur * offset[0], blur * offset[1], 0) + glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3]) + glPopMatrix() + + glTranslatef(w * direction[0], + w * direction[1], + w * direction[2]) + glPopAttrib() + glPopMatrix() + + for ch in text: + g = self.getGlyph(ch) + w, h = self.getStringSize(ch, scale = scale) + tw, th = g.size + + glVertexPointerf([(0.0, 0.0, 0.0), (w, 0.0, 0.0), (0.0, h, 0.0), (w, h, 0.0)]) + glTexCoordPointerf([(0.0, th), (tw, th), (0.0, 0.0), (tw, 0.0)]) + + g.bind() + glDrawElementsui(GL_TRIANGLE_STRIP, [0, 1, 2, 3]) + + glTranslatef(w * direction[0], + w * direction[1], + w * direction[2]) + + glPopMatrix() - self._renderString(text, pos, direction, scale) - glDisableClientState(GL_VERTEX_ARRAY) glDisableClientState(GL_TEXTURE_COORD_ARRAY) glDisable(GL_TEXTURE_2D) - def _allocateGlyphTexture(self): - t = TextureAtlas(size = glGetInteger(GL_MAX_TEXTURE_SIZE)) - t.texture.setFilter(GL_LINEAR, GL_LINEAR) - t.texture.setRepeat(GL_CLAMP, GL_CLAMP) - self.glyphTextures.append(t) - return t - def getGlyph(self, ch): """ - Get a (L{Texture}, coordinate tuple) pair for a given character. + Get the L{Texture} for a given character. @param ch: Character - @return: (L{Texture} instance, coordinate tuple) + @return: L{Texture} instance """ try: return self.glyphCache[ch] except KeyError: s = self.font.render(ch, True, (255, 255, 255)) - # Draw outlines """ + # Draw outlines import Image, ImageFilter srcImg = Image.fromstring("RGBA", s.get_size(), pygame.image.tostring(s, "RGBA")) img = Image.fromstring("RGBA", s.get_size(), pygame.image.tostring(s, "RGBA")) @@ -222,19 +190,11 @@ img.putpixel((x, y), (0, 0, 0, a / n)) s = pygame.image.fromstring(img.tostring(), s.get_size(), "RGBA") """ - - if not self.glyphTextures: - texture = self._allocateGlyphTexture() - else: - texture = self.glyphTextures[-1] - - # Insert the texture into the glyph cache - try: - coordinates = texture.add(s) - except TextureAtlasFullException: - # Try again with a fresh atlas - texture = self._allocateGlyphTexture() - return self.getGlyph(ch) - - self.glyphCache[ch] = (texture, coordinates) - return (texture, coordinates) + + t = Texture() + t.setFilter(GL_LINEAR, GL_LINEAR) + t.setRepeat(GL_CLAMP, GL_CLAMP) + t.loadSurface(s, alphaChannel = True) + del s + self.glyphCache[ch] = t + return t debian/translations/0000755000000000000000000000000011677771751011732 5ustar debian/fretsonfire-game.menu0000644000000000000000000000037611004520004013301 0ustar !C menu-2 ?package(fretsonfire-game): needs="X11" section="Games/Action" title="Frets on Fire" longtitle="Rock out with your keyboard" command="/usr/games/fretsonfire" icon="/usr/share/pixmaps/fretsonfire.xpm" ; debian/rules0000755000000000000000000001242711677763573010302 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif build: build-stamp build-stamp: dh_testdir docbook-to-man debian/fretsonfire.sgml > fretsonfire.6 find data -name "*.svg" | sed -e "s/.svg$$/.png/" | while read l; do if ! test -f "$$l"; then echo "Missing $$l"; exit 1; fi; done # rename and mode these here so that dh_install can do it's magic cp debian/fretsonfire.sh fretsonfire chmod 755 fretsonfire cp data/icon.png fretsonfire.png chmod 755 src/FretsOnFire.py mkdir translations cp data/translations/*.po translations/ cp data/translations/*.py translations/ if test $(ls debian/translations/* -1 | wc -l) -ne 0; then \ cp debian/translations/* translations/ ; \ fi cd translations && python update.py touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp rm -rf translations rm -rf `find . -name "*.pyc"` rm -f fretsonfire.6 fretsonfire dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # symlink fonts ln -sf ../../../fonts/truetype/ttf-dejavu/DejaVuSans.ttf $(CURDIR)/debian/fretsonfire-game/usr/share/games/fretsonfire/data/international.ttf ln -sf ../../../fonts/truetype/mgopen/MgOpenCosmeticaRegular.ttf $(CURDIR)/debian/fretsonfire-game/usr/share/games/fretsonfire/data/title.ttf ln -sf ../../../fonts/truetype/mgopen/MgOpenCosmeticaRegular.ttf $(CURDIR)/debian/fretsonfire-game/usr/share/games/fretsonfire/data/default.ttf # other installation done with dh_install # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installmenu dh_installman -pfretsonfire-game fretsonfire.6 dh_install -pfretsonfire-game dh_link dh_strip dh_compress dh_fixperms dh_pysupport dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb -- -Zbzip2 # Build architecture-dependent files here. binary-arch: build install binary: binary-indep binary-arch ORIG_VERSION=$(shell dpkg-parsechangelog | sed -n '/^Version/s/[^:].*: \(.*\).dfsg-[^-]*$$/\1/p') print-orig-version: echo $(ORIG_VERSION) ../FretsOnFire-$(ORIG_VERSION).tar.gz: wget http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/f/fr/fretsonfire/FretsOnFire-$(ORIG_VERSION).tar.gz --directory-prefix=../ extract_translation_source: # get the translation template (needs gettext) cd fretsonfire-$(ORIG_VERSION).dfsg/src && \ xgettext -o ../data/translations/fretsonfire.pot \ `grep -r "_(\".*\")" * | awk -F: '{print $$1}' | sort --unique` cat fretsonfire-$(ORIG_VERSION).dfsg/data/songs/tutorial/script.txt | \ awk '{ print NR "|" $$0 }' | grep " text " | sed 's/ text */|/g' | \ awk -F"|" '{ print "\n#: data/songs/tutorial/script.txt:" $$1 " \nmsgid \"" $$3 "\"\nmsgstr \"\""}' \ >> fretsonfire-$(ORIG_VERSION).dfsg/data/translations/fretsonfire.pot msguniq -o fretsonfire-$(ORIG_VERSION).dfsg/data/translations/fretsonfire.pot \ fretsonfire-$(ORIG_VERSION).dfsg/data/translations/fretsonfire.pot # get the source from the translation files (needs gettext) cd fretsonfire-$(ORIG_VERSION).dfsg/data/translations && \ for i in *.mo; do \ msgunfmt $$i > `echo $$i | sed -e "s/.mo/.po/"` ; \ done # merge the obtained the translation files with the template (needs gettext) cd fretsonfire-$(ORIG_VERSION).dfsg/data/translations && \ for i in *.po; do \ msgmerge -o $$i $$i fretsonfire.pot ; \ done get-orig-source: ../FretsOnFire-$(ORIG_VERSION).tar.gz # clean old builds; rm -rf "FretsOnFire-src-$(ORIG_VERSION)/" "Frets on Fire-$(ORIG_VERSION)/" "FretsOnFire/" "fretsonfire-$(ORIG_VERSION).dfsg" # extract source and data tar xvzf "../FretsOnFire-$(ORIG_VERSION).tar.gz" mkdir -p "fretsonfire-$(ORIG_VERSION).dfsg/data" # we want all the source cp -va "Frets on Fire-$(ORIG_VERSION)/doc" "Frets on Fire-$(ORIG_VERSION)/src" "fretsonfire-$(ORIG_VERSION).dfsg/" cp -v "Frets on Fire-$(ORIG_VERSION)"/* "fretsonfire-$(ORIG_VERSION).dfsg/" || true # copy the data, without the songs, but with the tutorial cp -v "Frets on Fire-$(ORIG_VERSION)/data"/* "fretsonfire-$(ORIG_VERSION).dfsg/data/" || true rm -f "fretsonfire-$(ORIG_VERSION).dfsg/data"/*.ttf cp -va "Frets on Fire-$(ORIG_VERSION)/data/mods" "fretsonfire-$(ORIG_VERSION).dfsg/data/" cp -va "Frets on Fire-$(ORIG_VERSION)/data/translations" "fretsonfire-$(ORIG_VERSION).dfsg/data/" mkdir -p "fretsonfire-$(ORIG_VERSION).dfsg/data/songs" cp -av "Frets on Fire-$(ORIG_VERSION)/data/songs/tutorial" "fretsonfire-$(ORIG_VERSION).dfsg/data/songs/" # get translation sources (requires subversion) svn co https://fretsonfire.svn.sourceforge.net/svnroot/fretsonfire/trunk/data/translations _translations mv _translations/* "fretsonfire-$(ORIG_VERSION).dfsg/data/translations/" rm -rf _translations # turn off the execute bit on all the random files find "fretsonfire-$(ORIG_VERSION).dfsg" -type f | xargs chmod -x # build the tarball and clean up tar cvfz "../fretsonfire_$(ORIG_VERSION).dfsg.orig.tar.gz" "fretsonfire-$(ORIG_VERSION).dfsg" rm -rf "Frets on Fire-$(ORIG_VERSION)/" "FretsOnFire-src-$(ORIG_VERSION)/" "FretsOnFire/" "fretsonfire-$(ORIG_VERSION).dfsg" .PHONY: build clean binary-indep binary-arch binary install configure debian/fretsonfire.sh0000644000000000000000000000011211004520004012024 0ustar #!/bin/sh -- cd /usr/share/games/fretsonfire/game/ ./FretsOnFire.py "$@" debian/fretsonfire.sgml0000644000000000000000000000622111004520004012363 0ustar manpage.1'. You may view the manual page with: `docbook-to-man manpage.sgml | nroff -man | less'. A typical entry in a Makefile or Makefile.am is: manpage.1: manpage.sgml docbook-to-man $< > $@ The docbook-to-man binary is found in the docbook-to-man package. Please remember that if you create the nroff version in one of the debian/rules file targets (such as build), you will need to include docbook-to-man in your Build-Depends control field. --> Matthew"> Johnson"> September 11, 2007"> 6"> debian@matthew.ath.cx"> FRETSONFIRE"> Debian"> GNU"> GPL"> ]>
&dhemail;
&dhfirstname; &dhsurname; 2007 &dhusername; &dhdate;
&dhucpackage; &dhsection; &dhpackage; game of musical skill and fast fingers DESCRIPTION Frets on Fire is a game of musical skill and fast fingers. The aim of the game is to play guitar with the keyboard as accurately as possible. &dhpackage; takes no arguments. This manual page was written for the &debian; distribution because the original program does not have a manual page. AUTHOR This manual page was written by &dhusername; &dhemail; for the &debian; system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the &gnu; General Public License version 2. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.