Permalink
Browse files

Fixed up scroller

  • Loading branch information...
kthakore
kthakore committed Sep 10, 2010
1 parent ca47400 commit 974310558d18c122b557b89d8b85ed2ffb41c639
Showing with 3 additions and 8 deletions.
  1. +3 −8 scroller.pl
View
@@ -198,10 +198,6 @@
my $state = shift;
my $c_rect = SDL::Rect->new( $state->x, $state->y, 16, 28 );
-
-# $app->draw_rect( $c_rect, 0xFF00CCFF );
-
- # $app->draw_rect( [50,50, 16, 28], 0xFF00CCFF );
$sprite->x( $state->x );
$sprite->y( $state->y );
$sprite->next();
@@ -230,7 +226,7 @@
$app->add_show_handler(
sub {
$app->draw_rect( [ 0, 0, $app->w, $app->h ], 0x0 );
- $app->draw_rect( $_, 0xFFFF0000 ) foreach @collide_blocks;
+ $app->draw_rect( $_, 0xFF0000FF ) foreach @collide_blocks;
#::GFX::Primitives::string_color( $app, $app->w/2-100, 0, $dashboard, 0xFF0000FF);
SDL::GFX::Primitives::string_color(
@@ -243,11 +239,10 @@
}
);
-$app->add_object( $obj, $render_obj );
-
+$obj->attach( $app, $render_obj );
$app->add_show_handler( sub { $app->update(); } );
-$app->run_test;
+$app->run();
sub check_collision {
my ( $mario, $blocks ) = @_;

0 comments on commit 9743105

Please sign in to comment.