Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
63 lines
11 KiB
HTML
63 lines
11 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>ninjatap.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="Functions"></a><a name="Topic82"></a><div class="CTopic TGroup LC first">
|
|
<div class="CTitle">Functions</div>
|
|
</div>
|
|
|
|
<a name="NTap_Check"></a><a name="Topic83"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_Check</div>
|
|
<div id="NDPrototype83" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> u8 NTap_Check()</div></div>
|
|
<div class="CBody"><p>Check the presence of Ninja Tap in the joystick ports.</p><div class="CHeading">Return</div><p>Ninja Tap information. See <a href="../../index.html#File:device/ninjatap.h:NTap_GetInfo" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,84);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_GetInfo</a></p></div>
|
|
</div>
|
|
|
|
<a name="NTap_GetInfo"></a><a name="Topic84"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_GetInfo</div>
|
|
<div id="NDPrototype84" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> u8 NTap_GetInfo()</div></div>
|
|
<div class="CBody"><p>Get Ninja Tap information. <a href="../../index.html#File:device/ninjatap.h:NTap_Check" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,83);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Check</a> function must be called first.</p><div class="CHeading">Return</div><p>Number of usable joysticks and types. See <a href="../../index.html#File:device/ninjatap.h:NTap_Check" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,83);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Check</a>.</p><pre class="CText">7 6 5 4 3 2 1 0<br />│ │ │ │ └──┴──┴──┴── Number of joystick port available (2, 5 or 8)<br />│ │ └──┴────────────── Tap type pluged in port 1 (0=No Tap, 1=Ninja Tap, 2=Shinobi Tap)<br />└──┴──────────────────── Tap type pluged in port 2 (0=No Tap, 1=Ninja Tap, 2=Shinobi Tap)</pre></div>
|
|
</div>
|
|
|
|
<a name="NTap_GetPortNum"></a><a name="Topic85"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_GetPortNum</div>
|
|
<div id="NDPrototype85" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> u8 NTap_GetPortNum()</div></div>
|
|
<div class="CBody"><p>Get total number of joystick port. <a href="../../index.html#File:device/ninjatap.h:NTap_Check" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,83);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Check</a> function must be called first.</p><div class="CHeading">Return</div><p>Number of usable joysticks. See <a href="../../index.html#File:device/ninjatap.h:NTap_Check" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,83);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Check</a>.</p></div>
|
|
</div>
|
|
|
|
<a name="NTap_Update"></a><a name="Topic86"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_Update</div>
|
|
<div id="NDPrototype86" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> NTap_Update()</div></div>
|
|
<div class="CBody"><p>Update the status of all joysticks whether they are connected to a Ninja Tap or directly to the port.</p></div>
|
|
</div>
|
|
|
|
<a name="NTap_GetData"></a><a name="Topic87"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_GetData</div>
|
|
<div id="NDPrototype87" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> u8 NTap_GetData(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">idx</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Get the data of a given joystick according to its index. <a href="../../index.html#File:device/ninjatap.h:NTap_Update" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,86);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Update</a> function must be called first.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">idx<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Joystick port index. For example, if the Ninja Tap is connected to port B, the first entry (index 0) will be the joystick connected directly to port A, while the next (index 1) will be the joystick connected to the first port of the Ninja Tap.</p></td></tr></table><div class="CHeading">Return</div><p>State of the joystick. Bit set to 0 are triggered.</p><pre class="CText">7 6 5 4 3 2 1 0<br />│ │ │ │ │ │ │ └── Right direction<br />│ │ │ │ │ │ └───── Left direction<br />│ │ │ │ │ └──────── Down direction<br />│ │ │ │ └─────────── Up direction<br />│ │ │ └────────────── Start button (for NES or FM-Town pad)<br />│ │ └───────────────── Select button (for NES or FM-Town pad)<br />│ └──────────────────── B button<br />└─────────────────────── A button</pre></div>
|
|
</div>
|
|
|
|
<a name="NTap_IsPressed"></a><a name="Topic88"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_IsPressed</div>
|
|
<div id="NDPrototype88" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> u8 NTap_IsPressed(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">idx,</td></tr><tr><td class="PType first">u8 </td><td class="PName last">btn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Check if the given button is pressed on the given joystick index <a href="../../index.html#File:device/ninjatap.h:NTap_Update" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,86);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Update</a> function must be called first.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">idx<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Joystick port index.</p></td></tr><tr><td class="CDLEntry">btn<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Button value. Can be one of <NTAP_RIGHT>, <NTAP_LEFT>, <NTAP_DOWN>, <NTAP_UP>, <NTAP_START>, <NTAP_SELECT>, <NTAP_B> or <NTAP_A>.</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if button is currently pressed, FALSE otherwise.</p></div>
|
|
</div>
|
|
|
|
<a name="NTap_IsPushed"></a><a name="Topic89"></a><div class="CTopic TFunction LC">
|
|
<div class="CTitle">NTap_IsPushed</div>
|
|
<div id="NDPrototype89" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> u8 NTap_IsPushed(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">idx,</td></tr><tr><td class="PType first">u8 </td><td class="PName last">btn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Check if the given button has just been pushed on the given joystick index <a href="../../index.html#File:device/ninjatap.h:NTap_Update" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,86);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Update</a> function must be called first.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">idx<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Joystick port index.</p></td></tr><tr><td class="CDLEntry">btn<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Button value. See <a href="../../index.html#File:device/ninjatap.h:NTap_IsPressed" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,88);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_IsPressed</a>.</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if button has just been pushed this frame, FALSE otherwise.</p></div>
|
|
</div>
|
|
|
|
<a name="NTap_IsReleased"></a><a name="Topic90"></a><div class="CTopic TFunction LC last">
|
|
<div class="CTitle">NTap_IsReleased</div>
|
|
<div id="NDPrototype90" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> u8 NTap_IsReleased(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8 </td><td class="PName last">idx,</td></tr><tr><td class="PType first">u8 </td><td class="PName last">btn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
|
|
<div class="CBody"><p>Check if the given button has just been released on the given joystick index <a href="../../index.html#File:device/ninjatap.h:NTap_Update" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,86);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_Update</a> function must be called first.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">idx<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Joystick port index.</p></td></tr><tr><td class="CDLEntry">btn<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Button value. See <a href="../../index.html#File:device/ninjatap.h:NTap_IsPressed" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,88);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >NTap_IsPressed</a>.</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if button has just been released this frame, FALSE otherwise.</p></div>
|
|
</div>
|
|
|
|
</body></html> |