Skip to content

Commit

Permalink
set_color_key is working now with get_pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Leich committed May 2, 2010
1 parent 7f7b469 commit 827ac8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/pangzero
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ sub Draw {
}
$dstrect = SDL::Rect->new(
$self->{x} + $::ScreenMargin + ($self->{w} - $srcrect->w()) / 2,
$self->{y} + $::ScreenMargin + ($self->{h} - $srcrect->h()) / 2 + 2, 0, 0);
$self->{y} + $::ScreenMargin + ($self->{h} - $srcrect->h()) / 2 + 2, $srcrect->w, $srcrect->h);
SDL::Video::blit_surface($guySurface, $srcrect, $::App, $dstrect);
}

Expand Down Expand Up @@ -2616,7 +2616,6 @@ sub LoadSurfaces {
$BallSurfaces{$_} = SDL::Image::load("$DataDir/$balls{$_}");
$transparentColor = $BallSurfaces{$_}->get_pixel(0);
SDL::Video::set_color_key($BallSurfaces{$_}, SDL_SRCCOLORKEY, $transparentColor );
# print join(' ', $_, "\t", $transparentColor->r, $transparentColor->g, $transparentColor->b), "\n";
$BallSurfaces{$_} = SDL::Video::display_format($BallSurfaces{$_});
$BallSurfaces{"dark$_"} = SDL::Image::load( "$DataDir/$balls{$_}");
SDL::Video::set_color_key($BallSurfaces{"dark$_"}, SDL_SRCCOLORKEY, $BallSurfaces{"dark$_"}->get_pixel(0) );
Expand Down

0 comments on commit 827ac8c

Please sign in to comment.