mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
89 lines
43 KiB
HTML
89 lines
43 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||
|
|
||
|
<html><head><title>Engine Interface</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
|
||
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
||
|
|
||
|
<!-- Generated by Natural Docs, version 1.4 -->
|
||
|
<!-- http://www.naturaldocs.org -->
|
||
|
|
||
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=Content><div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Engine_Interface"></a>Engine Interface</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Engine_Interface" >Engine Interface</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#SNAP_ITEM" >SNAP_ITEM</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#CLIENT_INFO" >CLIENT_INFO</a></td><td class=SDescription></td></tr><tr class="SSection"><td class=SEntry><a href="#Map" >Map</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#map_is_loaded" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">map_is_loaded</a></td><td class=SDescription>Checks if a map is loaded.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#map_num_items" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">map_num_items</a></td><td class=SDescription>Checks the number of items in the loaded map.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#map_find_item" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">map_find_item</a></td><td class=SDescription>Searches the map for an item.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#map_get_item" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">map_get_item</a></td><td class=SDescription>Gets an item from the loaded map from index.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#map_get_type" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">map_get_type</a></td><td class=SDescription>Gets the index range of an item type.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#map_get_data" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">map_get_data</a></td><td class=SDescription>Fetches a pointer to a raw data chunk in the map.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#map_get_data_swapped" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">map_get_data_swapped</a></td><td class=SDescription>TODO</td></tr><tr class="SSection"><td class=SEntry><a href="#Network(Server)" >Network (Server)</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#snap_new_item" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">snap_new_item</a></td><td class=SDescription>Creates a new item that should be sent.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#snap_num_items" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">snap_num_items</a></td><td class=SDescription>Check the number of items in a snapshot.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#snap_get_item" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">snap_get_item</a></td><td class=SDescription>Gets an item from a snapshot.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#snap_find_item" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">snap_find_item</a></td><td class=SDescription>Searches a snapshot for an item.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#snap_invalidate_item" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">snap_invalidate_item</a></td><td class=SDescription>Marks an i
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="SNAP_ITEM"></a>SNAP_ITEM</h2><div class=CBody></div></div></div>
|
||
|
|
||
|
<div class="CClass"><div class=CTopic><h2 class=CTitle><a name="CLIENT_INFO"></a>CLIENT_INFO</h2><div class=CBody></div></div></div>
|
||
|
|
||
|
<div class="CSection"><div class=CTopic><h2 class=CTitle><a name="Map"></a>Map</h2><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#map_is_loaded" id=link20 onMouseOver="ShowTip(event, 'tt1', 'link20')" onMouseOut="HideTip('tt1')">map_is_loaded</a></td><td class=SDescription>Checks if a map is loaded.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#map_num_items" id=link21 onMouseOver="ShowTip(event, 'tt2', 'link21')" onMouseOut="HideTip('tt2')">map_num_items</a></td><td class=SDescription>Checks the number of items in the loaded map.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#map_find_item" id=link22 onMouseOver="ShowTip(event, 'tt3', 'link22')" onMouseOut="HideTip('tt3')">map_find_item</a></td><td class=SDescription>Searches the map for an item.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#map_get_item" id=link23 onMouseOver="ShowTip(event, 'tt4', 'link23')" onMouseOut="HideTip('tt4')">map_get_item</a></td><td class=SDescription>Gets an item from the loaded map from index.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#map_get_type" id=link24 onMouseOver="ShowTip(event, 'tt5', 'link24')" onMouseOut="HideTip('tt5')">map_get_type</a></td><td class=SDescription>Gets the index range of an item type.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#map_get_data" id=link25 onMouseOver="ShowTip(event, 'tt6', 'link25')" onMouseOut="HideTip('tt6')">map_get_data</a></td><td class=SDescription>Fetches a pointer to a raw data chunk in the map.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#map_get_data_swapped" id=link26 onMouseOver="ShowTip(event, 'tt7', 'link26')" onMouseOut="HideTip('tt7')">map_get_data_swapped</a></td><td class=SDescription>TODO</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_is_loaded"></a>map_is_loaded</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int map_is_loaded()</td></tr></table></blockquote><p>Checks if a map is loaded.</p><h4 class=CHeading>Returns</h4><p>Returns 1 if the button is pressed, otherwise 0.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_num_items"></a>map_num_items</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int map_num_items()</td></tr></table></blockquote><p>Checks the number of items in the loaded map.</p><h4 class=CHeading>Returns</h4><p>Returns the number of items. 0 if no map is loaded.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_find_item"></a>map_find_item</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_find_item(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Searches the map for an item.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>type</td><td class=CDLDescription>Item type.</td></tr><tr><td class=CDLEntry>id</td><td class=CDLDescription>Item ID.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise it returns NULL.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_get_item"></a>map_get_item</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_get_item(</td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>index,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets an item from the loaded map from index.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>index</td><td class=CDLDescription>Item index.</td></tr><tr><td class=CDLEntry>type</td><td class=CDLDescription>Pointer that recives the item type (can be NULL).</td></tr><tr><td class=CDLEntry>id</td><td class=CDLDescription>Pointer that recives the item id (can be NULL).</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise it returns NULL.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_get_type"></a>map_get_type</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void map_get_type(</td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>start,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>num</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets the index range of an item type.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>type</td><td class=CDLDescription>Item type to search for.</td></tr><tr><td class=CDLEntry>start</td><td class=CDLDescription>Pointer that recives the starting index.</td></tr><tr><td class=CDLEntry>num</td><td class=CDLDescription>Pointer that recives the number of items.</td></tr></table><h4 class=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>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_get_data"></a>map_get_data</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_get_data(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Fetches a pointer to a raw data chunk in the map.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>index</td><td class=CDLDescription>Index to the data to fetch.</td></tr></table><h4 class=CHeading>Returns</h4><p>A pointer to the raw data, otherwise 0.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_get_data_swapped"></a>map_get_data_swapped</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_get_data_swapped(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>TODO</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>arg1</td><td class=CDLDescription>desc</td></tr></table><h4 class=CHeading>Returns</h4><h4 class=CHeading>See Also</h4><p><other_func></p></div></div></div>
|
||
|
|
||
|
<div class="CSection"><div class=CTopic><h2 class=CTitle><a name="Network(Server)"></a>Network (Server)</h2><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#snap_new_item" id=link27 onMouseOver="ShowTip(event, 'tt8', 'link27')" onMouseOut="HideTip('tt8')">snap_new_item</a></td><td class=SDescription>Creates a new item that should be sent.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#snap_num_items" id=link28 onMouseOver="ShowTip(event, 'tt9', 'link28')" onMouseOut="HideTip('tt9')">snap_num_items</a></td><td class=SDescription>Check the number of items in a snapshot.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#snap_get_item" id=link29 onMouseOver="ShowTip(event, 'tt10', 'link29')" onMouseOut="HideTip('tt10')">snap_get_item</a></td><td class=SDescription>Gets an item from a snapshot.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#snap_find_item" id=link30 onMouseOver="ShowTip(event, 'tt11', 'link30')" onMouseOut="HideTip('tt11')">snap_find_item</a></td><td class=SDescription>Searches a snapshot for an item.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#snap_invalidate_item" id=link31 onMouseOver="ShowTip(event, 'tt12', 'link31')" onMouseOut="HideTip('tt12')">snap_invalidate_item</a></td><td class=SDescription>Marks an item as invalid byt setting type and id to 0xffffffff.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#snap_input" id=link32 onMouseOver="ShowTip(event, 'tt13', 'link32')" onMouseOut="HideTip('tt13')">snap_input</a></td><td class=SDescription>Sets the input data to send to the server.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#snap_set_staticsize" id=link33 onMouseOver="ShowTip(event, 'tt14', 'link33')" onMouseOut="HideTip('tt14')">snap_set_staticsize</a></td><td class=SDescription>Tells the engine how big a specific item always will be. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#server_send_msg" id=link34 onMouseOver="ShowTip(event, 'tt15', 'link34')" onMouseOut="HideTip('tt15')">server_send_msg</a></td><td class=SDescription>TODO</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#client_send_msg" id=link35 onMouseOver="ShowTip(event, 'tt16', 'link35')" onMouseOut="HideTip('tt16')">client_send_msg</a></td><td class=SDescription>TODO</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#snap_new_id" id=link36 onMouseOver="ShowTip(event, 'tt17', 'link36')" onMouseOut="HideTip('tt17')">snap_new_id</a></td><td class=SDescription>TODO</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#snap_free_id" id=link37 onMouseOver="ShowTip(event, 'tt18', 'link37')" onMouseOut="HideTip('tt18')">snap_free_id</a></td><td class=SDescription>TODO</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#map_unload_data" id=link38 onMouseOver="ShowTip(event, 'tt19', 'link38')" onMouseOut="HideTip('tt19')">map_unload_data</a></td><td class=SDescription>TODO</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_new_item"></a>snap_new_item</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *snap_new_item(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>id,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a new item that should be sent.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>type</td><td class=CDLDescription>Type of the item.</td></tr><tr><td class=CDLEntry>id</td><td class=CDLDescription>ID of the item.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the item.</td></tr></table><h4 class=CHeading>Returns</h4><p>A pointer to the item data, otherwise 0.</p><h4 class=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>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_num_items"></a>snap_num_items</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snap_num_items(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>snapid</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Check the number of items in a snapshot.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>snapid</td><td class=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><h4 class=CHeading>Returns</h4><p>The number of items in the snapshot.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_get_item"></a>snap_get_item</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *snap_get_item(</td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>snapid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>index,</td></tr><tr><td></td><td class=PType nowrap>SNAP_ITEM </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>item</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Gets an item from a snapshot.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>snapid</td><td class=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><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>index</td><td class=CDLDescription>Index of the item.</td></tr><tr><td class=CDLEntry>item</td><td class=CDLDescription>Pointer that recives the item info.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise NULL.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_find_item"></a>snap_find_item</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *snap_find_item(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>snapid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Searches a snapshot for an item.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>snapid</td><td class=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><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>type</td><td class=CDLDescription>Type of the item.</td></tr><tr><td class=CDLEntry>id</td><td class=CDLDescription>ID of the item.</td></tr></table><h4 class=CHeading>Returns</h4><p>Returns a pointer to the item if it exists, otherwise NULL.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_invalidate_item"></a>snap_invalidate_item</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snap_invalidate_item(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>snapid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Marks an item as invalid byt setting type and id to 0xffffffff.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>snapid</td><td class=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><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>index</td><td class=CDLDescription>Index of the item.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_input"></a>snap_input</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snap_input(</td><td class=PType nowrap>void </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>data,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the input data to send to the server.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>data</td><td class=CDLDescription>Pointer to the data.</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the data.</td></tr></table><h4 class=CHeading>Remarks</h4><p>The data should only consist of 4 bytes integer as they are subject to byte swapping.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_set_staticsize"></a>snap_set_staticsize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snap_set_staticsize(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</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><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>type</td><td class=CDLDescription>Item type</td></tr><tr><td class=CDLEntry>size</td><td class=CDLDescription>Size of the data.</td></tr></table><h4 class=CHeading>Remarks</h4><p>Size must be in a multiple of 4.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="server_send_msg"></a>server_send_msg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int server_send_msg(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>client_id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>TODO</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>arg1</td><td class=CDLDescription>desc</td></tr></table><h4 class=CHeading>Returns</h4><h4 class=CHeading>See Also</h4><p><other_func></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="client_send_msg"></a>client_send_msg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int client_send_msg()</td></tr></table></blockquote><p>TODO</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>arg1</td><td class=CDLDescription>desc</td></tr></table><h4 class=CHeading>Returns</h4><h4 class=CHeading>See Also</h4><p><other_func></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_new_id"></a>snap_new_id</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int snap_new_id()</td></tr></table></blockquote><p>TODO</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>arg1</td><td class=CDLDescription>desc</td></tr></table><h4 class=CHeading>Returns</h4><h4 class=CHeading>See Also</h4><p><other_func></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snap_free_id"></a>snap_free_id</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snap_free_id(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>TODO</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>arg1</td><td class=CDLDescription>desc</td></tr></table><h4 class=CHeading>Returns</h4><h4 class=CHeading>See Also</h4><p><other_func></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="map_unload_data"></a>map_unload_data</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void map_unload_data(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>TODO</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>arg1</td><td class=CDLDescription>desc</td></tr></table><h4 class=CHeading>Returns</h4><h4 class=CHeading>See Also</h4><p><other_func></p></div></div></div>
|
||
|
|
||
|
</div><!--Content-->
|
||
|
|
||
|
|
||
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
||
|
|
||
|
|
||
|
<div id=Menu><div class=MEntry><div class=MFile><a href="e_system-h.html">OS Abstraction</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Engine</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MFile><a href="e_if_msg-h.html">Messaging</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Client</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Overview</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="docs/client_time-txt.html">Time on the client</a></div></div><div class=MEntry><div class=MFile><a href="docs/prediction-txt.html">Prediction</a></div></div><div class=MEntry><div class=MFile><a href="docs/snapshots-txt.html">Snapshots</a></div></div><div class=MEntry><div class=MFile><a href="docs/server_op-txt.html">Server Operation</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Reference</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="e_if_modc-h.html">Client Hooks</a></div></div><div class=MEntry><div class=MFile><a href="e_if_client-h.html">Client Interface</a></div></div><div class=MEntry><div class=MFile id=MSelected>Engine Interface</div></div><div class=MEntry><div class=MFile><a href="e_if_gfx-h.html">Graphics</a></div></div><div class=MEntry><div class=MFile><a href="e_if_inp-h.html">Input</a></div></div><div class=MEntry><div class=MFile><a href="e_if_snd-h.html">Sound</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Server</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Reference</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="e_if_mods-h.html">Server Hooks</a></div></div><div class=MEntry><div class=MFile><a href="e_if_server-h.html">Server Interface</a></div></div></div></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Game</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MFile><a href="../files/server/gs_common-hpp.html">Entity</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent8')">Index</a><div class=MGroupContent id=MGroupContent8><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
|
||
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
|
||
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Constants">Constants</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
||
|
HideAllBut([2, 3, 6, 1], 9);// --></script></div><!--Menu-->
|
||
|
|
||
|
|
||
|
|
||
|
<!--START_ND_TOOLTIPS-->
|
||
|
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int map_is_loaded()</td></tr></table></blockquote>Checks if a map is loaded.</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>int map_num_items()</td></tr></table></blockquote>Checks the number of items in the loaded map.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_find_item(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Searches the map for an item.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_get_item(</td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>index,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Gets an item from the loaded map from index.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void map_get_type(</td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap></td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>start,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>num</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Gets the index range of an item type.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_get_data(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Fetches a pointer to a raw data chunk in the map.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *map_get_data_swapped(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>TODO</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void *snap_new_item(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>id,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>size</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a new item that should be sent.</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpaddi
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
||
|
|
||
|
|
||
|
<script language=JavaScript><!--
|
||
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
|