Patches to perl invaders

[email protected] (Kartik Thakore)
Newsgroups perl.sdl.devel
Message-ID <[email protected]>
diff --git a/bin/perl_invaders.pl b/bin/perl_invaders.pl
index 6776d39..dc90718 100644
--- a/bin/perl_invaders.pl
+++ b/bin/perl_invaders.pl
@@ -1,3 +1,4 @@
+#!perl -w
 use 5.010; use strict; use warnings;
 use SDL::App;
 use SDL::Event;
@@ -83,7 +84,7 @@ while (1) {
     $app->background->blit($onion->rect,$app->window,$onion->rect);
     $onion->rect->x($onion->rect->x + $dir_x);
     $onion->rect->y($onion->rect->y + $dir_y);
-    $onion->surface->blit( undef, $app->window, $onion->rect );
+    $onion->surface->blit( SDL::NULL, $app->window, $onion->rect );

     $app->window->sync;
 }
diff --git a/lib/Game/PerlInvaders/App.pm b/lib/Game/PerlInvaders/App.pm
index 3bbaf23..3b0ad8c 100644
--- a/lib/Game/PerlInvaders/App.pm
+++ b/lib/Game/PerlInvaders/App.pm
@@ -19,7 +19,7 @@ sub BUILD {
     -depth  => 16,

     ));
-    $self->background->blit( undef, $self->window, undef );
+    $self->background->blit( SDL::NULL, $self->window, SDL::NULL );

 }

@@ -53,7 +53,7 @@ sub draw_sprite {
     $sprite->rect->x($sprite->position_x);
     $sprite->rect->y($sprite->position_y);

-    $sprite->surface->blit( undef, $self->window, $sprite->rect );
+    $sprite->surface->blit( SDL::NULL, $self->window, $sprite->rect );
 }

 sub move_like_a_space_invader {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.