Skip to content

Commit

Permalink
Reverted to 2.537_02
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpalmer committed May 26, 2012
1 parent 56b42b2 commit abd03a3
Show file tree
Hide file tree
Showing 35 changed files with 696 additions and 1,874 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Expand Up @@ -606,7 +606,7 @@ my $build = $package->new(
#create_readme => 1, ### make sense only if there is some POD doc in the file specified by dist_version_from
meta_merge => {
resources => {
bugtracker => 'http://github.com/PerlGameDev/SDL/issues',
bugtracker => 'http://sdlperl.ath.cx/projects/SDLPerl',
repository => 'http://github.com/PerlGameDev/SDL'
}
},
Expand Down
22 changes: 1 addition & 21 deletions CHANGELOG
Expand Up @@ -2,27 +2,7 @@ Revision history for Perl extension SDL_perl.

Versioning rule: public releases are even numbers, dev releases are odd. (same like perl dist)

* 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]
- SDLx::App updated methods resize, title, icon, error, show_cursor, grab_input [Blaizer]
- SDLx::App fullscreen method works better [Blaizer]
- SDLx::App new init method does our initializing right [Blaizer]
- SDLx::App new set_video_mode method does set_video_mode for SDLx::App [Blaizer]
- SDLx::App new screen_size method returns the user's screen size [Blaizer]
- SDLx::App warp method renamed to warp_cursor, attribute renamed to gl_attribute [Blaizer]
- SDLx::App fix to return the user's resolution to normal when a fullscreen app closes [FROGGS]
- SDLx::App removed delay method and deprecated get_ticks [Blaizer]
- SDLx::Controller removed eoq, its action is on by default and implemented by stop_handler [Blaizer]
- SDLx::Controller made the docs a lot better, even proofread them [Blaizer]
- SDLx::Controller pause works by stopping the app [Blaizer]
- SDLx::Controller added stopped and paused methods to tell what the app is doing [Blaizer]
- SDLx::Controller added max_t param, by default slows down apps going at less than 10 FPS [Blaizer]
- 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]
Expand Down
8 changes: 8 additions & 0 deletions examples/SDLx/SDLx_C_Interface.pl
Expand Up @@ -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 ) } );

Expand Down
1 change: 1 addition & 0 deletions examples/SDLx/SDLx_Sound.pl
Expand Up @@ -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";
Expand Down
2 changes: 2 additions & 0 deletions examples/SDLx/SDLx_controller_two_squares.pl
Expand Up @@ -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;
}

}
Expand Down
2 changes: 1 addition & 1 deletion examples/SDLx/SDLx_text.pl
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion examples/SDLx/SDLx_text_shadow.pl
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion examples/SDLx/SDLx_text_styles.pl
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion examples/SDLx/SDLx_text_wordwrap.pl
Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion examples/SDLx/SDLx_text_zoom.pl
Expand Up @@ -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;

Expand Down
12 changes: 8 additions & 4 deletions examples/SDLx/app.pl
Expand Up @@ -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();


2 changes: 1 addition & 1 deletion examples/SDLx/music.pl
Expand Up @@ -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" }
4 changes: 3 additions & 1 deletion examples/SDLx/pong.pl
Expand Up @@ -29,7 +29,7 @@
y => 0,
w => 20,
h => 80,
vel => 130,
vel => 250,
y_vel => 0,
};

Expand Down Expand Up @@ -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;
}
}

Expand Down
7 changes: 2 additions & 5 deletions lib/SDL/Constants.pm
Expand Up @@ -1030,11 +1030,6 @@ use constant {
KMOD_META => ( KMOD_LMETA | KMOD_RMETA ),
}; # SDL::Events/keymod
use constant {
SDL_DEFAULT_REPEAT_DELAY => 500,
SDL_DEFAULT_REPEAT_INTERVAL => 30,
}; # SDL::Events/repeat
use constant {
SMOOTHING_OFF => 0,
SMOOTHING_ON => 1,
Expand Down Expand Up @@ -1222,6 +1217,8 @@ use constant {
FPS_LOWER_LIMIT => 1,
FPS_DEFAULT => 30,
SDL_ALL_HOTKEYS => 0xFFFFFFFF,
SDL_DEFAULT_REPEAT_DELAY => 500,
SDL_DEFAULT_REPEAT_INTERVAL => 30,
};
use constant {
Expand Down
3 changes: 1 addition & 2 deletions lib/SDL/Event.pm
Expand Up @@ -24,8 +24,7 @@ our %EXPORT_TAGS = (
app => $SDL::Constants::EXPORT_TAGS{'SDL::Events/app'},
button => $SDL::Constants::EXPORT_TAGS{'SDL::Events/button'},
keysym => $SDL::Constants::EXPORT_TAGS{'SDL::Events/keysym'},
keymod => $SDL::Constants::EXPORT_TAGS{'SDL::Events/keymod'},
repeat => $SDL::Constants::EXPORT_TAGS{'SDL::Events/repeat'}
keymod => $SDL::Constants::EXPORT_TAGS{'SDL::Events/keymod'}
);

1;
3 changes: 1 addition & 2 deletions lib/SDL/Events.pm
Expand Up @@ -24,8 +24,7 @@ our %EXPORT_TAGS = (
app => $SDL::Constants::EXPORT_TAGS{'SDL::Events/app'},
button => $SDL::Constants::EXPORT_TAGS{'SDL::Events/button'},
keysym => $SDL::Constants::EXPORT_TAGS{'SDL::Events/keysym'},
keymod => $SDL::Constants::EXPORT_TAGS{'SDL::Events/keymod'},
repeat => $SDL::Constants::EXPORT_TAGS{'SDL::Events/repeat'}
keymod => $SDL::Constants::EXPORT_TAGS{'SDL::Events/keymod'}
);

1;
2 changes: 0 additions & 2 deletions lib/SDL/GFX/ImageFilter.pm
Expand Up @@ -19,6 +19,4 @@ our %EXPORT_TAGS = (
smoothing => $SDL::Constants::EXPORT_TAGS{'SDL::GFX/smoothing'}
);

MMX_on();

1;

2 comments on commit abd03a3

@Blaizer
Copy link
Member

@Blaizer Blaizer commented on abd03a3 Jun 9, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh...? Why?

@jtpalmer
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.538 should have been the same as 2.537_02. We don't want any non-dev releases with changes that haven't been tested with a dev release.

There were both XS and Perl versions of SDLx::Surface::draw_rect and SDLx::Surface::blit, so it looks like there was a problem with a merge.

Check out the test reports:

http://static.cpantesters.org/distro/S/SDL.html#2.538

There was also a thread on the mailing list about this if you missed it:

http://www.nntp.perl.org/group/perl.sdl.devel/2012/05/msg1902.html

I've tried re-merging the changes, but haven't had much success. Feel free giving it a try and we can put out another dev release.

Please sign in to comment.