osoko / retroremakes-framework

Automatically exported from code.google.com/p/retroremakes-framework
0 stars 0 forks source link

Add Vertical and Horizontal analog axis selection in virtual gamepad, returning -1.0 to 1.0 as values #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This will make it possible to create a vector2D from the two analogue values,  
to use as, for example, acceleration values for spaceships.

Original issue reported on code.google.com by wiebo.de.wit on 2 Dec 2009 at 9:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm going to add a new mapping called TJoystickAxisAnalogueMapping which is an 
extension of TJoystickAxisMapping. It will return the raw value of the joystick 
axis value (-1.0 to 1.0)
I will add methods to the gamepad type to add this control, both as default and 
new mappings.

Original comment by wiebo.de.wit on 29 Sep 2010 at 8:51

GoogleCodeExporter commented 9 years ago
I think it might even work better if we did the following:

1 modify TJoystickAxisMapping to return the raw values.
2 add TJoystickAxisDigitalMapping and move the digital values code from 
TJoystickAxisMapping to it.

Original comment by wiebo.de.wit on 29 Sep 2010 at 9:03

GoogleCodeExporter commented 9 years ago
Added analog axes by defining them as direction value 2. code committed and 
virtualgamepad example changed to show the changes.

Original comment by wiebo.de.wit on 29 Sep 2010 at 1:38

GoogleCodeExporter commented 9 years ago

Original comment by wiebo.de.wit on 29 Sep 2010 at 1:40