<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CSection"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="Engine_Interface"></a>Engine Interface</h1><divclass=CBody><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#Engine_Interface">Engine Interface</a></td><tdclass=SDescription></td></tr><trclass="SClass"><tdclass=SEntry><ahref="#SNAP_ITEM">SNAP_ITEM</a></td><tdclass=SDescription></td></tr><trclass="SClass"><tdclass=SEntry><ahref="#CLIENT_INFO">CLIENT_INFO</a></td><tdclass=SDescription></td></tr><trclass="SSection"><tdclass=SEntry><ahref="#Map">Map</a></td><tdclass=SDescription></td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#map_is_loaded"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">map_is_loaded</a></td><tdclass=SDescription>Checks if a map is loaded.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#map_num_items"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">map_num_items</a></td><tdclass=SDescription>Checks the number of items in the loaded map.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#map_find_item"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">map_find_item</a></td><tdclass=SDescription>Searches the map for an item.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#map_get_item"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">map_get_item</a></td><tdclass=SDescription>Gets an item from the loaded map from index.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#map_get_type"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">map_get_type</a></td><tdclass=SDescription>Gets the index range of an item type.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#map_get_data"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">map_get_data</a></td><tdclass=SDescription>Fetches a pointer to a raw data chunk in the map.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#map_get_data_swapped"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">map_get_data_swapped</a></td><tdclass=SDescription>TODO</td></tr><trclass="SSection"><tdclass=SEntry><ahref="#Network(Server)">Network (Server)</a></td><tdclass=SDescription></td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#snap_new_item"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">snap_new_item</a></td><tdclass=SDescription>Creates a new item that should be sent.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#snap_num_items"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">snap_num_items</a></td><tdclass=SDescription>Check the number of items in a snapshot.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#snap_get_item"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">snap_get_item</a></td><tdclass=SDescription>Gets an item from a snapshot.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#snap_find_item"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">snap_find_item</a></td><tdclass=SDescription>Searches a snapshot for an item.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#snap_invalidate_item"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">snap_invalidate_item</a></td><tdclass=SDescription>Marks an i
<divclass="CSection"><divclass=CTopic><h2class=CTitle><aname="Map"></a>Map</h2><divclass=CBody><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SGroup"><tdclass=SEntry><ahref="#Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#map_is_loaded"id=link20onMouseOver="ShowTip(event, 'tt1', 'link20')"onMouseOut="HideTip('tt1')">map_is_loaded</a></td><tdclass=SDescription>Checks if a map is loaded.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#map_num_items"id=link21onMouseOver="ShowTip(event, 'tt2', 'link21')"onMouseOut="HideTip('tt2')">map_num_items</a></td><tdclass=SDescription>Checks the number of items in the loaded map.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#map_find_item"id=link22onMouseOver="ShowTip(event, 'tt3', 'link22')"onMouseOut="HideTip('tt3')">map_find_item</a></td><tdclass=SDescription>Searches the map for an item.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#map_get_item"id=link23onMouseOver="ShowTip(event, 'tt4', 'link23')"onMouseOut="HideTip('tt4')">map_get_item</a></td><tdclass=SDescription>Gets an item from the loaded map from index.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#map_get_type"id=link24onMouseOver="ShowTip(event, 'tt5', 'link24')"onMouseOut="HideTip('tt5')">map_get_type</a></td><tdclass=SDescription>Gets the index range of an item type.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#map_get_data"id=link25onMouseOver="ShowTip(event, 'tt6', 'link25')"onMouseOut="HideTip('tt6')">map_get_data</a></td><tdclass=SDescription>Fetches a pointer to a raw data chunk in the map.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#map_get_data_swapped"id=link26onMouseOver="ShowTip(event, 'tt7', 'link26')"onMouseOut="HideTip('tt7')">map_get_data_swapped</a></td><tdclass=SDescription>TODO</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="map_is_loaded"></a>map_is_loaded</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>int map_is_loaded()</td></tr></table></blockquote><p>Checks if a map is loaded.</p><h4class=CHeading>Returns</h4><p>Returns 1 if the button is pressed, otherwise 0.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="map_num_items"></a>map_num_items</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>int map_num_items()</td></tr></table></blockquote><p>Checks the number of items in the loaded map.</p><h4class=CHeading>Returns</h4><p>Returns the number of items. 0 if no map is loaded.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="map_find_item"></a>map_find_item</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_find_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>id</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Searches the map for an item.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>type</td><tdclass=CDLDescription>Item type.</td></tr><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>Item ID.</td></tr></table><h4class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise it returns NULL.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="map_get_item"></a>map_get_item</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_get_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>index,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>id</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets an item from the loaded map from index.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>index</td><tdclass=CDLDescription>Item index.</td></tr><tr><tdclass=CDLEntry>type</td><tdclass=CDLDescription>Pointer that recives the item type (can be NULL).</td></tr><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>Pointer that recives the item id (can be NULL).</td></tr></table><h4class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise it returns NULL.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="map_get_type"></a>map_get_type</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void map_get_type(</td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>start,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>num</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the index range of an item type.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>type</td><tdclass=CDLDescription>Item type to search for.</td></tr><tr><tdclass=CDLEntry>start</td><tdclass=CDLDescription>Pointer that recives the starting index.</td></tr><tr><tdclass=CDLEntry>num</td><tdclass=CDLDescription>Pointer that recives the number of items.</td></tr></table><h4class=CHeading>Returns</h4><p>If the item type is not in the map, start and num will be set to 0.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="map_get_data"></a>map_get_data</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_get_data(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>index</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Fetches a pointer to a raw data chunk in the map.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>index</td><tdclass=CDLDescription>Index to the data to fetch.</td></tr></table><h4class=CHeading>Returns</h4><p>A pointer to the raw data, otherwise 0.</p></div></div></div>
<divclass="CSection"><divclass=CTopic><h2class=CTitle><aname="Network(Server)"></a>Network (Server)</h2><divclass=CBody><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SGroup"><tdclass=SEntry><ahref="#Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#snap_new_item"id=link27onMouseOver="ShowTip(event, 'tt8', 'link27')"onMouseOut="HideTip('tt8')">snap_new_item</a></td><tdclass=SDescription>Creates a new item that should be sent.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#snap_num_items"id=link28onMouseOver="ShowTip(event, 'tt9', 'link28')"onMouseOut="HideTip('tt9')">snap_num_items</a></td><tdclass=SDescription>Check the number of items in a snapshot.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#snap_get_item"id=link29onMouseOver="ShowTip(event, 'tt10', 'link29')"onMouseOut="HideTip('tt10')">snap_get_item</a></td><tdclass=SDescription>Gets an item from a snapshot.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#snap_find_item"id=link30onMouseOver="ShowTip(event, 'tt11', 'link30')"onMouseOut="HideTip('tt11')">snap_find_item</a></td><tdclass=SDescription>Searches a snapshot for an item.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#snap_invalidate_item"id=link31onMouseOver="ShowTip(event, 'tt12', 'link31')"onMouseOut="HideTip('tt12')">snap_invalidate_item</a></td><tdclass=SDescription>Marks an item as invalid byt setting type and id to 0xffffffff.</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#snap_input"id=link32onMouseOver="ShowTip(event, 'tt13', 'link32')"onMouseOut="HideTip('tt13')">snap_input</a></td><tdclass=SDescription>Sets the input data to send to the server.</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#snap_set_staticsize"id=link33onMouseOver="ShowTip(event, 'tt14', 'link33')"onMouseOut="HideTip('tt14')">snap_set_staticsize</a></td><tdclass=SDescription>Tells the engine how big a specific item always will be. </td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#server_send_msg"id=link34onMouseOver="ShowTip(event, 'tt15', 'link34')"onMouseOut="HideTip('tt15')">server_send_msg</a></td><tdclass=SDescription>TODO</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#client_send_msg"id=link35onMouseOver="ShowTip(event, 'tt16', 'link35')"onMouseOut="HideTip('tt16')">client_send_msg</a></td><tdclass=SDescription>TODO</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#snap_new_id"id=link36onMouseOver="ShowTip(event, 'tt17', 'link36')"onMouseOut="HideTip('tt17')">snap_new_id</a></td><tdclass=SDescription>TODO</td></tr><trclass="SFunction SIndent1 SMarked"><tdclass=SEntry><ahref="#snap_free_id"id=link37onMouseOver="ShowTip(event, 'tt18', 'link37')"onMouseOut="HideTip('tt18')">snap_free_id</a></td><tdclass=SDescription>TODO</td></tr><trclass="SFunction SIndent1"><tdclass=SEntry><ahref="#map_unload_data"id=link38onMouseOver="ShowTip(event, 'tt19', 'link38')"onMouseOut="HideTip('tt19')">map_unload_data</a></td><tdclass=SDescription>TODO</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_new_item"></a>snap_new_item</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *snap_new_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>id,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>size</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a new item that should be sent.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>type</td><tdclass=CDLDescription>Type of the item.</td></tr><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>ID of the item.</td></tr><tr><tdclass=CDLEntry>size</td><tdclass=CDLDescription>Size of the item.</td></tr></table><h4class=CHeading>Returns</h4><p>A pointer to the item data, otherwise 0.</p><h4class=CHeading>Remarks</h4><p>The item data should only consist pf 4 byte integers as they are subject to byte swapping. This means that the size argument should be dividable by 4.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_num_items"></a>snap_num_items</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>int snap_num_items(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>snapid</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Check the number of items in a snapshot.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>snapid</td><tdclass=CDLDescription>Snapshot ID to the data to fetch.</td></tr></table><ul><li>SNAP_PREV for previous snapshot.</li><li>SNAP_CUR for current snapshot.</li></ul><h4class=CHeading>Returns</h4><p>The number of items in the snapshot.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_get_item"></a>snap_get_item</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *snap_get_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>snapid,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>index,</td></tr><tr><td></td><tdclass=PTypenowrap>SNAP_ITEM </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>item</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets an item from a snapshot.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>snapid</td><tdclass=CDLDescription>Snapshot ID to the data to fetch.</td></tr></table><ul><li>SNAP_PREV for previous snapshot.</li><li>SNAP_CUR for current snapshot.</li></ul><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>index</td><tdclass=CDLDescription>Index of the item.</td></tr><tr><tdclass=CDLEntry>item</td><tdclass=CDLDescription>Pointer that recives the item info.</td></tr></table><h4class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise NULL.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_find_item"></a>snap_find_item</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *snap_find_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>snapid,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>id</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Searches a snapshot for an item.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>snapid</td><tdclass=CDLDescription>Snapshot ID to the data to fetch.</td></tr></table><ul><li>SNAP_PREV for previous snapshot.</li><li>SNAP_CUR for current snapshot.</li></ul><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>type</td><tdclass=CDLDescription>Type of the item.</td></tr><tr><tdclass=CDLEntry>id</td><tdclass=CDLDescription>ID of the item.</td></tr></table><h4class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise NULL.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_invalidate_item"></a>snap_invalidate_item</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void snap_invalidate_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>snapid,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>index</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Marks an item as invalid byt setting type and id to 0xffffffff.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>snapid</td><tdclass=CDLDescription>Snapshot ID to the data to fetch.</td></tr></table><ul><li>SNAP_PREV for previous snapshot.</li><li>SNAP_CUR for current snapshot.</li></ul><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>index</td><tdclass=CDLDescription>Index of the item.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_input"></a>snap_input</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void snap_input(</td><tdclass=PTypenowrap>void </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>data,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>size</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the input data to send to the server.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>data</td><tdclass=CDLDescription>Pointer to the data.</td></tr><tr><tdclass=CDLEntry>size</td><tdclass=CDLDescription>Size of the data.</td></tr></table><h4class=CHeading>Remarks</h4><p>The data should only consist of 4 bytes integer as they are subject to byte swapping.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="snap_set_staticsize"></a>snap_set_staticsize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void snap_set_staticsize(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>size</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Tells the engine how big a specific item always will be. This helps the engine to compress snapshots better.</p><h4class=CHeading>Arguments</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>type</td><tdclass=CDLDescription>Item type</td></tr><tr><tdclass=CDLEntry>size</td><tdclass=CDLDescription>Size of the data.</td></tr></table><h4class=CHeading>Remarks</h4><p>Size must be in a multiple of 4.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>int map_is_loaded()</td></tr></table></blockquote>Checks if a map is loaded.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td>int map_num_items()</td></tr></table></blockquote>Checks the number of items in the loaded map.</div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_find_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>id</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Searches the map for an item.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_get_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>index,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>id</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Gets an item from the loaded map from index.</div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void map_get_type(</td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap></td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>start,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameterPrefixnowrap>*</td><tdclass=PParameternowrap>num</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Gets the index range of an item type.</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_get_data(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>index</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Fetches a pointer to a raw data chunk in the map.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *map_get_data_swapped(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>index</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>TODO</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class=Prototype><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>void *snap_new_item(</td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>type,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>id,</td></tr><tr><td></td><tdclass=PTypenowrap>int </td><tdclass=PParameternowrap>size</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Creates a new item that should be sent.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpaddi