]> git.pld-linux.org Git - packages/frozen-bubble.git/commitdiff
- fix for perl-SDL-2.0.5+
authorPaweł Sikora <pluto@pld-linux.org>
Thu, 5 Aug 2004 16:12:49 +0000 (16:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  ( http://www.mail-archive.com/sdl-devel@perl.org/msg00045.html )

Changed files:
    frozen-bubble-sdl-2.0.5.patch -> 1.1

frozen-bubble-sdl-2.0.5.patch [new file with mode: 0644]

diff --git a/frozen-bubble-sdl-2.0.5.patch b/frozen-bubble-sdl-2.0.5.patch
new file mode 100644 (file)
index 0000000..62a3dda
--- /dev/null
@@ -0,0 +1,140 @@
+diff -uNr frozen-bubble-1.0.0.orig/c_stuff/lib/FBLE.pm frozen-bubble-1.0.0/c_stuff/lib/FBLE.pm
+--- frozen-bubble-1.0.0.orig/c_stuff/lib/FBLE.pm       2003-02-17 00:14:28.000000000 +0100
++++ frozen-bubble-1.0.0/c_stuff/lib/FBLE.pm    2004-08-05 18:04:30.712497272 +0200
+@@ -1094,11 +1094,11 @@
+     $rect{screenshot} = SDL::Rect->new(-x => $POS_1P{p1}{left_limit} - 40, '-y' => 0, 
+                                      -width => $POS_1P{p1}{right_limit} - $POS_1P{p1}{left_limit} + 80,
+                                      -height => $POS_1P{bottom_limit} - $POS_1P{init_top_limit} + 190);
+-    fb_c_stuff::shrink($app->{-surface},
+-                     $file_browser_screenshots[$list_browser_highlight_offset]->display_format()->{-surface},
++    fb_c_stuff::shrink($$app,
++                     ${$file_browser_screenshots[$list_browser_highlight_offset]->display_format()},
+                      $rect{middle}->x + $rect{middle}->width - $rect{screenshot}->width/4 - 12,
+                      $rect{middle}->y + $rect{middle}->height/2 - $rect{screenshot}->height/8 - 3,
+-                     $rect{screenshot}{-rect}, 4);
++                     ${$rect{screenshot}}, 4);
+ }
+@@ -1371,7 +1371,7 @@
+     $rect{ls_name_erase} = SDL::Rect->new(-x => 195, '-y' => 0, -width => 445-195, -height => 35);
+     $background->blit($rect{ls_name_erase}, $app, $rect{ls_name_erase});
+     $app->update;
+-    $app->print(($background->width - SDL_TEXTWIDTH(uc($levelset_name)))/2 - 6, 7, uc($levelset_name));
++    $app->print(($background->width - SDL::SFont::SDL_TEXTWIDTH(uc($levelset_name)))/2 - 6, 7, uc($levelset_name));
+ }
+ sub print_text_generic {
+diff -uNr frozen-bubble-1.0.0.orig/frozen-bubble frozen-bubble-1.0.0/frozen-bubble
+--- frozen-bubble-1.0.0.orig/frozen-bubble     2003-02-17 00:45:27.000000000 +0100
++++ frozen-bubble-1.0.0/frozen-bubble  2004-08-05 18:04:02.836735032 +0200
+@@ -50,6 +50,7 @@
+ use SDL;
+ use SDL::App;
++use SDL::SFont;
+ use SDL::Surface;
+ use SDL::Event;
+ use SDL::Cursor;
+@@ -179,7 +180,7 @@
+           $elem or return -1;
+           -f $elem or return 0;
+           $mus = SDL::Music->new($elem);
+-          if ($mus->{-data}) {
++          if ($$mus) {
+               print STDERR "[Playlist] playing `$elem'\n";
+               $mixer->play_music($mus, 0);
+               return 1;
+@@ -191,9 +192,9 @@
+       while ($tryanother->() == 0) {};
+     } else {
+       $mus = SDL::Music->new("$FPATH$musics{$name}");
+-      $mus->{-data} or print STDERR "Warning, could not create new music from `$FPATH$musics{$name}' (reason: ", $app->error, ").\n";
++      $mus or print STDERR "Warning, could not create new music from `$FPATH$musics{$name}' (reason: ", $app->error, ").\n";
+       if ($pos) {
+-          fb_c_stuff::fade_in_music_position($mus->{-data}, -1, 500, $pos);
++          fb_c_stuff::fade_in_music_position($$mus, -1, 500, $pos);
+       } else {
+           $mixer->play_music($mus, -1);
+       }
+@@ -212,7 +213,7 @@
+     foreach (@sounds) {
+       my $sound_path = "$FPATH/snd/$_.wav";
+       $sound{$_} = SDL::Sound->new($sound_path);
+-      if ($sound{$_}{-data}) {
++      if ($sound{$_}) {
+           $sound{$_}->volume(80);
+       } else {
+           print STDERR "Warning, could not create new sound from `$sound_path'.\n";
+@@ -307,7 +308,7 @@
+ sub add_image($) {
+     my $file = "$FPATH/gfx/$_[0]";
+     my $img = SDL::Surface->new(-name => $file);
+-    $img->{-surface} or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
++    $$img or die "FATAL: Couldn't load `$file' into a SDL::Surface.\n";
+     add_default_rect($img);
+     return $img;
+ }
+@@ -880,7 +881,7 @@
+     $background_orig->blit($drect, $surface, $drect);
+     push @update_rects, $drect;
+     iter_players_ {  #- sometimes called from within a iter_players so...
+-      $surface->print($POS{$::p_}{scoresx}-SDL_TEXTWIDTH($pdata{$::p_}{score})/2, $POS{scoresy}, $pdata{$::p_}{score});
++      $surface->print($POS{$::p_}{scoresx}-SDL::SFont::SDL_TEXTWIDTH($pdata{$::p_}{score})/2, $POS{scoresy}, $pdata{$::p_}{score});
+     };
+ }
+@@ -1437,7 +1438,7 @@
+     $font = SDL::Font->new("$FPATH/gfx/font-hi.png");
+     my $centered_print = sub($$$) {
+       my ($x, $y, $txt) = @_;
+-      $app->print($x+($imgbin{hiscore_frame}->width-SDL_TEXTWIDTH(uc($txt)))/2 - 6,
++      $app->print($x+($imgbin{hiscore_frame}->width-SDL::SFont::SDL_TEXTWIDTH(uc($txt)))/2 - 6,
+                   $y+$imgbin{hiscore_frame}->height - 8, uc($txt));
+     };
+@@ -1473,7 +1474,7 @@
+       }
+       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);
++      fb_c_stuff::shrink($$app, ${$background->display_format()}, $high_posx, $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);
+@@ -1510,7 +1511,7 @@
+     foreach my $i (@{$w->{intro}}) {
+       if ($i) {
+-          my $xpos = (640-SDL_TEXTWIDTH($i))/2;
++          my $xpos = (640-SDL::SFont::SDL_TEXTWIDTH($i))/2;
+           $app->print($xpos, $ypos, $i);
+       }
+       $ypos += 22;
+@@ -1521,7 +1522,7 @@
+     my $ok = 1;
+   entries:
+     foreach my $entry (@{$w->{entries}}) {
+-      $xpos = (640-$imgbin{void_panel}->width)/2 + 120 - SDL_TEXTWIDTH($entry->{'q'})/2;
++      $xpos = (640-$imgbin{void_panel}->width)/2 + 120 - SDL::SFont::SDL_TEXTWIDTH($entry->{'q'})/2;
+       $app->print($xpos, $ypos, $entry->{'q'});
+       $app->flip;
+       my $srect_mulchar_redraw = SDL::Rect->new(-width => $imgbin{void_panel}->width, -height => 30,
+@@ -1555,7 +1556,7 @@
+     if ($ok) {
+       ${$_->{a}} = $_->{answer} foreach @{$w->{entries}};
+-      $xpos = (640-SDL_TEXTWIDTH($w->{outro}))/2;
++      $xpos = (640-SDL::SFont::SDL_TEXTWIDTH($w->{outro}))/2;
+       $ypos = (480+$imgbin{void_panel}->height)/2 - 35;
+       $app->print($xpos, $ypos, $w->{outro});
+       $app->flip;
+@@ -1642,7 +1643,7 @@
+       $background->blit($apprects{main}, $app, $apprects{main});
+       $app->flip;
+     } else {
+-      fb_c_stuff::effect($app->{-surface}, $background->display_format->{-surface});
++      fb_c_stuff::effect($$app, ${$background->display_format()});
+     }
+     $display_on_app_disabled = 0;
This page took 0.112261 seconds and 4 git commands to generate.