-
âDo or do not... there is no try.â
-
--yoda
+
Work has begun on the 4th chapter of the SDL Manual. The code is on
github, and I regularly update the
pdf on our server.
-
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.
+Writing manuals is not of my greatest skills, so I would love some review of my work. Any problems can be reported in the
issues.
-
The design we are aiming for
Simple
one XS per Module. This would also simplify the Build code.
+If you want to help with writing the manual, please join me on #sdl irc.perl.org or email us at
+sdl-devel@perl.org
-
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.
-
![](http://feedads.g.doubleclick.net/~a/kLUEuAPtuInPChqB2WfChUn3YyI/0/di)
-![](http://feedads.g.doubleclick.net/~a/kLUEuAPtuInPChqB2WfChUn3YyI/1/di)
![](http://feeds.feedburner.com/~r/YetAnotherPerlGameHackeryapgh/~4/uEzoBWRJEks)