]> git.pld-linux.org Git - packages/frozen-bubble.git/blob - frozen-bubble-sdl-2.0.5.patch
- add -no_utf8.patch
[packages/frozen-bubble.git] / frozen-bubble-sdl-2.0.5.patch
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);
16  }
17  
18  
19 @@ -1371,7 +1371,7 @@
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});
22      $app->update;
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));
25  }
26  
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
31 @@ -50,6 +50,7 @@
32  
33  use SDL;
34  use SDL::App;
35 +use SDL::SFont;
36  use SDL::Surface;
37  use SDL::Event;
38  use SDL::Cursor;
39 @@ -179,7 +180,7 @@
40             $elem or return -1;
41             -f $elem or return 0;
42             $mus = SDL::Music->new($elem);
43 -           if ($mus->{-data}) {
44 +           if ($$mus) {
45                 print STDERR "[Playlist] playing `$elem'\n";
46                 $mixer->play_music($mus, 0);
47                 return 1;
48 @@ -191,9 +192,9 @@
49         while ($tryanother->() == 0) {};
50      } else {
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";
54         if ($pos) {
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);
57         } else {
58             $mixer->play_music($mus, -1);
59         }
60 @@ -212,7 +213,7 @@
61      foreach (@sounds) {
62         my $sound_path = "$FPATH/snd/$_.wav";
63         $sound{$_} = SDL::Sound->new($sound_path);
64 -       if ($sound{$_}{-data}) {
65 +       if ($sound{$_}) {
66             $sound{$_}->volume(80);
67         } else {
68             print STDERR "Warning, could not create new sound from `$sound_path'.\n";
69 @@ -307,7 +308,7 @@
70  sub add_image($) {
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);
76      return $img;
77  }
78 @@ -880,7 +881,7 @@
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});
84      };
85  }
86  
87 @@ -1437,7 +1438,7 @@
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));
94      };
95  
96 @@ -1473,7 +1474,7 @@
97         }
98  
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 @@
106  
107      foreach my $i (@{$w->{intro}}) {
108         if ($i) {
109 -           my $xpos = (640-SDL_TEXTWIDTH($i))/2;
110 +           my $xpos = (640-SDL::SFont::SDL_TEXTWIDTH($i))/2;
111             $app->print($xpos, $ypos, $i);
112         }
113         $ypos += 22;
114 @@ -1521,7 +1522,7 @@
115      my $ok = 1;
116    entries:
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'});
121         $app->flip;
122         my $srect_mulchar_redraw = SDL::Rect->new(-width => $imgbin{void_panel}->width, -height => 30,
123 @@ -1555,7 +1556,7 @@
124  
125      if ($ok) {
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});
131         $app->flip;
132 @@ -1642,7 +1643,7 @@
133         $background->blit($apprects{main}, $app, $apprects{main});
134         $app->flip;
135      } else {
136 -       fb_c_stuff::effect($app->{-surface}, $background->display_format->{-surface});
137 +       fb_c_stuff::effect($$app, ${$background->display_format()});
138      }
139  
140      $display_on_app_disabled = 0;
This page took 0.452083 seconds and 3 git commands to generate.