2007-12-14

PALib-Be-Back

I’ve modified Steven’s code so PALib is now optional. There are two steps to enabling PALib. First, uncomment the line in “defines.h” that reads:


//#define USING_PALIB

Second, rename “Makefile.palib” to “Makefile” (replacing the current makefile).

That’s it - PALib is back in action.

Once I’ve worked out why the stylus release doesn’t work properly, I’ll switch this around so that PALib is enabled by default - I think that PALib users are more likely to want a solution that works without tinkering, whilst the libnds guys will be happier to fiddle with options.

I’ve also fixed the spelling errors in the code. “Woopsie” is now “Woopsi” again.

Comments

ant on 2007-12-14 at 11:29 said:

Think the stylus code is fixed - Steven was reading the IPC directly (PALib style) instead of working with the touchPosition struct (libnds style).

Jeff on 2007-12-14 at 11:34 said:

You could reduce this to one action by adding -DUSING_PALIB to Makefile. ie,

CFLAGS += -DUSING_PALIB

Steven on 2007-12-14 at 11:55 said:

Yeah the code was ripped from PALib directly, some bits were stripped out (Pressure, AltX, AltY positions for the Stylus) and I just did a quick and dirty patch to remove PALib.

After talking to WinterMute last night on IRC he was indicating that a future update to devkit may actually break PALib - he’s thinking of deprecating IPC, as well as a few other changes.

I know that PAlib adds some nice features, like sound and WiFi, but from the looks of the librarys available they should be easily added into the libnds version of Woopsie.

But the main thing was removal of the dependance on PALib, As long as you set the DrawBG[] to equal the PA version then you will only need to access one array to put stuff on the screen.

ant on 2007-12-14 at 12:07 said:

Yep, that’s done - the PALib version of the code sets the two DrawBg pointers to the two PA_DrawBg pointers. devKitPro r21 already breaks PALib unless you do some fiddling. In fact, PALib doesn’t work properly in C++ anyway unless you disable the motion card code and recompile it.

Jeff - the CFLAGS thing works. Good stuff, will update the SVN files soon.