Permalink
Browse files

merge upstream/experimental

  • Loading branch information...
2 parents 3a24456 + 0756fb2 commit f242b628324eab30cec9dd1e888b47bcb0641738 @mig0 committed May 26, 2012
Showing with 740 additions and 1,751 deletions.
  1. +14 −3 CHANGELOG
  2. +8 −0 examples/SDLx/SDLx_C_Interface.pl
  3. +1 −0 examples/SDLx/SDLx_Sound.pl
  4. +2 −0 examples/SDLx/SDLx_controller_two_squares.pl
  5. +1 −1 examples/SDLx/SDLx_text.pl
  6. +1 −1 examples/SDLx/SDLx_text_shadow.pl
  7. +1 −1 examples/SDLx/SDLx_text_styles.pl
  8. +1 −1 examples/SDLx/SDLx_text_wordwrap.pl
  9. +1 −1 examples/SDLx/SDLx_text_zoom.pl
  10. +8 −4 examples/SDLx/app.pl
  11. +1 −1 examples/SDLx/music.pl
  12. +3 −1 examples/SDLx/pong.pl
  13. +1 −1 lib/SDL.pm
  14. +175 −291 lib/SDLx/App.pm
  15. +117 −185 lib/SDLx/Controller.pm
  16. +2 −7 lib/SDLx/Music.pm
  17. +7 −48 lib/SDLx/Surface.pm
  18. +1 −1 lib/pods/SDL.pod
  19. +2 −2 lib/pods/SDL/Audio.pod
  20. +1 −1 lib/pods/SDL/AudioSpec.pod
  21. +1 −1 lib/pods/SDL/CD.pod
  22. +4 −4 lib/pods/SDL/Cookbook/OpenGL.pod
  23. +3 −3 lib/pods/SDL/Cookbook/PDL.pod
  24. +2 −32 lib/pods/SDL/Deprecated.pod
  25. +5 −5 lib/pods/SDL/Event.pod
  26. +13 −13 lib/pods/SDL/Events.pod
  27. +2 −2 lib/pods/SDL/GFX/Framerate.pod
  28. +2 −2 lib/pods/SDL/GFX/Primitives.pod
  29. +2 −2 lib/pods/SDL/MPEG.pod
  30. +1 −1 lib/pods/SDL/Mixer.pod
  31. +2 −2 lib/pods/SDL/Mixer/Channels.pod
  32. +2 −2 lib/pods/SDL/Mixer/Groups.pod
  33. +1 −1 lib/pods/SDL/Mixer/Music.pod
  34. +1 −1 lib/pods/SDL/Overlay.pod
  35. +3 −3 lib/pods/SDL/Pango.pod
  36. +13 −13 lib/pods/SDL/RWOps.pod
  37. +1 −1 lib/pods/SDL/SMPEG.pod
  38. +0 −6 lib/pods/SDL/Surface.pod
  39. +9 −9 lib/pods/SDL/TTF.pod
  40. +1 −1 lib/pods/SDL/Tutorial/LunarLander.pod
  41. +6 −6 lib/pods/SDL/Video.pod
  42. +105 −366 lib/pods/SDLx/App.pod
  43. +138 −387 lib/pods/SDLx/Controller.pod
  44. +3 −3 lib/pods/SDLx/Controller/Interface.pod
  45. +4 −4 lib/pods/SDLx/Layer.pod
  46. +4 −4 lib/pods/SDLx/LayerManager.pod
  47. +2 −2 lib/pods/SDLx/Music.pod
  48. +2 −2 lib/pods/SDLx/Rect.pod
  49. +16 −16 lib/pods/SDLx/Sound.pod
  50. +1 −1 lib/pods/SDLx/Sprite.pod
  51. +1 −1 lib/pods/SDLx/Sprite/Animated.pod
  52. +4 −4 lib/pods/SDLx/Surface.pod
  53. +2 −2 lib/pods/SDLx/Text.pod
  54. +5 −9 t/sdlx_app.t
  55. +29 −288 t/sdlx_controller.t
  56. +2 −2 t/sdlx_surface.t
View
@@ -2,7 +2,20 @@ Revision history for Perl extension SDL_perl.
Versioning rule: public releases are even numbers, dev releases are odd. (same like perl dist)
-* 2.537_03 Apr 12 2012
+* 2.541_01 May 26 2012
+ - SDL::GFX::ImageFilter: turn off MMX [FROGGS]
+ - SDLx::App: removed return from stash lvalue sub [FROGGS]
+ - SDL::Constants: added constants for SDL_DEFAULT_REPEAT_DELAY and SDL_DEFAULT_REPEAT_INTERVAL [FROGGS]
+ - SDL::Mixer::Channels: little change for setting context, still not perfect [FROGGS]
+ - t/mixer_music.t: using ogg files [FROGGS]
+
+* 2.540 May 26 2012
+ - Removed all non-pod changes introduced in 2.538 [jtpalmer]
+ - Fixed bugtracker link [FROGGS]
+ - Added SDL::Platform pod [pktm]
+
+* 2.538 May 22 2012
+ - Pod updates [mig0]
- SDLx::App made the docs a lot better [Blaizer]
- SDLx::App changed around shortcut names in the constructor [Blaizer]
- SDLx::App added and improved parameters of the constructor, see docs [Blaizer]
@@ -22,8 +35,6 @@ Versioning rule: public releases are even numbers, dev releases are odd. (same l
- SDLx::Controller added time and sleep methods to replace get_ticks and delay [Blaizer]
- SDLx::Controller added some tests for pausing and events [Blaizer]
- SDLx::Controller removed current_time parameter [Blaizer]
-
-* 2.537_02 Feb 13 2012
- t/core_cd.t: gnu hurd 0.3 handles devices like cdrom strange (skipping tests) [FROGGS]
- t/sdlx_fps.t: seems better to try to get 5 fps (slow vm's) [FROGGS]
- SDLx::Controller::Interface: weaken tests [FROGGS]
@@ -34,6 +34,14 @@
$app->draw_rect( [ 100 - $state->x, $state->y, 2, 2 ], 0xFF0FFF );
};
+#an event handler to exit
+my $event = sub {
+ $_[1]->stop if $_[0]->type == SDL_QUIT;
+};
+
+
+$app->add_event_handler($event);
+
#clear the screen
$app->add_show_handler( sub { $app->draw_rect( [ 0, 0, $app->w, $app->h ], 0x000000 ) } );
@@ -44,6 +44,7 @@
# pause or resume on keydown
$app->add_event_handler( sub{
my $e = $_[0];
+ $_[1]->stop() if $e->type == SDL_QUIT;
if( $e->type == SDL_KEYDOWN )
{
print "Ai\n";
@@ -101,6 +101,8 @@ sub on_event {
$ball->{x_vel} += $ball->{vel} if $key == SDLK_LEFT;
$ball->{x_vel} -= $ball->{vel} if $key == SDLK_RIGHT;
+ } elsif ( $event->type == SDL_QUIT ) {
+ $_[0]->stop;
}
}
@@ -5,7 +5,7 @@
use SDLx::App;
use SDLx::Text;
-my $app = SDLx::App->new();
+my $app = SDLx::App->new( eoq => 1 );
my $text = SDLx::Text->new;
@@ -7,7 +7,7 @@
use SDLx::App;
use SDLx::Text;
-my $app = SDLx::App->new();
+my $app = SDLx::App->new( eoq => 1 );
my $normal = SDLx::Text->new;
my $shadow = SDLx::Text->new( shadow => 1 );
@@ -5,7 +5,7 @@
use SDLx::App;
use SDLx::Text;
-my $app = SDLx::App->new();
+my $app = SDLx::App->new( eoq => 1 );
my $text = SDLx::Text->new;
@@ -5,7 +5,7 @@
use SDLx::App;
use SDLx::Text;
-my $app = SDLx::App->new();
+my $app = SDLx::App->new( eoq => 1 );
my $text = SDLx::Text->new( word_wrap => 450 );
@@ -7,7 +7,7 @@
use SDLx::App;
use SDLx::Text;
-my $app = SDLx::App->new( width => 400, height => 100 );
+my $app = SDLx::App->new( eoq => 1, width => 400, height => 100 );
my $text = SDLx::Text->new;
View
@@ -7,11 +7,15 @@
height => 480,
);
-sub draw_lines {
- $app->draw_line( [ rand $app->w, rand $app->h ], [ rand $app->w, rand $app->h ], 0xFFFFFFFF );
- $app->update();
-}
+
+sub draw_lines { $app->draw_line( [ 0, 0 ], [ rand( $app->w ), rand( $app->h ) ], 0xFFFFFFFF ); $app->update(); }
+
+sub event_handle { my $e = shift; $_[0]->stop if ( $e->type == SDL_QUIT ); }
+
+$app->add_event_handler( \&event_handle );
$app->add_show_handler( \&draw_lines );
$app->run();
+
+
@@ -4,4 +4,4 @@
$music->data( sam => "test/data/sample.wav" );
$sam = $music->data("sam");
$music->play($sam);
-while ( $music->playing ) { print "playing\n"; sleep 1; }
+while ( $music->playing ) { print "playing\n" }
@@ -29,7 +29,7 @@
y => 0,
w => 20,
h => 80,
- vel => 130,
+ vel => 250,
y_vel => 0,
};
@@ -143,6 +143,8 @@ sub on_event {
my $key = $event->key_sym;
$paddle->{y_vel} += $paddle->{vel} if $key == SDLK_UP;
$paddle->{y_vel} -= $paddle->{vel} if $key == SDLK_DOWN;
+ } elsif ( $event->type == SDL_QUIT ) {
+ exit;
}
}
View
@@ -54,7 +54,7 @@ our %EXPORT_TAGS = (
defaults => $SDL::Constants::EXPORT_TAGS{'SDL/defaults'}
);
-our $VERSION = '2.537_02';
+our $VERSION = '2.541_01';
$VERSION = eval $VERSION;
print "$VERSION" if ( defined( $ARGV[0] ) && ( $ARGV[0] eq '--SDLperl' ) );
Oops, something went wrong. Retry.

0 comments on commit f242b62

Please sign in to comment.