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

158 lines
27 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>pawn.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="Pawn_Initialize"></a><a name="Topic198"></a><div class="CTopic TFunction LC first">
<div class="CTitle">Pawn_Initialize</div>
<div id="NDPrototype198" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_Initialize(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="first"></td><td class="PType">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span>&nbsp;</td><td class="PType">Pawn_Sprite*&nbsp;</td><td class="PName last">sprtList,</td></tr><tr><td class="first"></td><td class="PType">u8&nbsp;</td><td class="PName last">sprtNum,</td></tr><tr><td class="first"></td><td class="PType">u8&nbsp;</td><td class="PName last">sprtID,</td></tr><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span>&nbsp;</td><td class="PType">Pawn_Action*&nbsp;</td><td class="PName last">actList</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Initialize a game pawn.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to initialize. This is he structure to be used for all other functions.</p></td></tr><tr><td class="CDLEntry">sprtList<div class="CDLParameterType"><span class="SHKeyword">const</span> Pawn_Sprite*</div></td><td class="CDLDefinition"><p>Array of all sprite layers used to display the pawn. See &lt;Pawn_Sprite&gt; for details.</p></td></tr><tr><td class="CDLEntry">sprtNum<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Size of the 'sprtList' table (in entries number).</p></td></tr><tr><td class="CDLEntry">sprtID<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>First srite index to use for the pawn. The pawn will use all sprite indexes from 'sprtID' to 'sprtID + sprtNum - 1'.&nbsp; If &lt;PAWN_ID_PER_LAYER&gt; compile option is activated, this parmeter is not used as each sprit layer define it's own sprite index.</p></td></tr><tr><td class="CDLEntry">actList<div class="CDLParameterType"><span class="SHKeyword">const</span> Pawn_Action*</div></td><td class="CDLDefinition"><p>Array of pawn action. Needed to use <a href="../../index.html#File:game/pawn.h:Pawn_SetAction" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,203);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >Pawn_SetAction</a> function.</p></td></tr></table></div>
</div>
<a name="Pawn_SetPosition"></a><a name="Topic199"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetPosition</div>
<div id="NDPrototype199" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_SetPosition(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first">PAWN_POS&nbsp;</td><td class="PName last">x,</td></tr><tr><td class="PType first">PAWN_POS&nbsp;</td><td class="PName last">y</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set game pawn position. Force movement even if collision is activated.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to move.</p></td></tr><tr><td class="CDLEntry">x<div class="CDLParameterType">PAWN_POS</div></td><td class="CDLDefinition"><p>New X coordinate (in pixels).</p></td></tr><tr><td class="CDLEntry">y<div class="CDLParameterType">PAWN_POS</div></td><td class="CDLDefinition"><p>New Y coordinate (in pixels).</p></td></tr></table></div>
</div>
<a name="Pawn_GetPositionX"></a><a name="Topic200"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_GetPositionX</div>
<div id="NDPrototype200" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> PAWN_POS Pawn_GetPositionX(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Get the X coordinate of the pawn's position.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Pointer to pawn structure.</p></td></tr></table><div class="CHeading">Return</div><p>X coordinate of the pawn's position.</p></div>
</div>
<a name="Pawn_GetPositionY"></a><a name="Topic201"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_GetPositionY</div>
<div id="NDPrototype201" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> PAWN_POS Pawn_GetPositionY(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Get the Y coordinate of the pawn's position.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Pointer to pawn structure.</p></td></tr></table><div class="CHeading">Return</div><p>Y coordinate of the pawn's position.</p></div>
</div>
<a name="Pawn_ForceSetAction"></a><a name="Topic202"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_ForceSetAction</div>
<div id="NDPrototype202" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_ForceSetAction(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">id</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Force to set game pawn action id.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to setup.</p></td></tr><tr><td class="CDLEntry">id<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>New action index.</p></td></tr></table></div>
</div>
<a name="Pawn_SetAction"></a><a name="Topic203"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetAction</div>
<div id="NDPrototype203" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_SetAction(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">id</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set game pawn current action index.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to setup.</p></td></tr><tr><td class="CDLEntry">id<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>New action index.</p></td></tr></table></div>
</div>
<a name="Pawn_RestartAction"></a><a name="Topic204"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_RestartAction</div>
<div id="NDPrototype204" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_RestartAction(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Game_Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Restart the current action.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Game_Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to setup.</p></td></tr></table></div>
</div>
<a name="Pawn_GetAction"></a><a name="Topic205"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_GetAction</div>
<div id="NDPrototype205" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> u8 Pawn_GetAction(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Get the current action ID of the pawn.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Pointer to pawn structure.</p></td></tr></table><div class="CHeading">Return</div><p>Current action ID of the pawn.</p></div>
</div>
<a name="Pawn_SetTileMap"></a><a name="Topic206"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetTileMap</div>
<div id="NDPrototype206" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_SetTileMap(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span>&nbsp;</td><td class="PType">u8*&nbsp;</td><td class="PName last">map</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set the tile map to be used for collision.&nbsp; Available only when PAWN_TILEMAP_SRC is set to PAWN_TILEMAP_SRC_RAM.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">map<div class="CDLParameterType"><span class="SHKeyword">const</span> u8*</div></td><td class="CDLDefinition"><p>Pointer to RAM buffer with the tile map. Size must be PAWN_TILEMAP_WIDTH * PAWN_TILEMAP_HEIGHT.</p></td></tr></table></div>
</div>
<a name="Pawn_SetEnable"></a><a name="Topic207"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetEnable</div>
<div id="NDPrototype207" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_SetEnable(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first"><span class="SHKeyword">bool</span>&nbsp;</td><td class="PName last">enable</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set if pawn is enable or disable. Disabled pawn will not be updated nor drawn.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to update (move, collision, etc.).</p></td></tr><tr><td class="CDLEntry">enable<div class="CDLParameterType"><span class="SHKeyword">bool</span></div></td><td class="CDLDefinition"><p>TRUE to enable the pawn, FALSE to disable it.</p></td></tr></table></div>
</div>
<a name="Pawn_Disable"></a><a name="Topic208"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_Disable</div>
<div id="NDPrototype208" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_Disable(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Disable a pawn. Disabled pawn will not be updated nor drawn.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to update (move, collision, etc.).</p></td></tr></table></div>
</div>
<a name="Pawn_Enable"></a><a name="Topic209"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_Enable</div>
<div id="NDPrototype209" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_Enable(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Enable a pawn. Enabled pawn will be updated and drawn.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to update (move, collision, etc.).</p></td></tr></table></div>
</div>
<a name="Pawn_Update"></a><a name="Topic210"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_Update</div>
<div id="NDPrototype210" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_Update(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Update animation of the game pawn. Must be called once a frame.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to update (move, collision, etc.).</p></td></tr></table></div>
</div>
<a name="Pawn_SetDirty"></a><a name="Topic211"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetDirty</div>
<div id="NDPrototype211" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_SetDirty(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Mark the pawn as dirty. This will force the pawn to be redrawn.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to update (move, collision, etc.).</p></td></tr></table></div>
</div>
<a name="Pawn_SetColorBlend"></a><a name="Topic212"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetColorBlend</div>
<div id="NDPrototype212" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_SetColorBlend(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first"><span class="SHKeyword">bool</span>&nbsp;</td><td class="PName last">enable</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Enable or disable sprite color blending effect.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to update (move, collision, etc.).</p></td></tr><tr><td class="CDLEntry">enable<div class="CDLParameterType"><span class="SHKeyword">bool</span></div></td><td class="CDLDefinition"><p>TRUE to enable color blending, FALSE to disable it.</p></td></tr></table></div>
</div>
<a name="Pawn_Draw"></a><a name="Topic213"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_Draw</div>
<div id="NDPrototype213" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_Draw(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Update rendering of the game pawn. Must be called once a frame.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to draw.</p></td></tr></table></div>
</div>
<a name="Pawn_SetPatternAddress"></a><a name="Topic214"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetPatternAddress</div>
<div id="NDPrototype214" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_SetPatternAddress(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="first"></td><td class="PType">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span>&nbsp;</td><td class="PType"><span class="SHKeyword">void</span>*&nbsp;</td><td class="PName last">addr</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set the base address of the sprite pattern data.&nbsp; Only available if PAWN_USE_RT_LOAD compile option is set to TRUE.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to initialize.</p></td></tr><tr><td class="CDLEntry">addr<div class="CDLParameterType"><span class="SHKeyword">const</span> <span class="SHKeyword">void</span>*</div></td><td class="CDLDefinition"><p>Base address of the sprite pattern data.</p></td></tr></table></div>
</div>
<a name="Pawn_SetSpriteFX"></a><a name="Topic215"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetSpriteFX</div>
<div id="NDPrototype215" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_SetSpriteFX(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first">u8&nbsp;</td><td class="PName last">fx</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set sprite effect.&nbsp; Only available if PAWN_USE_RT_LOAD and PAWN_USE_SPRT_FX compile options are set to TRUE.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to initialize.</p></td></tr><tr><td class="CDLEntry">fx<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Sprite effect (crop, flip, mask, rotate).</p></td></tr></table></div>
</div>
<a name="Physics"></a><a name="Topic216"></a><div class="CTopic TGroup LC">
<div class="CTitle">Physics</div>
</div>
<a name="Pawn_SetMovement"></a><a name="Topic217"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetMovement</div>
<div id="NDPrototype217" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> Pawn_SetMovement(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first">i8&nbsp;</td><td class="PName last">dx,</td></tr><tr><td class="PType first">i8&nbsp;</td><td class="PName last">dy</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set pawn relative movement. Collision can prevent part of the movement.&nbsp; Only available if PAWN_USE_PHYSICS compile option is set to TRUE.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to move.</p></td></tr><tr><td class="CDLEntry">x</td><td class="CDLDefinition"><p>New X movement (in pixels).</p></td></tr><tr><td class="CDLEntry">y</td><td class="CDLDefinition"><p>New Y movement (in pixels).</p></td></tr></table></div>
</div>
<a name="Pawn_SetTargetPosition"></a><a name="Topic218"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetTargetPosition</div>
<div id="NDPrototype218" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> Pawn_SetTargetPosition(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn,</td></tr><tr><td class="PType first">PAWN_POS&nbsp;</td><td class="PName last">x,</td></tr><tr><td class="PType first">PAWN_POS&nbsp;</td><td class="PName last">y</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set pawn absolute movement. Collision can prevent part of the movement.&nbsp; Only available if PAWN_USE_PHYSICS compile option is set to TRUE.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Address of game pawn structure to move.</p></td></tr><tr><td class="CDLEntry">x<div class="CDLParameterType">PAWN_POS</div></td><td class="CDLDefinition"><p>New X coordinate (in pixels).</p></td></tr><tr><td class="CDLEntry">y<div class="CDLParameterType">PAWN_POS</div></td><td class="CDLDefinition"><p>New Y coordinate (in pixels).</p></td></tr></table></div>
</div>
<a name="Pawn_SetPhysicsCallback"></a><a name="Topic219"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_SetPhysicsCallback</div>
<div class="CBody"><p>Set pawn physics callback Only available if PAWN_USE_PHYSICS compile option is set to TRUE.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn</td><td class="CDLDefinition"><p>Address of game pawn structure to initialize.</p></td></tr><tr><td class="CDLEntry">pcb</td><td class="CDLDefinition"><p>Callback function to be called when physics events occurs.</p></td></tr><tr><td class="CDLEntry">ccb</td><td class="CDLDefinition"><p>Callback function to be called when collision events occurs.</p></td></tr><tr><td class="CDLEntry">boundX</td><td class="CDLDefinition"><p>Bounding box X extend (in pixels, from the pawn's origin).</p></td></tr><tr><td class="CDLEntry">boundY</td><td class="CDLDefinition"><p>Bounding box Y extend (in pixels, from the pawn's origin).</p></td></tr></table></div>
</div>
<a name="Pawn_GetPhysicsState"></a><a name="Topic220"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_GetPhysicsState</div>
<div id="NDPrototype220" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> u8 Pawn_GetPhysicsState(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">Pawn*&nbsp;</td><td class="PName last">pawn</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Get pawn physics state.&nbsp; Only available if PAWN_USE_PHYSICS compile option is set to TRUE.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">pawn<div class="CDLParameterType">Pawn*</div></td><td class="CDLDefinition"><p>Pointer to pawn structure.</p></td></tr></table><div class="CHeading">Return</div><p>Pawn's physics state.</p></div>
</div>
<a name="Pawn_GetCallbackCellX"></a><a name="Topic221"></a><div class="CTopic TFunction LC">
<div class="CTitle">Pawn_GetCallbackCellX</div>
<div id="NDPrototype221" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline const</span> u8 Pawn_GetCallbackCellX()</div></div>
<div class="CBody"><p>Get the X coordinate of the cell that triggered a callback.&nbsp; The value is only valid within a callback.&nbsp; Only available if PAWN_USE_PHYSICS compile option is set to TRUE.</p><div class="CHeading">Return</div><p>X coordinate of the current cell.</p></div>
</div>
<a name="Pawn_GetCallbackCellY"></a><a name="Topic222"></a><div class="CTopic TFunction LC last">
<div class="CTitle">Pawn_GetCallbackCellY</div>
<div id="NDPrototype222" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline const</span> u8 Pawn_GetCallbackCellY()</div></div>
<div class="CBody"><p>Get the Y coordinate of the cell that triggered a callback.&nbsp; The value is only valid within a callback.&nbsp; Only available if PAWN_USE_PHYSICS compile option is set to TRUE.</p><div class="CHeading">Return</div><p>Y coordinate of the current cell.</p></div>
</div>
</body></html>