1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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;
|