Permalink
Browse files

using bmp for people who don't have image support. bmp support is def…

…ault in SDL
  • Loading branch information...
1 parent 4f10e2f commit 4974fb7b86b2cf971daf8932510e3342508b422a @kthakore committed Oct 4, 2010
Showing with 3 additions and 3 deletions.
  1. BIN data/m.bmp
  2. +3 −3 scroller.pl
View
Binary file not shown.
View
@@ -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,
);
@@ -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 );
};

0 comments on commit 4974fb7

Please sign in to comment.