From: kthakore Date: Tue, 3 Aug 2010 18:27:50 +0000 (+0000) Subject: update X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=505f308d8b092747da8b2f5e9781475a1f06dfe8;p=sdlgit%2FSDL-Site.git update --- diff --git a/pages/SDL-Cookbook-OpenGL.html-inc b/pages/SDL-Cookbook-OpenGL.html-inc index 663bfd4..1023dab 100644 --- a/pages/SDL-Cookbook-OpenGL.html-inc +++ b/pages/SDL-Cookbook-OpenGL.html-inc @@ -52,11 +52,11 @@ $| = 1; $WIDTH = 1024; $HEIGHT = 768; - $SDLAPP = SDLx::App->new(-title => "Opengl App", -width => $WIDTH, -height => $HEIGHT, -gl => 1); + $SDLAPP = SDLx::App->new(title => "Opengl App", width => $WIDTH, height => $HEIGHT, gl => 1); $SDLEVENT = SDL::Event->new; -

SDLx::App can start an OpenGL application with the parameter -gl => 1.

+

SDLx::App can start an OpenGL application with the parameter gl => 1.

	glEnable(GL_DEPTH_TEST);
 	glMatrixMode(GL_PROJECTION);
 	glLoadIdentity;
diff --git a/pages/SDL-Cookbook-PDL.html-inc b/pages/SDL-Cookbook-PDL.html-inc
index 3186d12..17bb5a1 100644
--- a/pages/SDL-Cookbook-PDL.html-inc
+++ b/pages/SDL-Cookbook-PDL.html-inc
@@ -82,7 +82,8 @@
 

To make sure SDL is in sync with the data. You must call SDL::Video::lock before doing PDL operations on the piddle.

    SDL::Video::lock_surface($surface);
 
-    $piddle ( :, 0 : rand(400), 0 : rand(200) ) .=   pdl( rand(225), rand(225), rand(255), 255 );
+    $piddle->mslice( 'X', [ rand(400), rand(400), 1 ], [ rand(200), rand(200), 1 ] )
+        .= pdl( rand(225), rand(225), rand(255), 255 );
 
 

After that you can unlock the surface to blit.

diff --git a/pages/SDL-Deprecated.html-inc b/pages/SDL-Deprecated.html-inc index 8131a11..47d9e0f 100644 --- a/pages/SDL-Deprecated.html-inc +++ b/pages/SDL-Deprecated.html-inc @@ -5,7 +5,8 @@
@@ -84,14 +84,14 @@ manager oriented functions.

and initializes some of the window manager properties. SDLx::App::new takes a series of named parameters:

@@ -124,7 +124,7 @@ that many ms.

resize

SDLx::App::resize takes a new height and width of the application -if the application was originally created with the -resizable option.

+if the application was originally created with the resizable option.

fullscreen

@@ -159,10 +159,10 @@ as SDL_QUIT(), SDL_KEYDOWN(), and the like. The event method recieves as its pa the event object used in the loop.

Example:

    my $app = SDLx::App->new(
-        -title  => "test.app", 
-        -width  => 800, 
-        -height => 600, 
-        -depth  => 32
+        title  => "test.app", 
+        width  => 800, 
+        height => 600, 
+        depth  => 32
     );
 
     my %actions = (
diff --git a/pages/SDLx-Controller.html-inc b/pages/SDLx-Controller.html-inc
index 6e88db9..2fb7f70 100644
--- a/pages/SDLx-Controller.html-inc
+++ b/pages/SDLx-Controller.html-inc
@@ -167,6 +167,8 @@ the previous round.

remove_show_handler( $index )

Removes the handler with the given index from the respective calling queue.

+

You can also pass a coderef. +The first coderef in the handler list that this matches will be removed.

Returns the removed handler.

diff --git a/pages/SDLx-SFont.html-inc b/pages/SDLx-SFont.html-inc index 4e753c4..6023db4 100644 --- a/pages/SDLx-SFont.html-inc +++ b/pages/SDLx-SFont.html-inc @@ -33,7 +33,7 @@ #Make a surface #Select a font - my $d = SDLx::App->new( -title => 'app', -width => 200, -height => 200, -depth => 32 ); + my $d = SDLx::App->new( title => 'app', width => 200, height => 200, depth => 32 ); my $font = SDLx::SFont->new('t/font.png'); diff --git a/pages/SDLx-Surface.html-inc b/pages/SDLx-Surface.html-inc index 0148bde..873310b 100644 --- a/pages/SDLx-Surface.html-inc +++ b/pages/SDLx-Surface.html-inc @@ -20,6 +20,7 @@
  • EXTENSIONS
    • blit
    • +
    • blit_by
    • flip
    • update
    • draw_rect
    • @@ -85,9 +86,9 @@ SDLx::Surface->new( width=> 400, height=>200, flags=> SDL_SWSURFACE, depth=>32, greenmask=>0xFF000000 ) # A SDL::Surface->new( SDL_ANYFORMAT, 400, 200, 32, 0, 0xFF000000,0, 0, 0 ) is loaded - - - + SDLx::Surface->new( w => 1, h => 1, color => 0xFF0000FF ) + # A SDL::Surface->new( SDL_ANYFORMAT, 1, 1, 32, 0, 0, 0, 0 ) is loaded + all pixels are colored with color (red)
  • @@ -106,6 +107,7 @@
     SDLx::Surface::display( width => 20, height => 20, flags=> SDL_HWSURFACE, depth=>24) 
     
     
    +

    You can also use the keys w and h in place of width and height, as with new.

    Get or create the main display surface and attach to a SDLx::Surface.

    @@ -143,10 +145,19 @@

    Blits SDLx::Surface onto $dest surface. -$src_rect or $dest_rect are optional. $src_rect or $dest_rect can be array refs or SDL::Rect. $dest can be SDLx::Surface or SDL::Surface.

    +$src_rect or $dest_rect are optional. If $src_rect is ommited, it will be the size of the entire surface. If $dest_rect is ommited, it will be blitted at (0, 0). $src_rect or $dest_rect can be array refs or SDL::Rect. $dest can be SDLx::Surface or SDL::Surface.

    Returns $self

    +

    blit_by

    +
    +
     $sdlx_surface->blit_by( $src, $src_rect, $dest_rect );
    +
    +
    +

    Does the same as blit but the SDLx::Surface is the one being blitted to. +This is useful when the surface you have isn't an SDLx::Surface, but the surface it is being blitted to is.

    + +

    flip

    Applies SDL::Video::flip to the Surface, with error checking.

    @@ -175,7 +186,7 @@ $src_rect or $dest_rect are optional. $src_rect or $dest_rect can be array refs $sdlx_surface->draw_rect( SDL::Rect->new($x,$y,$w,$h), 0xFFFF00FF ); -

    Draws a rect on the surface with the given color.

    +

    Draws a rect on the surface with the given color. If the rect is ommited, the colored rect will be drawn to the entire surface.

    Returns $self

    @@ -185,7 +196,7 @@ $src_rect or $dest_rect are optional. $src_rect or $dest_rect can be array refs $sdlx_surface->draw_line( [$x1, $y1], [$x2, $y2], \@color, $antialias); # -

    Draws a line on the surface. Antialias is turned on if $antialias is defined.

    +

    Draws a line on the surface. Antialias is turned on if $antialias is true.

    Returns $self

    diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 5abeda5..3f4a3d9 100644 --- a/pages/documentation.html-inc +++ b/pages/documentation.html-inc @@ -1,2 +1,2 @@
    -

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    thumbSDL::Credits- Authors and contributors of the SDL Perl project
    thumbSDL::Deprecated- Log of Deprecated items per release
    thumbSDL::Time- An SDL Perl extension for managing timers
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::OpenGL- Using SDL with OpenGL
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDLx::App- a SDL perl extension
    thumbSDLx::Rect- SDL extension for storing and manipulating rectangular coordinates
    thumbSDLx::SFont- Extension making fonts out of images and printing them
    thumbSDLx::Sprite- interact with images quick and easily in SDL
    thumbSDLx::Sprite::Animated- create animated SDL sprites easily!
    thumbSDLx::Surface- Graphic surface matrix extension

    GFX
    thumbSDL::GFX::Framerate- framerate calculating functions
    thumbSDL::GFX::Primitives- basic drawing functions
    Structure
    thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Mixer
    thumbSDL::Mixer- Sound and music functions
    thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
    thumbSDL::Mixer::Effects- sound effect functions
    thumbSDL::Mixer::Groups- Audio channel group functions
    thumbSDL::Mixer::Music- functions for music
    thumbSDL::Mixer::Samples- functions for loading sound samples
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic

    Pango
    thumbSDL::Pango- Text rendering engine
    Structure
    thumbSDL::Pango::Context- Context object for SDL::Pango

    TODO
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::SMPEG- a SDL perl extension
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    GFX
    thumbSDL::GFX::BlitFunc- blitting functions
    thumbSDL::GFX::ImageFilter- image filtering functions
    thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

    TTF
    thumbSDL::TTF- True Type Font functions (libfreetype)
    Structure
    thumbSDL::TTF::Font- Font object type for SDL_ttf

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL

    UNCATEGORIZED
    thumbSDLx::Controller- Handles the loops for event, movement and rendering
    +

    Documentation (latest development branch)

    Core
    thumbSDL- Simple DirectMedia Layer for Perl
    thumbSDL::Credits- Authors and contributors of the SDL Perl project
    thumbSDL::Deprecated- Log of Deprecated items per release
    thumbSDL::Time- An SDL Perl extension for managing timers
    Audio
    thumbSDL::Audio- SDL Bindings for Audio
    Structure
    thumbSDL::AudioCVT- Audio Conversion Structure
    thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
    CDROM
    thumbSDL::CDROM- SDL Bindings for the CDROM device
    Structure
    thumbSDL::CD- SDL Bindings for structure SDL_CD
    thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
    Events
    thumbSDL::Events- Bindings to the Events Category in SDL API
    Structure
    thumbSDL::Event- General event structure
    Joystick
    thumbSDL::Joystick- SDL Bindings for the Joystick device
    Mouse
    thumbSDL::Mouse- SDL Bindings for the Mouse device
    Structure
    thumbSDL::Cursor- Mouse cursor structure
    Structure
    thumbSDL::Version- SDL Bindings for structure SDL_Version
    Video
    thumbSDL::Video- Bindings to the video category in SDL API
    Structure
    thumbSDL::Color- Format independent color description
    thumbSDL::Overlay- YUV Video overlay
    thumbSDL::Palette- Color palette for 8-bit pixel formats
    thumbSDL::PixelFormat- Stores surface format information
    thumbSDL::Rect- Defines a rectangular area
    thumbSDL::Surface- Graphic surface structure
    thumbSDL::VideoInfo- Video Target Information

    Cookbook
    thumbSDL::Cookbook
    thumbSDL::Cookbook::OpenGL- Using SDL with OpenGL
    thumbSDL::Cookbook::PDL

    Extension
    thumbSDLx::App- a SDL perl extension
    thumbSDLx::Rect- SDL extension for storing and manipulating rectangular coordinates
    thumbSDLx::SFont- Extension making fonts out of images and printing them
    thumbSDLx::Sprite- interact with images quick and easily in SDL
    thumbSDLx::Sprite::Animated- create animated SDL sprites easily!
    thumbSDLx::Surface- Graphic surface matrix extension

    GFX
    thumbSDL::GFX::Framerate- framerate calculating functions
    thumbSDL::GFX::Primitives- basic drawing functions
    Structure
    thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

    Image
    thumbSDL::Image- Bindings for the SDL_Image library

    Mixer
    thumbSDL::Mixer- Sound and music functions
    thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
    thumbSDL::Mixer::Effects- sound effect functions
    thumbSDL::Mixer::Groups- Audio channel group functions
    thumbSDL::Mixer::Music- functions for music
    thumbSDL::Mixer::Samples- functions for loading sound samples
    Structure
    thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
    thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic

    Pango
    thumbSDL::Pango- Text rendering engine
    Structure
    thumbSDL::Pango::Context- Context object for SDL::Pango

    TODO
    thumbSDL::MPEG- a SDL perl extension
    thumbSDL::SMPEG- a SDL perl extension
    MultiThread
    thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
    Structure
    thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
    GFX
    thumbSDL::GFX::BlitFunc- blitting functions
    thumbSDL::GFX::ImageFilter- image filtering functions
    thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

    TTF
    thumbSDL::TTF- True Type Font functions (libfreetype)
    Structure
    thumbSDL::TTF::Font- Font object type for SDL_ttf

    Tutorials
    thumbSDL::Tutorial- introduction to Perl SDL
    thumbSDL::Tutorial::Animation
    thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL

    UNCATEGORIZED
    thumbSDLx::Controller- Handles the loops for event, movement and rendering