diff options
author | pav <pav@FreeBSD.org> | 2004-11-03 07:14:17 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-11-03 07:14:17 +0800 |
commit | 6f80808a86d4b423a0bc422856dd02c681872e93 (patch) | |
tree | 642f135184306c8913da3d194ad12ad31aa9973d /games | |
parent | 0502156d8c76d8f075812bfb801bb7d0ceeab515 (diff) | |
download | freebsd-ports-gnome-6f80808a86d4b423a0bc422856dd02c681872e93.tar.gz freebsd-ports-gnome-6f80808a86d4b423a0bc422856dd02c681872e93.tar.zst freebsd-ports-gnome-6f80808a86d4b423a0bc422856dd02c681872e93.zip |
- 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>
Diffstat (limited to 'games')
-rw-r--r-- | games/frozenbubble/Makefile | 2 | ||||
-rw-r--r-- | games/frozenbubble/files/patch-frozen-bubble | 40 |
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; |