Skip to content

Commit

Permalink
using bmp for people who don't have image support. bmp support is def…
Browse files Browse the repository at this point in the history
…ault in SDL
  • Loading branch information
f0rodo committed Oct 4, 2010
1 parent 4f10e2f commit 4974fb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file added data/m.bmp
Binary file not shown.
6 changes: 3 additions & 3 deletions scroller.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
my @update_rects = ();

my $sprite = SDLx::Sprite::Animated->new(
image => 'data/m.png',
image => 'data/m.bmp',
rect => SDL::Rect->new( 0, 0, 16, 28 ),
ticks_per_frame => 6,
);
Expand Down Expand Up @@ -191,11 +191,11 @@
my $render_obj = sub {

my $state = shift;

my $c_rect = SDL::Rect->new( $state->x, $state->y, 16, 28 );
$sprite->x( $state->x );
$sprite->y( $state->y );
$sprite->draw($app);
$sprite->draw($app->surface);
#$app->draw_rect( [ $state->x, $state->y, 16, 28 ], 0xFF00FFFF );

};

Expand Down

0 comments on commit 4974fb7

Please sign in to comment.