diff options
Diffstat (limited to 'games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch')
-rw-r--r-- | games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch index d2960b6b331f..be8dfb058f85 100644 --- a/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch +++ b/games-arcade/frozen-bubble/files/frozen-bubble-1.0.0-sdl-perl-2.patch @@ -3,7 +3,6 @@ http://www.frozen-bubble.org/perl-SDL.patch To fix: http://bugs.gentoo.org/show_bug.cgi?id=74844 -http://bugs.gentoo.org/show_bug.cgi?id=87502 This version of the patch works with both sdl-perl-1.x and sdl-perl-2.x @@ -127,61 +126,3 @@ This version of the patch works with both sdl-perl-1.x and sdl-perl-2.x } $display_on_app_disabled = 0; ---- c_stuff/lib/FBLE.pm -+++ c_stuff/lib/FBLE.pm -@@ -86,6 +86,25 @@ - - #- ----------- bubbles processing/drawing ----------------------------------------- - -+sub surf { -+ my ($surface) = @_; -+ if (ref($surface) eq 'HASH') { -+ return $surface->{-surface}; -+ } else { -+ return $$surface; -+ } -+} -+ -+sub rect { -+ my ($rect) = @_; -+ if (ref($rect) eq 'HASH') { -+ return $rect->{-rect}; -+ } else { -+ return $$rect; -+ } -+} -+ -+ - # subroutine to calculate the left corner x of the given bubble option column (based on 0 start) - sub bubble_optionx { - my ($col) = @_; -@@ -1094,11 +1113,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(surf($app), -+ surf($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($rect{screenshot}), 4); - } - - -@@ -1366,6 +1366,14 @@ - print_dialog_list_arrow($do_highlight, 'up'); - } - -+sub SDL_TEXTWIDTH { -+ if (defined(&SDL::App::SDL_TEXTWIDTH)) { -+ SDL::App::SDL_TEXTWIDTH(@_); # perl-sdl-1.x -+ } else { -+ SDL::SFont::SDL_TEXTWIDTH(@_); # perl-sdl-2.x -+ } -+} -+ - # subroutine to print out the levelset name at the top of the screen - sub print_levelset_name { - $rect{ls_name_erase} = SDL::Rect->new(-x => 195, '-y' => 0, -width => 445-195, -height => 35); |