From: <ba...@us...> - 2011-06-14 21:22:57
|
Revision: 95 http://scrupp.svn.sourceforge.net/scrupp/?rev=95&view=rev Author: basique Date: 2011-06-14 21:22:51 +0000 (Tue, 14 Jun 2011) Log Message: ----------- - Added joystick support New functions: - scrupp.getJoystickCount() Returns the number of available joysticks. - scrupp.getJoystickName(nr) Returns the name of the joystick with this number. - scrupp.openJoystick(nr) Opens the joystick with this number and returns a joystick object. Methods of the joystick object: - joystick:getName() - joystick:getIndex() Returns the number of the joystick. - joystick:getNumberOfAxes() - joystick:getNumberOfBalls() - joystick:getNumberOfHats() - joystick:getNumberOfButtons() - joystick:getAxis(axis_nr) - joystick:getHat(hat_nr) Returns dx and dy with dx = -1 or 1 and dy = -1 or 1. - joystick:getBall(ball_nr) - joystick:isDown(button_nr) - joystick:close() All joystick, axis, ball, hat and button numbers start at 1. See the documentation of SDL for a details about the return values of these functions. New callbacks: - main.joystickpressed(joystick_object, button_nr) - main.joystickreleased(joystick_object, button_nr) Modified Paths: -------------- trunk/src/Graphics.c trunk/src/Main.c trunk/src/Makefile.am Added Paths: ----------- trunk/src/Joystick.c trunk/src/Joystick.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |