-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from parasol-framework/test/build
Gamepads & Gradients
- Loading branch information
Showing
66 changed files
with
1,462 additions
and
584 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0"?> | ||
<?xml-stylesheet type="text/xsl" href="class.xsl"?> | ||
|
||
<book> | ||
<info> | ||
<name>Controller</name> | ||
<type>class</type> | ||
<module>Display</module> | ||
<comment>Provides support for reading state-based game controllers.</comment> | ||
<version>1</version> | ||
<id>bf67c809</id> | ||
<idstring>ID_CONTROLLER</idstring> | ||
<category>IO</category> | ||
<include>modules/controller.h</include> | ||
<copyright>Paul Manias 2003-2024</copyright> | ||
<description> | ||
<p>Use the Controller class to read the state of game controllers that are recognised by the operating system.</p> | ||
<p>Unlike analog devices that stream input commands (e.g. mice), gamepad controllers maintain a state that can be read at any time. The controller state is normally read at least once per frame, which can be achieved in the main inner loop, or in a separate timer.</p> | ||
<p>Controller input management is governed by the <class name="Display">Display</class> class. The <code>GRAB_CONTROLLERS</code> flag must be defined in the active Display's Flags field in order to ensure that controller input can be received. Failure to do so may mean that the Controller object appears to work but does not receive input.</p></description> | ||
<source> | ||
<file>class_controller.cpp</file> | ||
</source> | ||
</info> | ||
|
||
<actions> | ||
<action> | ||
<name>Query</name> | ||
<comment>Get the current controller state.</comment> | ||
<prototype>ERR acQuery(*Object)</prototype> | ||
</action> | ||
|
||
</actions> | ||
|
||
<fields> | ||
<field> | ||
<name>Buttons</name> | ||
<comment>JET button values expressed as bit-fields.</comment> | ||
<access read="R">Read</access> | ||
<type lookup="CON">CON</type> | ||
<description> | ||
<types lookup="CON"/> | ||
</description> | ||
</field> | ||
|
||
<field> | ||
<name>LeftStickX</name> | ||
<comment>Left analog stick value for X axis, between -1.0 and 1.0.</comment> | ||
<access read="R">Read</access> | ||
<type>DOUBLE</type> | ||
</field> | ||
|
||
<field> | ||
<name>LeftStickY</name> | ||
<comment>Left analog stick value for Y axis, between -1.0 and 1.0.</comment> | ||
<access read="R">Read</access> | ||
<type>DOUBLE</type> | ||
</field> | ||
|
||
<field> | ||
<name>LeftTrigger</name> | ||
<comment>Left trigger value between 0.0 and 1.0.</comment> | ||
<access read="R">Read</access> | ||
<type>DOUBLE</type> | ||
</field> | ||
|
||
<field> | ||
<name>Port</name> | ||
<comment>The port number assigned to the controller.</comment> | ||
<access read="R" write="I">Read/Init</access> | ||
<type>INT</type> | ||
<description> | ||
<p>Set the port number to choose the controller that will be queried for state changes. The default of zero is assigned to the primary controller.</p> | ||
<p>The port number can be changed at any time, so multiple controllers can be queried through one interface at the cost of overwriting the previous state. Check <fl>TotalPorts</fl> if your program supports more than one controller.</p> | ||
</description> | ||
</field> | ||
|
||
<field> | ||
<name>RightStickX</name> | ||
<comment>Right analog stick value for X axis, between -1.0 and 1.0.</comment> | ||
<access read="R">Read</access> | ||
<type>DOUBLE</type> | ||
</field> | ||
|
||
<field> | ||
<name>RightStickY</name> | ||
<comment>Right analog stick value for Y axis, between -1.0 and 1.0.</comment> | ||
<access read="R">Read</access> | ||
<type>DOUBLE</type> | ||
</field> | ||
|
||
<field> | ||
<name>RightTrigger</name> | ||
<comment>Right trigger value between 0.0 and 1.0.</comment> | ||
<access read="R">Read</access> | ||
<type>DOUBLE</type> | ||
</field> | ||
|
||
<field> | ||
<name>TotalPorts</name> | ||
<comment>Reports the total number of controllers connected to the system.</comment> | ||
<access read="G">Get</access> | ||
<type>INT</type> | ||
</field> | ||
|
||
</fields> | ||
<structs> | ||
</structs> | ||
</book> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.