X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0008.html-inc;h=b877a586ebd3700312ebdd7388f082781e50f431;hb=1d5d4d44a3acf89f7820195b5016f4ebc4489250;hp=fe4b8d48d37cc0a4205e7c209051f61deb0a418b;hpb=638b5b9759c7dcb4de4c0a88c766e9f9dd650348;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0008.html-inc b/pages/blog-0008.html-inc index fe4b8d4..b877a58 100644 --- a/pages/blog-0008.html-inc +++ b/pages/blog-0008.html-inc @@ -1,6 +1,13 @@

-The beginnings of modular design for SDL Perl +SDL 2.503 Released!

-
“Do or do not... there is no try.”
--yoda

The design before


The bindings before were all in one huge XS file. This was then exported into the SDL module. This means that the XS file has to handle with macros if any component (e.x SDL_Mixer) is not compiled. Moreover having ever binding in one XS file prevents use to treat C structs as object with only one point of free and malloc. This would be BEGIN and DESTROY in Perl. Also the monolithic design introduces a lot of bugs because we have to use free and malloc all over the place. Lastly SDL monolithic design has the constructor for all structs in both Perl and in XS.

The design we are aiming for

Simple one XS per Module. This would also simplify the Build code.

First Step


We have began with SDL Rect. It is in github master branch now. We are in the progress of making it back compatible. Originally SDL::Rect took named variables as parameters for new(). Now since the constructor is in XS we have only unnamed parameters.


Before


SDL::Rect->new( -x => 0, -y => 0, -width => 0, -height => 0);

After


SDL::Rect->new(0, 0, 0, 0);

Ideally we would like both ways of constructing Rect.
\ No newline at end of file +

SDL 2.503 has been released on to CPAN. The changes are mostly in the new features added to SDLx::* layer. However as our continuing attempt to improve cross platform support we have some low level fixes.


+

Most interstingly we have begun work on SDLx::Sprite::Animated. Although, volatile, this addition will be highly anticipated. We look forward for more work on it soon. Additionally are the changes in SDLx::Surface. SDLx::Surface is an attempt to provide gfx, pixels, video and low level surface functions in a combined and simpler interface.


+

Since SDLx::Sprite and SDLx::App depends on SDLx::Surface, new features will be propagated and the magic amplified! These are exciting times for SDL in Perl. So come join us for great justice on #sdl irc.perl.org or sdl-devel@perl.org.


+The detailed changelog are provided at CPAN.
+
+Kartik Thakore
+


+

\ No newline at end of file