1 diff -uNr frozen-bubble-1.0.0.orig/c_stuff/lib/FBLE.pm frozen-bubble-1.0.0/c_stuff/lib/FBLE.pm
2 --- frozen-bubble-1.0.0.orig/c_stuff/lib/FBLE.pm 2003-02-17 00:14:28.000000000 +0100
3 +++ frozen-bubble-1.0.0/c_stuff/lib/FBLE.pm 2004-08-05 18:04:30.712497272 +0200
4 @@ -1094,11 +1094,11 @@
5 $rect{screenshot} = SDL::Rect->new(-x => $POS_1P{p1}{left_limit} - 40, '-y' => 0,
6 -width => $POS_1P{p1}{right_limit} - $POS_1P{p1}{left_limit} + 80,
7 -height => $POS_1P{bottom_limit} - $POS_1P{init_top_limit} + 190);
8 - fb_c_stuff::shrink($app->{-surface},
9 - $file_browser_screenshots[$list_browser_highlight_offset]->display_format()->{-surface},
10 + fb_c_stuff::shrink($$app,
11 + ${$file_browser_screenshots[$list_browser_highlight_offset]->display_format()},
12 $rect{middle}->x + $rect{middle}->width - $rect{screenshot}->width/4 - 12,
13 $rect{middle}->y + $rect{middle}->height/2 - $rect{screenshot}->height/8 - 3,
14 - $rect{screenshot}{-rect}, 4);
15 + ${$rect{screenshot}}, 4);
20 $rect{ls_name_erase} = SDL::Rect->new(-x => 195, '-y' => 0, -width => 445-195, -height => 35);
21 $background->blit($rect{ls_name_erase}, $app, $rect{ls_name_erase});
23 - $app->print(($background->width - SDL_TEXTWIDTH(uc($levelset_name)))/2 - 6, 7, uc($levelset_name));
24 + $app->print(($background->width - SDL::SFont::SDL_TEXTWIDTH(uc($levelset_name)))/2 - 6, 7, uc($levelset_name));
27 sub print_text_generic {
28 diff -uNr frozen-bubble-1.0.0.orig/frozen-bubble frozen-bubble-1.0.0/frozen-bubble
29 --- frozen-bubble-1.0.0.orig/frozen-bubble 2003-02-17 00:45:27.000000000 +0100
30 +++ frozen-bubble-1.0.0/frozen-bubble 2004-08-05 18:04:02.836735032 +0200
42 $mus = SDL::Music->new($elem);
43 - if ($mus->{-data}) {
45 print STDERR "[Playlist] playing `$elem'\n";
46 $mixer->play_music($mus, 0);
49 while ($tryanother->() == 0) {};
51 $mus = SDL::Music->new("$FPATH$musics{$name}");
52 - $mus->{-data} or print STDERR "Warning, could not create new music from `$FPATH$musics{$name}' (reason: ", $app->error, ").\n";
53 + $mus or print STDERR "Warning, could not create new music from `$FPATH$musics{$name}' (reason: ", $app->error, ").\n";
55 - fb_c_stuff::fade_in_music_position($mus->{-data}, -1, 500, $pos);
56 + fb_c_stuff::fade_in_music_position($$mus, -1, 500, $pos);
58 $mixer->play_music($mus, -1);
62 my $sound_path = "$FPATH/snd/$_.wav";
63 $sound{$_} = SDL::Sound->new($sound_path);
64 - if ($sound{$_}{-data}) {
66 $sound{$_}->volume(80);
68 print STDERR "Warning, could not create new sound from `$sound_path'.\n";
71 my $file = "$FPATH/gfx/$_[0]";
72 my $img = SDL::Surface->new(-name => $file);
73 - $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
74 + $$img or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
75 add_default_rect($img);
79 $background_orig->blit($drect, $surface, $drect);
80 push @update_rects, $drect;
81 iter_players_ { #- sometimes called from within a iter_players so...
82 - $surface->print($POS{$::p_}{scoresx}-SDL_TEXTWIDTH($pdata{$::p_}{score})/2, $POS{scoresy}, $pdata{$::p_}{score});
83 + $surface->print($POS{$::p_}{scoresx}-SDL::SFont::SDL_TEXTWIDTH($pdata{$::p_}{score})/2, $POS{scoresy}, $pdata{$::p_}{score});
88 $font = SDL::Font->new("$FPATH/gfx/font-hi.png");
89 my $centered_print = sub($$$) {
90 my ($x, $y, $txt) = @_;
91 - $app->print($x+($imgbin{hiscore_frame}->width-SDL_TEXTWIDTH(uc($txt)))/2 - 6,
92 + $app->print($x+($imgbin{hiscore_frame}->width-SDL::SFont::SDL_TEXTWIDTH(uc($txt)))/2 - 6,
93 $y+$imgbin{hiscore_frame}->height - 8, uc($txt));
99 put_image($imgbin{hiscore_frame}, $high_posx - 7, $high_posy - 6);
100 - fb_c_stuff::shrink($app->{-surface}, $background->display_format->{-surface}, $high_posx, $high_posy, $high_rect->{-rect}, 4);
101 + fb_c_stuff::shrink($$app, ${$background->display_format()}, $high_posx, $high_posy, $$high_rect, 4);
102 $centered_print->($high_posx, $high_posy, $high->{name});
103 $centered_print->($high_posx, $high_posy+20, $high->{level} eq 'WON' ? "WON!" : "LVL-".$high->{level});
104 my $min = int($high->{time}/60);
105 @@ -1510,7 +1511,7 @@
107 foreach my $i (@{$w->{intro}}) {
109 - my $xpos = (640-SDL_TEXTWIDTH($i))/2;
110 + my $xpos = (640-SDL::SFont::SDL_TEXTWIDTH($i))/2;
111 $app->print($xpos, $ypos, $i);
114 @@ -1521,7 +1522,7 @@
117 foreach my $entry (@{$w->{entries}}) {
118 - $xpos = (640-$imgbin{void_panel}->width)/2 + 120 - SDL_TEXTWIDTH($entry->{'q'})/2;
119 + $xpos = (640-$imgbin{void_panel}->width)/2 + 120 - SDL::SFont::SDL_TEXTWIDTH($entry->{'q'})/2;
120 $app->print($xpos, $ypos, $entry->{'q'});
122 my $srect_mulchar_redraw = SDL::Rect->new(-width => $imgbin{void_panel}->width, -height => 30,
123 @@ -1555,7 +1556,7 @@
126 ${$_->{a}} = $_->{answer} foreach @{$w->{entries}};
127 - $xpos = (640-SDL_TEXTWIDTH($w->{outro}))/2;
128 + $xpos = (640-SDL::SFont::SDL_TEXTWIDTH($w->{outro}))/2;
129 $ypos = (480+$imgbin{void_panel}->height)/2 - 35;
130 $app->print($xpos, $ypos, $w->{outro});
132 @@ -1642,7 +1643,7 @@
133 $background->blit($apprects{main}, $app, $apprects{main});
136 - fb_c_stuff::effect($app->{-surface}, $background->display_format->{-surface});
137 + fb_c_stuff::effect($$app, ${$background->display_format()});
140 $display_on_app_disabled = 0;