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 @@
  • SYNOPSIS
  • +
  • SDL Manual
  • SDL BASICS
  • SEE ALSO
  • -
  • AUTHOR
  • +
  • AUTHORS
  • COPYRIGHT

  • @@ -41,6 +42,12 @@ +

    SDL Manual

    Top

    +
    +

    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 BASICS

    Top

    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.

    Surfaces

    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.

    Initialization

    -

    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 and icon attributes in a windowed application. Here's how to set the window title of the application to My 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 the name parameter to SDL::Surface-new()> if you want to skip ahead.

    @@ -106,30 +113,26 @@ them there, then update the $app.

    SEE ALSO

    Top

    -
    SDL::Tutorial::Drawing
    -
    -

    basic drawing with rectangles

    -
    SDL::Tutorial::Animation
    -

    basic rectangle animation

    +

    basic rectangle drawing and animation

    -
    SDL::Tutorial::Images
    +
    SDL::Tutorial::LunarLander
    -

    image loading and animation

    +

    basic image loading and animation

    -

    AUTHOR

    Top

    -
    -

    chromatic, <chromatic@wgz.org>.

    -

    Written for and maintained by the Perl SDL project, http://sdl.perl.org/.

    +

    AUTHORS

    Top

    +
    +

    chromatic, <chromatic@wgz.org>.

    +

    Written for and maintained by the Perl SDL project, http://sdl.perl.org/. See /SDL.html#AUTHORS for details.

    COPYRIGHT

    Top