Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
103 lines
21 KiB
HTML
103 lines
21 KiB
HTML
<!DOCTYPE html>
|
||
|
||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>joymega.h</title><link rel="stylesheet" type="text/css" href="../../styles/main.css" /><script type="text/javascript" src="../../styles/main.js"></script><script type="text/javascript">NDLoader.LoadJS("Content", "../../styles/");</script></head>
|
||
|
||
<!-- Generated by Natural Docs, version 2.2 -->
|
||
|
||
<!-- saved from url=(0016)http://localhost -->
|
||
|
||
<body onload="NDLoader.OnLoad('Content');" class="NDPage NDContentPage">
|
||
|
||
<a name="Read_state"></a><a name="Topic113"></a><div class="CTopic TGroup LC first">
|
||
<div class="CTitle">Read state</div>
|
||
</div>
|
||
|
||
<a name="JoyMega_Read3"></a><a name="Topic114"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_Read3</div>
|
||
<div id="NDPrototype114" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 JoyMega_Read3(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PModifierQualifier first"><span class="SHKeyword">enum</span> </td><td class="PType">INPUT_PORT </td><td class="PName last">port</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Read Megadrive 3-button joypad through JoyMega adapter</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">port<div class="CDLParameterType"><span class="SHKeyword">enum</span> INPUT_PORT</div></td><td class="CDLDefinition"><p>The port to read (can be <INPUT_PORT1> or <INPUT_PORT2>)</p></td></tr></table><div class="CHeading">Return</div><p>State of the buttons (0: pressed, 1: released)</p><pre class="CText"> 7 6 5 4 3 2 1 0<br />–-–-–-–-–-–-–-–--<br /> S A C B R L D U<br /> │ │ │ │ │ │ │ └── Up<br /> │ │ │ │ │ │ └──── Down<br /> │ │ │ │ │ └────── Left<br /> │ │ │ │ └──────── Right<br /> │ │ │ └────────── Trigger B<br /> │ │ └──────────── Trigger C<br /> │ └────────────── Trigger A<br /> └──────────────── Trigger Start</pre></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_Read6"></a><a name="Topic115"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_Read6</div>
|
||
<div id="NDPrototype115" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u16 JoyMega_Read6(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PModifierQualifier first"><span class="SHKeyword">enum</span> </td><td class="PType">INPUT_PORT </td><td class="PName last">port</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Read Megadrive 6-button joypad through JoyMega adapter</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">port<div class="CDLParameterType"><span class="SHKeyword">enum</span> INPUT_PORT</div></td><td class="CDLDefinition"><p>The port to read (can be <INPUT_PORT1> or <INPUT_PORT2>)</p></td></tr></table><div class="CHeading">Return</div><p>State of the buttons (0: pressed, 1: released)</p><pre class="CText"> F E D C B A 9 8 | 7 6 5 4 3 2 1 0<br />–-–-–-–-–-–-–-–--–-–-–-–-–-–-–-–--–<br /> x x x x M X Y Z S A C B R L D U<br /> │ │ │ │ │ │ │ │ │ │ │ └── Up<br /> │ │ │ │ │ │ │ │ │ │ └──── Down<br /> │ │ │ │ │ │ │ │ │ └────── Left<br /> │ │ │ │ │ │ │ │ └──────── Right<br /> │ │ │ │ │ │ │ └────────── Trigger B<br /> │ │ │ │ │ │ └──────────── Trigger C<br /> │ │ │ │ │ └────────────── Trigger A<br /> │ │ │ │ └──────────────── Trigger Start<br /> │ │ │ └──────────────────── Trigger Z<br /> │ │ └────────────────────── Trigger Y<br /> │ └──────────────────────── Trigger X<br /> └────────────────────────── Trigger Mode</pre></div>
|
||
</div>
|
||
|
||
<a name="Check_state"></a><a name="Topic116"></a><div class="CTopic TGroup LC">
|
||
<div class="CTitle">Check state</div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedUp"></a><a name="Topic117"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedUp</div>
|
||
<div id="NDPrototype117" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedUp(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'up' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedDown"></a><a name="Topic118"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedDown</div>
|
||
<div id="NDPrototype118" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedDown(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'down' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedLeft"></a><a name="Topic119"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedLeft</div>
|
||
<div id="NDPrototype119" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedLeft(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'left' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedRight"></a><a name="Topic120"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedRight</div>
|
||
<div id="NDPrototype120" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedRight(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'right' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedA"></a><a name="Topic121"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedA</div>
|
||
<div id="NDPrototype121" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedA(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'A' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedB"></a><a name="Topic122"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedB</div>
|
||
<div id="NDPrototype122" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedB(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'B' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedC"></a><a name="Topic123"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedC</div>
|
||
<div id="NDPrototype123" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedC(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'C' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedStart"></a><a name="Topic124"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedStart</div>
|
||
<div id="NDPrototype124" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedStart(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'start' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a> (lower part)</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedX"></a><a name="Topic125"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedX</div>
|
||
<div id="NDPrototype125" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedX(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u16 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'X' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a></p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedY"></a><a name="Topic126"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedY</div>
|
||
<div id="NDPrototype126" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedY(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u16 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'Y' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a></p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedZ"></a><a name="Topic127"></a><div class="CTopic TFunction LC">
|
||
<div class="CTitle">JoyMega_IsPressedZ</div>
|
||
<div id="NDPrototype127" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedZ(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u16 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'Z' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a></p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
<a name="JoyMega_IsPressedMode"></a><a name="Topic128"></a><div class="CTopic TFunction LC last">
|
||
<div class="CTitle">JoyMega_IsPressedMode</div>
|
||
<div id="NDPrototype128" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> JoyMega_IsPressedMode(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u16 </td><td class="PName last">state</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
||
<div class="CBody"><p>Check if 'mode' button is pressed</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">state<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>State of the joystick returned by <a href="../../index.html#File:device/joymega.h:JoyMega_Read3" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,114);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read3</a> or <a href="../../index.html#File:device/joymega.h:JoyMega_Read6" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,115);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >JoyMega_Read6</a></p></td></tr></table><div class="CHeading">Return</div><p>TRUE if the button is pressed</p></div>
|
||
</div>
|
||
|
||
</body></html> |