X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0006.html-inc;h=f5164b6c4aa8a15edc4eb2b79002cc7281a228ce;hb=6855e5615bff699e656bdd67be71ac965fc77f54;hp=11c394ee5ac6a1d0b13b0063e1e4ceb1ff8b7a15;hpb=2b546c01d23ba1eeffd21308d640c6c9c1112a1d;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0006.html-inc b/pages/blog-0006.html-inc index 11c394e..f5164b6 100644 --- a/pages/blog-0006.html-inc +++ b/pages/blog-0006.html-inc @@ -1,6 +1,12 @@

-Design of SDL::Rect +Introducing SDLx::Controller::Object, with our good friend Mario!

-

you say things,
I hear,
but don't listen,

you show things,
I see,
but don't understand,

you write things,
I read,
but don't know.

Lately we have been working on cleaning up the XS name spaces of SDL perl. After some bumps and falls we came up with a separated Rect module. Rect is one of the most simple C struct as shown below.



Using the awesome perlobject.map as a reference I was able to create a blessed perl object in XS. So now SDL::Rect->new(...) gave us a blessed reference ready to go. And as an icing it would destroy itself properly no matter where it was used. But once I brought it into our existing code base, garu pointed out the extending it was a little bit of a mess. So far to extend Rect we have to something like below. Any comment or advice would be much appreciated.





Have at it I am a big boy. You can grab the code like this.
Only If you don't already have a local git repo:

mkdir SDL
cd SDL
git init .

Then do this or skip to this if you already have a local git repo
git pull git://github.com/kthakore/SDL_perl.git experimental
\ No newline at end of file + Hi Folks
+
+This past week I have been working on making interfacing physics with SDL rendering a lot easier. The idea was to provide the user a callback to describe the acceleration of their object in the X, Y axis and Rotation. Using this idea I have completed a preliminary work for SDLx::Controller::Object. The demo below shows an example that was made with it. The SDLx* code is available at http://github.com/kthakore/SDL_perl and demo code is available at http://github.com/kthakore/scroller.
+
+
Mario Demo using SDL Perl from SDLPerl on Vimeo.
+


+

\ No newline at end of file