X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Tutorial.html-inc;h=256fb70651245db6d9a98f7319dc21dc40537925;hb=HEAD;hp=a5b8dcf44d15c4b1d873866799789ee4a40d687b;hpb=148a0b32588c107b723f439e6682e3af3126cec9;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Tutorial.html-inc b/pages/SDL-Tutorial.html-inc index a5b8dcf..256fb70 100644 --- a/pages/SDL-Tutorial.html-inc +++ b/pages/SDL-Tutorial.html-inc @@ -7,6 +7,7 @@
SDL::Tutorial
are incomplete and old. A new book has been started to provide
+a complete tutorial for SDL. See http://bit.ly/hvxc9V.
SDL, the Simple DirectMedia Layer, is a cross-platform multimedia library. @@ -53,7 +60,7 @@ though. Here's how to get up and running as quickly as possible.
All graphics in SDL live on a surface. You'll need at least one. That's what -SDL::App provides.
+SDLx::App provides.Of course, before you can get a surface, you need to initialize your video mode. SDL gives you several options, including whether to run in a window or take over the full screen, the size of the window, the bit depth of your @@ -63,32 +70,32 @@ something really simple.
SDL::App makes it easy to initialize video and create a surface. Here's how to +
SDLx::App makes it easy to initialize video and create a surface. Here's how to ask for a windowed surface with 640x480x16 resolution:
-use SDL::App; +use SDLx::App; - my $app = SDL::App->new( - -width => 640, - -height => 480, - -depth => 16, + my $app = SDLx::App->new( + width => 640, + height => 480, + depth => 16, );-You can get more creative, especially if you use the
-title
and-icon
+You can get more creative, especially if you use the
-title
andicon
attributes in a windowed application. Here's how to set the window title of the application toMy SDL Program
:use SDL::App; +use SDLx::App; - my $app = SDL::App->new( - -height => 640, - -width => 480, - -depth => 16, - -title => 'My SDL Program', + my $app = SDLx::App->new( + height => 640, + width => 480, + depth => 16, + title => 'My SDL Program', );Setting an icon is a little more involved -- you have to load an image onto a -surface. That's a bit more complicated, but see the
-name
parameter to +surface. That's a bit more complicated, but see thename
parameter toSDL::Surface-
new()> if you want to skip ahead.
update
the $app
.
basic drawing with rectangles
-basic rectangle animation
+basic rectangle drawing and animation
image loading and animation
+basic image loading and animation
chromatic, <chromatic@wgz.org>.
-Written for and maintained by the Perl SDL project, http://sdl.perl.org/.
+chromatic, <chromatic@wgz.org>.
+Written for and maintained by the Perl SDL project, http://sdl.perl.org/. See /SDL.html#AUTHORS for details.
Copyright (c) 2003 - 2004, chromatic. All rights reserved. This module is +
Copyright (c) 2003 - 2004, chromatic. 2009 - 2010, kthakore. All rights reserved. This module is distributed under the same terms as Perl itself, in the hope that it is useful but certainly under no guarantee.