Files
mazegame/engine/doc/html/files/game/state-h.html
T

111 lines
9.0 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>state.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="Game_Core"></a><a name="Topic129"></a><div class="CTopic TGroup LC first">
<div class="CTitle">Game Core</div>
</div>
<a name="Game_Initialize"></a><a name="Topic130"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_Initialize</div>
<div id="NDPrototype130" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Game_Initialize(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">screenMode,</td></tr><tr><td class="PType first"><span class="SHKeyword">bool</span>&nbsp;</td><td class="PName last">b60hz</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Initialize game module</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">screenMode<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>The screen mode to select at game start. See <a href="../../index.html#File:vdp.h:VDP_MODE" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,491);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >VDP_MODE</a></p></td></tr></table></div>
</div>
<a name="Game_Update"></a><a name="Topic131"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_Update</div>
<div id="NDPrototype131" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> Game_Update()</div></div>
<div class="CBody"><p>Update game frame</p></div>
</div>
<a name="Game_Release"></a><a name="Topic132"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_Release</div>
<div id="NDPrototype132" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> Game_Release()</div></div>
<div class="CBody"><p>Release game module</p></div>
</div>
<a name="Game_Loop"></a><a name="Topic133"></a><div class="CTopic TGroup LC">
<div class="CTitle">Game Loop</div>
</div>
<a name="Game_Start"></a><a name="Topic134"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_Start</div>
<div id="NDPrototype134" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Game_Start(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">screenMode,</td></tr><tr><td class="PType first"><span class="SHKeyword">bool</span>&nbsp;</td><td class="PName last">b60hz</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Game main loop</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">screenMode<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>The screen mode to select at game start. See <a href="../../index.html#File:vdp.h:VDP_MODE" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,491);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >VDP_MODE</a></p></td></tr></table></div>
</div>
<a name="Game_Exit"></a><a name="Topic135"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_Exit</div>
<div id="NDPrototype135" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Game_Exit()</div></div>
<div class="CBody"><p>Game exit</p></div>
</div>
<a name="Game_State"></a><a name="Topic136"></a><div class="CTopic TGroup LC">
<div class="CTitle">Game State</div>
</div>
<a name="Game_SetState"></a><a name="Topic137"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_SetState</div>
<div id="NDPrototype137" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Game_SetState(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">GameState&nbsp;</td><td class="PName last">newState</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set the next state (change will be effective at the next state update)</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">newState<div class="CDLParameterType">GameState</div></td><td class="CDLDefinition"><p>The new state to execute</p></td></tr></table></div>
</div>
<a name="Game_RestoreState"></a><a name="Topic138"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_RestoreState</div>
<div id="NDPrototype138" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> Game_RestoreState()</div></div>
<div class="CBody"><p>Restore the previous state</p></div>
</div>
<a name="Game_UpdateState"></a><a name="Topic139"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_UpdateState</div>
<div id="NDPrototype139" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> Game_UpdateState()</div></div>
<div class="CBody"><p>Check state transition and update current state</p></div>
</div>
<a name="Game_GetCurrentState"></a><a name="Topic140"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_GetCurrentState</div>
<div id="NDPrototype140" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> GameState Game_GetCurrentState()</div></div>
<div class="CBody"><p>Get current state</p><div class="CHeading">Return</div><p>Address of the current state function</p></div>
</div>
<a name="Game_V-Synch"></a><a name="Topic141"></a><div class="CTopic TGroup LC">
<div class="CTitle">Game V-Synch</div>
</div>
<a name="Game_VSyncHook"></a><a name="Topic142"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_VSyncHook</div>
<div id="NDPrototype142" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> Game_VSyncHook()</div></div>
<div class="CBody"><p>Vertical-synchronization hook handler</p></div>
</div>
<a name="Game_SetVSyncCallback"></a><a name="Topic143"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_SetVSyncCallback</div>
<div id="NDPrototype143" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Game_SetVSyncCallback(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">callback&nbsp;</td><td class="PName last">cb</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set V-Sync callback</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">cb<div class="CDLParameterType">callback</div></td><td class="CDLDefinition"><p>The v-sync function to set</p></td></tr></table></div>
</div>
<a name="Game_GetFrameCount"></a><a name="Topic144"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_GetFrameCount</div>
<div id="NDPrototype144" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> u8 Game_GetFrameCount()</div></div>
<div class="CBody"><p>Get frame counter</p><div class="CHeading">Return</div><p>Current frame counter (0-255).</p></div>
</div>
<a name="Game_WaitVSync"></a><a name="Topic145"></a><div class="CTopic TFunction LC">
<div class="CTitle">Game_WaitVSync</div>
<div id="NDPrototype145" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> Game_WaitVSync()</div></div>
<div class="CBody"><p>Wait for vertical-synchronization</p></div>
</div>
<a name="Game_SetIs60Hz"></a><a name="Topic146"></a><div class="CTopic TFunction LC last">
<div class="CTitle">Game_SetIs60Hz</div>
<div id="NDPrototype146" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Game_SetIs60Hz(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first"><span class="SHKeyword">bool</span>&nbsp;</td><td class="PName last">b60hz</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set 60Hz mode (6th frame skip)</p></div>
</div>
</body></html>