SDL::App::FPS 0.21
Sponsored Links
SDL::App::FPS 0.21 Ranking & Summary
File size:
0.095 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1138
Date added:
2006-09-29
Publisher:
Tels
SDL::App::FPS 0.21 description
SDL::App::FPS is a framework for event-driven SDL games/applications.
SYNOPSIS
Subclass SDL::App::FPS and override some methods:
package SDL::App::MyFPS;
use strict;
use SDL::App::FPS;
use SDL;
use base qw/SDL::App::FPS/;
# override the method draw_frame with something to draw
sub draw_frame
{
my ($self,$current_time,$lastframe_time,$current_fps) = @_;
...
}
# override post_init_handler and add some event handlers
sub post_init_handler
{
my ($self} = shift;
my $self->add_event_handler(SDL_KEYDOWN, SDLK_q, sub
{
my $self = shift; $self->quit();
} );
# or easier for often-used events (note quoted SDLK_f!)
$self->watch_event( fullscreen => SDLK_f, pause => p,
quit => SDLK_q,
);
# You can also specify the key/mousebutton bindings for these events
# in the config file like "bind_event_fullscreen = f"
}
Then write a small script using SDL::App::MyFPS like this:
#!/usr/bin/perl -w
use strict;
use SDL::App::MyFPS;
# fill in here default options if you like
my $options = { };
# create a new application including window
# automatically uses a config file or the command line:
my $app = SDL::App::MyFPS->new( $options );
# run the application, will exit when done
$app->main_loop();
Thats all!
SYNOPSIS
Subclass SDL::App::FPS and override some methods:
package SDL::App::MyFPS;
use strict;
use SDL::App::FPS;
use SDL;
use base qw/SDL::App::FPS/;
# override the method draw_frame with something to draw
sub draw_frame
{
my ($self,$current_time,$lastframe_time,$current_fps) = @_;
...
}
# override post_init_handler and add some event handlers
sub post_init_handler
{
my ($self} = shift;
my $self->add_event_handler(SDL_KEYDOWN, SDLK_q, sub
{
my $self = shift; $self->quit();
} );
# or easier for often-used events (note quoted SDLK_f!)
$self->watch_event( fullscreen => SDLK_f, pause => p,
quit => SDLK_q,
);
# You can also specify the key/mousebutton bindings for these events
# in the config file like "bind_event_fullscreen = f"
}
Then write a small script using SDL::App::MyFPS like this:
#!/usr/bin/perl -w
use strict;
use SDL::App::MyFPS;
# fill in here default options if you like
my $options = { };
# create a new application including window
# automatically uses a config file or the command line:
my $app = SDL::App::MyFPS->new( $options );
# run the application, will exit when done
$app->main_loop();
Thats all!
SDL::App::FPS 0.21 Screenshot
SDL::App::FPS 0.21 Keywords
SDL
FPS
MyFPS
FPS 0.21
SDLK
framework
Event-driven
event
0.21
SDL::App::FPS
SDLAppFPS
SDL::App::FPS 0.21
Libraries
Programming
Bookmark SDL::App::FPS 0.21
SDL::App::FPS 0.21 Copyright
WareSeeker periodically updates pricing and software information of SDL::App::FPS 0.21 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of SDL::App::FPS 0.21 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
Related Software
SDL Fungus is an addictive, multiplayer puzzle game based on NetFungus for two to four players. Free Download
Lufs::C is a C interface to perl. Free Download
libglfps project is a library that adds an FPS display to any OpenGL application. Free Download
Simple DirectMedia Layer is a cross-platform multimedia library. Free Download
SDL for AmigaOS 4.0 project is a port of SDL, the Simple Directmedia Layer, for AmigaOS 4.0. Free Download
SDL Sasteroids project is a rework of the original Sasteroids game. Free Download
SharpNES is a clean-room NES emulator using SDL and GTK#. Free Download
SDL Vexed is a puzzle game written in Perl-SDL. Free Download
Latest Software
Popular Software
Favourite Software