X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0024.html-inc;h=84a740ff4f425ede40b97567d59b2b37c0970fbf;hb=a05e5d4499fb58198e463162d0385e8a156e1f03;hp=65ae51504a0413c5509fed57524a43fd18dc4fcd;hpb=cf23a5dab86667dca8475ee830e684c9944f115f;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0024.html-inc b/pages/blog-0024.html-inc index 65ae515..84a740f 100644 --- a/pages/blog-0024.html-inc +++ b/pages/blog-0024.html-inc @@ -1,6 +1,35 @@

-Updates on Plan for v2.4 +Migrating Sol's Tutorial of SDL to SDL_Perl

-
A fierce storm came,
With a crash,
Old oaks went lame.

After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu. We came up with the following plan for v2.4.


Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.


Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.

--yapgh
\ No newline at end of file +
If I have seen further it is only by standing on the shoulders of giants. --Newton
+

+

+

+

Sol's Tutorials


+

When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
+


+

To use this code you need the new Redesigned SDL_Perl Library


+

Getting SDL Dependencies


+Only If you are on Linux (debian/ubuntu) you need the following dependencies:
+
+
$ sudo apt-get install libsdl-net1.2-dev libsdl-mixer1.2-dev libsmpeg-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev 

+On Windows we recommend using Strawberry Perl. It comes with SDL-1.2.13 header files and libs included.
+
+Both Windows and Linux needs to install Alien::SDL
+
+
$ cpan Alien::SDL
** Add sudo to this for Linux
+
+

Getting Bleeding SDL


+The bleeding SDL is on github. Click download on this site .
+
+Extract it and cd into the folder run
+
$ cpan . 
** The dot is needed
+** in Linux you may need to do sudo
+
+Then you can run this script by doing
+
+
$ perl examples/sols/ch02.pl 
+


+

\ No newline at end of file