summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-11-02 23:14:17 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-11-02 23:14:17 +0000
commitec7bc2ffe2f27140ce239b6ba80d63745b60cfb9 (patch)
treecd7a5995299ecb0d6847b18097e2e562baa0a584
parent- Update to 0.1 (diff)
- Fix runtime error
[SDL Init] Not a HASH reference at /usr/local/bin/frozen-bubble.pl line 322. PR: ports/67355, ports/73371 Submitted by: Jaap Boender <jaapb@kerguelen.org>, Nicholas Kirby <nirbokirbinov@gmail.com>
Notes
Notes: svn path=/head/; revision=120671
-rw-r--r--games/frozenbubble/Makefile2
-rw-r--r--games/frozenbubble/files/patch-frozen-bubble40
2 files changed, 41 insertions, 1 deletions
diff --git a/games/frozenbubble/Makefile b/games/frozenbubble/Makefile
index e7360366b669..cffbdeb05e89 100644
--- a/games/frozenbubble/Makefile
+++ b/games/frozenbubble/Makefile
@@ -7,7 +7,7 @@
PORTNAME= frozenbubble
PORTVERSION= 0.9.3
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= games
MASTER_SITES= http://people.mandrakesoft.com/~gc/fb/ \
http://frozenbubble.free.fr/fb/
diff --git a/games/frozenbubble/files/patch-frozen-bubble b/games/frozenbubble/files/patch-frozen-bubble
new file mode 100644
index 000000000000..896c45290514
--- /dev/null
+++ b/games/frozenbubble/files/patch-frozen-bubble
@@ -0,0 +1,40 @@
+--- ../frozen-bubble.orig Mon Nov 1 18:29:01 2004
++++ ../frozen-bubble Mon Nov 1 18:31:54 2004
+@@ -319,7 +319,11 @@
+ sub add_image($) {
+ my $file = "$FPATH/gfx/$_[0]";
+ my $img = new SDL::Surface(-name => $file);
+- $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
++ if (UNIVERSAL::isa($img, "HASH")) {
++ $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
++ } else {
++ $img or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
++ }
+ add_default_rect($img);
+ return $img;
+ }
+@@ -1244,7 +1248,11 @@
+ $imgbin{back_1p}->blit($high_rect, $background, $high_rect);
+ open_level($high->{level});
+ put_image($imgbin{hiscore_frame}, $high_posx - 7, $high_posy - 6);
+- fb_c_stuff::shrink($app->{-surface}, $background->display_format()->{-surface}, $high_posx, $high_posy, $high_rect->{-rect}, 4);
++ if (UNIVERSAL::isa($app, "HASH")) {
++ fb_c_stuff::shrink($app->{-surface}, $background->display_format()->{-surface}, $high_posx, $high_posy, $high_rect->{-rect}, 4);
++ } else {
++ fb_c_stuff::shrink($$app, ${$background->display_format}, $high_pox, $high_posy, $$high_rect, 4);
++ }
+ $centered_print->($high_posx, $high_posy, $high->{name});
+ $centered_print->($high_posx, $high_posy+20, $high->{level} eq 'WON' ? "WON!" : "LVL-".$high->{level});
+ my $min = int($high->{time}/60);
+@@ -1412,8 +1420,10 @@
+ if ($graphics_level == 1) {
+ $background->blit($apprects{main}, $app, $apprects{main});
+ $app->flip();
+- } else {
++ } elsif (UNIVERSAL::isa($app, "HASH")) {
+ fb_c_stuff::effect($app->{-surface}, $background->display_format()->{-surface});
++ } else {
++ fb_c_stuff::effect($$app, ${$background->display_format});
+ }
+
+ $display_on_app_disabled = 0;