Re: [TuxKart-devel] Re: [Tuxkart-cvs] tuxkart/src Driver.h,1.14,1.15 joystick.h,1.3,1.4 PlayerDrive
Status: Alpha
Brought to you by:
sjbaker
From: James G. <jam...@bt...> - 2004-08-07 17:57:55
|
On Sat, 2004-08-07 at 08:22, Ryan Flegel wrote: > On Sat, 07 Aug 2004 03:38:41 +0000, > tux...@li... > <tux...@li...> wrote: > > Update of /cvsroot/tuxkart/tuxkart/src > > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7377/src > > > > Modified Files: > > Driver.h joystick.h PlayerDriver.cxx sdldrv.cxx sdldrv.h > > Log Message: > > - Changed PLIB joystick stuff to SDL joystick stuff...Steve won't be happy > > Is this necessary? If you're moving something away from PLIB their > should be good reasons, like there was for the GUI. I can't really see > why there would be any problems with PLIB for input. 1. The GUI was already using SDL for joystick input, as it is event based (which PLIB doesn't do). Therefore it was already using SDL for some joystick input, and using two different joystick libraries at the same time seemed silly. 2. All the other input is already handled by SDL, so changing the joystick to SDL unifies the input code somewhat. 3. Changing the joystick input to SDL doesn't add any more dependencies as the joystick stuff is in the plain base SDL library 4. I wanted to add support for multiple joysticks, and though this is admittedly possible with PLIB, it is easier with SDL. 5. The PLIB joystick code relies on you testing for hexadecimal codes, which isn't very programmer-friendly. The joystick code in the game is now much more readable. James |