summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Riha2024-02-02 21:34:46 +0100
committerJose Riha2024-02-02 21:34:46 +0100
commit90ca2b2be90b150f0c0c5edf3d0ca84b4687eeb5 (patch)
tree659aae5e0f119bee65c20218d45246b060630725
parent10d9bf2824cd995eae4f37fd5bb31346a6f5a4e1 (diff)
downloadaur-funnyboat.tar.gz
Adopted Debian patches and migrated to python3.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD35
-rw-r--r--avoid_set_alpha_crash.patch26
-rw-r--r--fullscreen.patch100
-rw-r--r--funnyboat-cursor-patch.patch21
-rw-r--r--python3.patch417
-rw-r--r--save-sshot-in-homedir.patch28
-rw-r--r--sink-the-titanic.patch22
8 files changed, 656 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 09c73e57dcd3..736f8f2814fd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,27 @@
pkgbase = funnyboat
pkgdesc = side scrolling arcade shooter game on a steamboat equipped with a cannon and the ability to jump
pkgver = 1.5
- pkgrel = 1
+ pkgrel = 2
url = http://funnyboat.sourceforge.net/
arch = any
license = custom
makedepends = gendesk
- depends = python2-pygame
+ depends = python-pygame
source = https://sourceforge.net/projects/funnyboat/files/funnyboat/1.5/funnyboat-1.5-src.zip/download
+ source = avoid_set_alpha_crash.patch
+ source = fullscreen.patch
+ source = funnyboat-cursor-patch.patch
+ source = python3.patch
+ source = save-sshot-in-homedir.patch
source = screenshot_to_homedir.patch
+ source = sink-the-titanic.patch
md5sums = 71724a755614c286bd861864bd0062a6
+ md5sums = dd493ee09f1280748cf2dc0cc5b1c121
+ md5sums = 664462d4bc962b6eace6c2da26ff9ec9
+ md5sums = 2596477483f3c9ee2aa11e36709b70ae
+ md5sums = 843bdfc14d4515c0c0e58611d2705995
+ md5sums = 916afe671c14e5a0505f2f7471c7602e
md5sums = 06761d4d402e8d9338157292f6dfb6e8
+ md5sums = c9a567c7fc04c944ea28659858c1a9f4
pkgname = funnyboat
diff --git a/PKGBUILD b/PKGBUILD
index 117d874197b9..74a3a1fa9027 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,23 +2,45 @@
pkgname=funnyboat
pkgver=1.5
-pkgrel=1
+pkgrel=2
pkgdesc="side scrolling arcade shooter game on a steamboat equipped with a cannon and the ability to jump"
url="http://funnyboat.sourceforge.net/"
arch=(any)
license=('custom')
makedepends=('gendesk')
depends=(
- 'python2-pygame'
+ 'python-pygame'
)
source=("https://sourceforge.net/projects/funnyboat/files/funnyboat/${pkgver}/funnyboat-${pkgver}-src.zip/download"
- "screenshot_to_homedir.patch")
+ "avoid_set_alpha_crash.patch"
+ "fullscreen.patch"
+ "funnyboat-cursor-patch.patch"
+ "python3.patch"
+ "save-sshot-in-homedir.patch"
+ "screenshot_to_homedir.patch"
+ "sink-the-titanic.patch")
+
md5sums=('71724a755614c286bd861864bd0062a6'
- '06761d4d402e8d9338157292f6dfb6e8')
+ 'dd493ee09f1280748cf2dc0cc5b1c121'
+ '664462d4bc962b6eace6c2da26ff9ec9'
+ '2596477483f3c9ee2aa11e36709b70ae'
+ '843bdfc14d4515c0c0e58611d2705995'
+ '916afe671c14e5a0505f2f7471c7602e'
+ '06761d4d402e8d9338157292f6dfb6e8'
+ 'c9a567c7fc04c944ea28659858c1a9f4')
prepare() {
gendesk -f -n --pkgname funnyboat --pkgdesc "${pkgdesc}" --exec "funnyboat" --categories "Game;ArcadeGame"
- patch -p1 -i "${srcdir}/screenshot_to_homedir.patch"
+ cd $srcdir/funnyboat
+ for i in save-sshot-in-homedir \
+ funnyboat-cursor-patch \
+ fullscreen \
+ avoid_set_alpha_crash \
+ sink-the-titanic \
+ python3
+ do
+ patch -p1 -i $srcdir/$i.patch
+ done
}
package() {
@@ -32,7 +54,6 @@ package() {
install -Dm644 "${srcdir}/funnyboat.desktop" ${pkgdir}/usr/share/applications/funnyboat.desktop
echo "#!/bin/sh" > funnyboat
echo "cd /usr/share/funnyboat/" >> funnyboat
- echo "python2 main.py" >> funnyboat
+ echo "python3 main.py" >> funnyboat
install -Dm755 funnyboat $pkgdir/usr/bin/funnyboat
}
-
diff --git a/avoid_set_alpha_crash.patch b/avoid_set_alpha_crash.patch
new file mode 100644
index 000000000000..a1e8a9b01ef1
--- /dev/null
+++ b/avoid_set_alpha_crash.patch
@@ -0,0 +1,26 @@
+From: Goneri Le Bouder <goneri@rulezlan.org>
+Date: Fri, 10 May 2013 18:02:13 +0200
+Subject: avoid_set_alpha_crash
+
+Bug: #534596
+If val is larger than 'int', image.set_alpha throw an exception. set_alpha
+argument is supposed to be < 256.
+---
+ particles.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/particles.py b/particles.py
+index 22c6319..0cec708 100644
+--- a/particles.py
++++ b/particles.py
+@@ -24,7 +24,9 @@ class Particle (pygame.sprite.Sprite):
+ pygame.draw.ellipse(self.image, self.colour, self.image.get_rect())
+
+ if Variables.alpha:
+- self.image.set_alpha(self.life * 255 * self.opacity / self.initial_life)
++ val = self.life * 255 * self.opacity / self.initial_life
++ if val < 256:
++ self.image.set_alpha(val)
+
+ def update(self):
+ self.rect.left += self.vect[0]
diff --git a/fullscreen.patch b/fullscreen.patch
new file mode 100644
index 000000000000..638612b83860
--- /dev/null
+++ b/fullscreen.patch
@@ -0,0 +1,100 @@
+From: Goneri Le Bouder <goneri@rulezlan.org>
+Date: Fri, 10 May 2013 18:02:13 +0200
+Subject: fullscreen
+
+Add fullscreen support
+---
+ locals.py | 2 +-
+ main.py | 4 ++--
+ options.py | 8 +++++++-
+ util.py | 3 +++
+ 4 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/locals.py b/locals.py
+index a159721..74882ab 100644
+--- a/locals.py
++++ b/locals.py
+@@ -6,7 +6,6 @@ NEXTFRAME = USEREVENT + 1
+ MIN_FIRE_DELAY = 10
+ SCREEN_WIDTH = 400#320
+ SCREEN_HEIGHT = 300#240
+-SCREEN_FULLSCREEN = 0
+ FPS = 30
+
+
+@@ -17,3 +16,4 @@ class Variables:
+ sound = True
+ music = True
+ name = "Funny Boater"
++ fullscreen = True
+diff --git a/main.py b/main.py
+index f3a8bfa..b12472d 100644
+--- a/main.py
++++ b/main.py
+@@ -53,10 +53,10 @@ def main():
+ elif arg == "-ns":
+ Variables.sound = False
+ elif arg == "-f":
+- SCREEN_FULLSCREEN = True
++ Variables.fullscreen = True
+
+ scr_options = 0
+- if SCREEN_FULLSCREEN: scr_options += FULLSCREEN
++ if Variables.fullscreen: scr_options += FULLSCREEN
+ screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT),scr_options ,32)
+
+ pygame.display.set_icon(util.load_image("kuvake"))
+diff --git a/options.py b/options.py
+index c6cdc34..3b603fc 100644
+--- a/options.py
++++ b/options.py
+@@ -14,6 +14,7 @@ class Options:
+ SOUND = 2
+ MUSIC = 3
+ NAME = 4
++ FULLSCREEN = 5
+
+ def __init__(self, screen):
+ self.screen = screen
+@@ -39,7 +40,8 @@ class Options:
+ "Antialiasing: " + (Variables.aa and "on" or "off"),
+ "Sound effects: " + (Variables.sound and "on" or "off"),
+ "Music: " + (Variables.music and "on" or "off"),
+- "Player Name: " + Variables.name)
++ "Player Name: " + Variables.name,
++ "Fullscreen: " + (Variables.fullscreen and "on" or "off"))
+
+ def run(self):
+ done = False
+@@ -138,6 +140,10 @@ class Options:
+ pygame.mixer.music.stop()
+ except:
+ pass
++ elif self.selection == Options.FULLSCREEN:
++ Variables.fullscreen = not Variables.fullscreen
++ pygame.display.toggle_fullscreen()
++
+ self.refresh()
+
+ def change_right(self):
+diff --git a/util.py b/util.py
+index c012934..100b6d5 100644
+--- a/util.py
++++ b/util.py
+@@ -62,6 +62,8 @@ def load_config():
+ Variables.sound = str_to_bool(value)
+ elif variable == "aa":
+ Variables.aa = str_to_bool(value)
++ elif variable == "fullscreen":
++ Variables.fullscreen = str_to_bool(value)
+
+ f.close()
+
+@@ -77,6 +79,7 @@ def save_config():
+ print >> f, "name\t%s" % Variables.name
+ print >> f, "sound\t%s" % Variables.sound
+ print >> f, "aa\t%s" % Variables.aa
++ print >> f, "fullscreen\t%s" % Variables.fullscreen
+
+ f.close()
+
diff --git a/funnyboat-cursor-patch.patch b/funnyboat-cursor-patch.patch
new file mode 100644
index 000000000000..18935cfc684d
--- /dev/null
+++ b/funnyboat-cursor-patch.patch
@@ -0,0 +1,21 @@
+From: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
+Date: Fri, 10 May 2013 18:02:13 +0200
+Subject: funnyboat-cursor-patch
+
+---
+ main.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/main.py b/main.py
+index 32f6371..f3a8bfa 100644
+--- a/main.py
++++ b/main.py
+@@ -62,6 +62,8 @@ def main():
+ pygame.display.set_icon(util.load_image("kuvake"))
+ pygame.display.set_caption("Trip on the Funny Boat")
+
++ pygame.mouse.set_visible(False)
++
+ init()
+
+ joy = None
diff --git a/python3.patch b/python3.patch
new file mode 100644
index 000000000000..cc7a94c1944a
--- /dev/null
+++ b/python3.patch
@@ -0,0 +1,417 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Port to Python 3
+Bug-Debian: https://bugs.debian.org/912502
+
+--- a/PixelPerfect.py
++++ b/PixelPerfect.py
+@@ -17,8 +17,8 @@
+ x2 = rect.x-rect2.x
+ y2 = rect.y-rect2.y
+
+- for r in xrange(0,rect.height):
+- for c in xrange(0,rect.width):
++ for r in range(0,rect.height):
++ for c in range(0,rect.width):
+ # I changed this for the 1.5 release of Funny Boat,
+ # because generating hitmasks is a bit problematic
+ # now that Numeric is outdated and surfarrays don't work.
+--- a/game.py
++++ b/game.py
+@@ -133,7 +133,7 @@
+ und_old=cb.underwater
+ cb.update()
+ if cb.underwater and not und_old:
+- for i in xrange(5):
++ for i in range(5):
+ particle_point=cb.rect.right-4.0+rr()*8.0, cb.rect.top+rr()*2.0
+ self.particles.add_water_particle(particle_point)
+ if (cb.rect.right < 0 and cb.vect[0] < 0) or (cb.rect.left > SCREEN_WIDTH and cb.vect[0] > 0) or (cb.rect.top > SCREEN_HEIGHT):
+@@ -162,7 +162,7 @@
+ self.particles.add_steam_particle(particle_point)
+
+ if self.titanic:
+- for j in xrange(4):
++ for j in range(4):
+ particle_point = self.titanic.get_point((49 + rr() * 9.0 + 28 * j, 25))
+ particle_point[0] += self.titanic.rect.centerx
+ particle_point[1] += self.titanic.rect.centery
+@@ -174,7 +174,7 @@
+
+ if self.player.splash:
+ if Variables.particles:
+- for i in xrange(10):
++ for i in range(10):
+ r = rr()
+ x = int(r * self.player.rect.left + (1.0-r) * self.player.rect.right)
+ point = (x, self.water.get_water_level(x))
+@@ -214,7 +214,7 @@
+
+ def damage_player(self):
+ self.health.damage()
+- for i in xrange(10):
++ for i in range(10):
+ particle_point = self.player.get_point((rr() * 26.0, rr() * 10.0))
+ particle_point[0] += self.player.rect.centerx
+ particle_point[1] += self.player.rect.centery
+@@ -234,10 +234,10 @@
+ width = images[-1].get_width()
+ self.gameover_image = pygame.Surface((width, height), SRCALPHA, 32)
+ self.gameover_image.fill((0,0,0,0))
+- for i in xrange(len(images)):
++ for i in range(len(images)):
+ rect = images[i].get_rect()
+ rect.top = i * images[i].get_height()
+- rect.centerx = width / 2
++ rect.centerx = width // 2
+ self.gameover_image.blit(images[i], rect)
+
+ self.gameover_rect = self.gameover_image.get_rect()
+@@ -254,7 +254,7 @@
+ filename = filename + "/funnyboat-sshot" + str(i) + ".tga"
+
+ pygame.image.save(self.screen, filename)
+- print "Screenshot saved as " + filename
++ print("Screenshot saved as " + filename)
+
+ def handle_events(self):
+ nextframe = False
+@@ -302,7 +302,7 @@
+ particle_point = self.player.get_point((42.0,10.0))
+ particle_point[0] += self.player.rect.centerx
+ particle_point[1] += self.player.rect.centery
+- for i in xrange(4):
++ for i in range(4):
+ self.particles.add_fire_steam_particle(particle_point)
+ self.lastshot = 0
+ self.spacepressed = self.t
+@@ -326,7 +326,7 @@
+ particle_point = self.player.get_point((42.0,10.0))
+ particle_point[0] += self.player.rect.centerx
+ particle_point[1] += self.player.rect.centery
+- for i in xrange(4):
++ for i in range(4):
+ self.particles.add_fire_steam_particle(particle_point)
+ self.lastshot = 0
+ self.spacepressed = self.t
+@@ -351,7 +351,7 @@
+ particle_point = self.player.get_point((42.0,10.0))
+ particle_point[0] += self.player.rect.centerx
+ particle_point[1] += self.player.rect.centery
+- for i in xrange(30):
++ for i in range(30):
+ self.particles.add_fire_steam_particle((particle_point[0]+rrr(-4,4),particle_point[1]+rrr(-3,3)))
+ self.lastshot = 0
+ self.spacepressed = None
+@@ -365,19 +365,19 @@
+ particle_point = self.player.get_point((42.0,10.0))
+ particle_point[0] += self.player.rect.centerx
+ particle_point[1] += self.player.rect.centery
+- for i in xrange(30):
++ for i in range(30):
+ self.particles.add_fire_steam_particle((particle_point[0]+rrr(-4,4),particle_point[1]+rrr(-3,3)))
+ self.lastshot = 0
+ self.spacepressed = None
+
+ #if framecount > 1:
+- # print str(self.t) + ": missed " + str(framecount - 1) + " frames!"
++ # print(str(self.t) + ": missed " + str(framecount - 1) + " frames!")
+
+ def set_pause(self):
+ self.pause = not self.pause
+
+ #if framecount > 1:
+- # print str(self.t) + ": missed " + str(framecount - 1) + " frames!"
++ # print(str(self.t) + ": missed " + str(framecount - 1) + " frames!")
+
+ def set_pause(self):
+ self.pause = not self.pause
+@@ -420,7 +420,7 @@
+ blit_image.set_colorkey((166,183,250))
+ blit_image.blit(image, image.get_rect())
+ if self.level.t > 60:
+- blit_image.set_alpha(255 - (self.level.t - 60) * 255 / 60)
++ blit_image.set_alpha(255 - (self.level.t - 60) * 255 // 60)
+ self.screen.blit(blit_image, rect)
+ i += 1
+
+@@ -562,7 +562,7 @@
+ particle_point = pirate.get_point((0.0,10.0))
+ particle_point[0] += pirate.rect.centerx
+ particle_point[1] += pirate.rect.centery
+- for i in xrange(4):
++ for i in range(4):
+ self.particles.add_fire_steam_particle(particle_point)
+
+ if pirate.rect.right < self.screen.get_rect().left or pirate.dead:
+@@ -576,12 +576,12 @@
+ if self.titanic:
+ self.titanic.update()
+ if self.titanic.t % 100 == 0 and not self.titanic.dying:
+- for i in xrange(3):
++ for i in range(3):
+ cb = Cannonball(self.titanic.rect, self.titanic.angle + (i-1)*10 - 50, left = True)
+ self.cannonballs.append(cb)
+ self.cannonball_sprites.add(cb)
+ elif self.titanic.t % 100 == 50 and not self.titanic.dying:
+- for i in xrange(3):
++ for i in range(3):
+ cb = Cannonball(self.titanic.rect, self.titanic.angle + (i-1)*10 - 52.5, left = True)
+ self.cannonballs.append(cb)
+ self.cannonball_sprites.add(cb)
+--- a/health.py
++++ b/health.py
+@@ -40,7 +40,7 @@
+ # clear the surface
+ self.image.fill((255,255,255))
+
+- for i in xrange(5):
++ for i in range(5):
+ rect = pygame.Rect(i * (Health.heart.get_width() + 1), Health.heart.get_height(), Health.heart.get_width(), Health.heart.get_height())
+ if i < self.hearts_left:
+ self.image.blit(Health.heart, rect)
+--- a/highscores.py
++++ b/highscores.py
+@@ -36,7 +36,7 @@
+ if online:
+ if not self.online_init():
+ self.done = True
+- print "Could not get online highscores!"
++ print("Could not get online highscores!")
+ return
+
+ self.pathname = util.get_config_path()
+@@ -49,12 +49,12 @@
+ if not os.path.exists(self.pathname):
+ os.mkdir(self.pathname)
+ except:
+- print "Can't make directory " + self.pathname
++ print("Can't make directory " + self.pathname)
+ self.done = True
+ return
+
+ if not os.path.exists(self.filename):
+- #print "Creating dummy high scores"
++ #print("Creating dummy high scores")
+ self.dummy_scores()
+ else:
+ try:
+@@ -68,17 +68,17 @@
+ try:
+ score = int(line)
+ except:
+- print "Corrupt high score file."
++ print("Corrupt high score file.")
+ self.dummy_scores()
+ break
+ self.scores.append((name, score))
+ i += 1
+ except:
+ self.dummy_scores()
+- print "Can't open file " + self.filename + " or file corrupt"
++ print("Can't open file " + self.filename + " or file corrupt")
+
+ if len(self.scores) < 10:
+- print "Corrupt high score file."
++ print("Corrupt high score file.")
+ self.dummy_scores()
+
+ # The online highscore is always submitted
+@@ -86,12 +86,12 @@
+ self.submit_score(Variables.name, new_score)
+
+ if new_score > self.scores[9][1]:
+- #print "It's a new high score!"
++ #print("It's a new high score!")
+ #self.inputting = True
+- for i in xrange(10):
++ for i in range(10):
+ if self.scores[i][1] < new_score:
+ self.input_score = i
+- for j in xrange(9 - i):
++ for j in range(9 - i):
+ self.scores[9 - j] = self.scores[8 - j]
+ self.scores[i] = [Variables.name, new_score]
+ break
+@@ -130,7 +130,7 @@
+ f = urllib2.urlopen(req)
+ f.close()
+ except:
+- print "Failed to submit highscore"
++ print("Failed to submit highscore")
+
+ def run(self):
+ water = Water.global_water
+@@ -150,7 +150,7 @@
+
+ self.screen.blit(self.title, rect)
+
+- for i in xrange(10):
++ for i in range(10):
+ color = (0,0,0)
+ #if self.inputting and self.input_score == i:
+ if self.input_score == i:
+@@ -220,10 +220,10 @@
+ def write_scores(self):
+ try:
+ f = codecs.open(self.filename, "w", "utf_8")
+- for i in xrange(10):
+- print >> f, self.scores[i][0]
+- print >> f, self.scores[i][1]
++ for i in range(10):
++ print(self.scores[i][0], file=f)
++ print(self.scores[i][1], file=f)
+ except:
+- print "Failed to write high scores to file " + self.filename
++ print("Failed to write high scores to file " + self.filename)
+ self.done = True
+ return
+--- a/main.py
++++ b/main.py
+@@ -79,7 +79,7 @@
+ # It's not a critical problem if there's no music
+ pass
+
+- pygame.time.set_timer(NEXTFRAME, 1000 / FPS) # 30 fps
++ pygame.time.set_timer(NEXTFRAME, 1000 // FPS) # 30 fps
+
+ Water.global_water = Water()
+
+--- a/menu.py
++++ b/menu.py
+@@ -34,7 +34,7 @@
+ self.water.update()
+ self.water_sprite.draw(self.screen)
+
+- for i in xrange(len(self.menu)):
++ for i in range(len(self.menu)):
+ self.render(i)
+
+ cloud.update()
+--- a/options.py
++++ b/options.py
+@@ -51,7 +51,7 @@
+ self.water.update()
+ self.water_sprite.draw(self.screen)
+
+- for i in xrange(len(self.menu)):
++ for i in range(len(self.menu)):
+ self.render(i)
+
+ cloud.update()
+--- a/util.py
++++ b/util.py
+@@ -20,7 +20,7 @@
+ try:
+ pathname = os.environ["APPDATA"] + "/Funny Boat"
+ except:
+- print "Couldn't get environment variable for home directory"
++ print("Couldn't get environment variable for home directory")
+ pathname = "."
+ if not os.path.exists(pathname):
+ os.mkdir(pathname)
+@@ -73,13 +73,13 @@
+ os.mkdir(get_config_path())
+ f = codecs.open(filename, "w", "utf_8")
+
+- print >> f, "alpha\t%s" % Variables.alpha
+- print >> f, "particles\t%s" % Variables.particles
+- print >> f, "music\t%s" % Variables.music
+- print >> f, "name\t%s" % Variables.name
+- print >> f, "sound\t%s" % Variables.sound
+- print >> f, "aa\t%s" % Variables.aa
+- print >> f, "fullscreen\t%s" % Variables.fullscreen
++ print("alpha\t%s" % Variables.alpha, file=f)
++ print("particles\t%s" % Variables.particles, file=f)
++ print("music\t%s" % Variables.music, file=f)
++ print("name\t%s" % Variables.name, file=f)
++ print("sound\t%s" % Variables.sound, file=f)
++ print("aa\t%s" % Variables.aa, file=f)
++ print("fullscreen\t%s" % Variables.fullscreen, file=f)
+
+ f.close()
+
+@@ -91,16 +91,16 @@
+ # in case someone does, at least it won't crash the game if they don't
+ # have Numeric installed
+ w,h = image.get_size()
+- for i in xrange(w):
+- for j in xrange(h):
++ for i in range(w):
++ for j in range(h):
+ pixel = image.get_at((i,j))
+ if pixel[3] > 127:
+ image.set_at((i,j), (pixel[0], pixel[1], pixel[2], 255))
+ else:
+ image.set_at((i,j), (pixel[0], pixel[1], pixel[2], 0))
+ #surfarray = pygame.surfarray.pixels_alpha(image)
+- #for i in xrange(len(surfarray)):
+- # for j in xrange(len(surfarray[i])):
++ #for i in range(len(surfarray)):
++ # for j in range(len(surfarray[i])):
+ # if surfarray[i][j] > 127:
+ # surfarray[i][j] = 255
+ # else:
+--- a/water.py
++++ b/water.py
+@@ -18,7 +18,7 @@
+ Water.raster_image = util.load_image("rasteri")
+
+ self.water_levels = []
+- for i in xrange(self.rect.width):
++ for i in range(self.rect.width):
+ self.water_levels.append(0.0)
+ self.t = 0
+
+@@ -39,7 +39,7 @@
+
+ def update(self):
+ self.image.fill((200,210,255,0))
+- for x in xrange(self.rect.width):
++ for x in range(self.rect.width):
+ h = SCREEN_HEIGHT - (math.sin(x * self.xmul + self.t * self.tmul) * self.amplitude + self.baseheight)
+ self.water_levels[x] = h
+ h_float,h_int=math.modf(h)
+--- a/level.py
++++ b/level.py
+@@ -144,8 +144,8 @@
+ for enemy in self.phases[self.phase % len(self.phases)]:
+ offset, delay = enemy
+ if self.endless and delay > 0:
+- delay -= self.phase / 4 * 5
+- offset -= self.phase / 4 * 5
++ delay -= self.phase // 4 * 5
++ offset -= self.phase // 4 * 5
+ if delay <= 30:
+ delay = 30
+ if offset < 0:
+@@ -158,7 +158,7 @@
+ if not self.endless:
+ Water.global_water.set_amplitude(self.phase_weather[self.phase % len(self.phase_weather)])
+ else:
+- Water.global_water.set_amplitude(self.phase_weather[(self.phase / 4) % len(self.phase_weather)])
++ Water.global_water.set_amplitude(self.phase_weather[(self.phase // 4) % len(self.phase_weather)])
+
+
+ self.t += 1
+--- a/particles.py
++++ b/particles.py
+@@ -40,7 +40,7 @@
+ self.life = 0
+
+ if Variables.alpha:
+- self.image.set_alpha(self.life * 255 * self.opacity / self.initial_life)
++ self.image.set_alpha(self.life * 255 * self.opacity // self.initial_life)
+
+ class Particles (pygame.sprite.Sprite):
+ def __init__(self):
+--- a/powerup.py
++++ b/powerup.py
+@@ -29,7 +29,7 @@
+ water_level = Water.global_water.get_water_level(self.rect.centerx)
+ if self.fading:
+ if self.fadecount > 0:
+- self.image.set_alpha(self.fadecount * 255 / 15)
++ self.image.set_alpha(self.fadecount * 255 // 15)
+ self.fadecount -= 1
+ else:
+ self.picked = True
diff --git a/save-sshot-in-homedir.patch b/save-sshot-in-homedir.patch
new file mode 100644
index 000000000000..3a3ba4f1c0ef
--- /dev/null
+++ b/save-sshot-in-homedir.patch
@@ -0,0 +1,28 @@
+From: Goneri Le Bouder <goneri@rulezlan.org>
+Date: Fri, 10 May 2013 18:02:13 +0200
+Subject: save-sshot-in-homedir
+
+---
+ game.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/game.py b/game.py
+index 80dd12c..bcd30de 100644
+--- a/game.py
++++ b/game.py
+@@ -245,10 +245,13 @@ class Game:
+
+ def take_screenshot(self):
+ i = 1
+- filename = "sshot.tga"
++ basedir = os.environ['HOME']
++ if not basedir:
++ basedir = '/home'
++ filename = basedir + "/funnyboat-sshot.tga"
+ while os.path.exists(filename):
+ i += 1
+- filename = "sshot" + str(i) + ".tga"
++ filename = filename + "/funnyboat-sshot" + str(i) + ".tga"
+
+ pygame.image.save(self.screen, filename)
+ print "Screenshot saved as " + filename
diff --git a/sink-the-titanic.patch b/sink-the-titanic.patch
new file mode 100644
index 000000000000..0fb9b187b4bd
--- /dev/null
+++ b/sink-the-titanic.patch
@@ -0,0 +1,22 @@
+From: Markus Koschany <apo@debian.org>
+Date: Fri, 10 May 2013 18:50:43 +0200
+Subject: sink the titanic
+
+Bug: http://bugs.debian.org/582234
+---
+ titanic.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/titanic.py b/titanic.py
+index b8b25c0..47cd8c7 100644
+--- a/titanic.py
++++ b/titanic.py
+@@ -43,7 +43,7 @@ class Titanic(pygame.sprite.Sprite):
+ def damage(self, dec=1):
+ self.health -= dec
+
+- if self.health == 0:
++ if self.health <= 0:
+ self.die()
+
+ def update(self):