Engine Interface | |
SNAP_ITEM | |
CLIENT_INFO | |
Map | |
Functions | |
map_is_loaded | Checks if a map is loaded. |
map_num_items | Checks the number of items in the loaded map. |
map_find_item | Searches the map for an item. |
map_get_item | Gets an item from the loaded map from index. |
map_get_type | Gets the index range of an item type. |
map_get_data | Fetches a pointer to a raw data chunk in the map. |
map_get_data_swapped | TODO |
Network (Server) | |
Functions | |
snap_new_item | Creates a new item that should be sent. |
snap_num_items | Check the number of items in a snapshot. |
snap_get_item | Gets an item from a snapshot. |
snap_find_item | Searches a snapshot for an item. |
snap_invalidate_item | Marks an item as invalid byt setting type and id to 0xffffffff. |
snap_input | Sets the input data to send to the server. |
snap_set_staticsize | Tells the engine how big a specific item always will be. |
server_send_msg | TODO |
client_send_msg | TODO |
snap_new_id | TODO |
snap_free_id | TODO |
map_unload_data | TODO |
Functions | |
map_is_loaded | Checks if a map is loaded. |
map_num_items | Checks the number of items in the loaded map. |
map_find_item | Searches the map for an item. |
map_get_item | Gets an item from the loaded map from index. |
map_get_type | Gets the index range of an item type. |
map_get_data | Fetches a pointer to a raw data chunk in the map. |
map_get_data_swapped | TODO |
void *map_get_item( int index, int * type, int * id )
Gets an item from the loaded map from index.
index | Item index. |
type | Pointer that recives the item type (can be NULL). |
id | Pointer that recives the item id (can be NULL). |
Returns a pointer to the item if it exists, otherwise it returns NULL.
Functions | |
snap_new_item | Creates a new item that should be sent. |
snap_num_items | Check the number of items in a snapshot. |
snap_get_item | Gets an item from a snapshot. |
snap_find_item | Searches a snapshot for an item. |
snap_invalidate_item | Marks an item as invalid byt setting type and id to 0xffffffff. |
snap_input | Sets the input data to send to the server. |
snap_set_staticsize | Tells the engine how big a specific item always will be. |
server_send_msg | TODO |
client_send_msg | TODO |
snap_new_id | TODO |
snap_free_id | TODO |
map_unload_data | TODO |
void *snap_new_item( int type, int id, int size )
Creates a new item that should be sent.
type | Type of the item. |
id | ID of the item. |
size | Size of the item. |
A pointer to the item data, otherwise 0.
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.
void *snap_get_item( int snapid, int index, SNAP_ITEM * item )
Gets an item from a snapshot.
snapid | Snapshot ID to the data to fetch. |
index | Index of the item. |
item | Pointer that recives the item info. |
Returns a pointer to the item if it exists, otherwise NULL.
void *snap_find_item( int snapid, int type, int id )
Searches a snapshot for an item.
snapid | Snapshot ID to the data to fetch. |
type | Type of the item. |
id | ID of the item. |
Returns a pointer to the item if it exists, otherwise NULL.
Checks if a map is loaded.
int map_is_loaded()
Checks the number of items in the loaded map.
int map_num_items()
Searches the map for an item.
void *map_find_item( int type, int id )
Gets an item from the loaded map from index.
void *map_get_item( int index, int * type, int * id )
Gets the index range of an item type.
void map_get_type( int type, int * start, int * num )
Fetches a pointer to a raw data chunk in the map.
void *map_get_data( int index )
TODO
void *map_get_data_swapped( int index )
Creates a new item that should be sent.
void *snap_new_item( int type, int id, int size )
Check the number of items in a snapshot.
int snap_num_items( int snapid )
Gets an item from a snapshot.
void *snap_get_item( int snapid, int index, SNAP_ITEM * item )
Searches a snapshot for an item.
void *snap_find_item( int snapid, int type, int id )
Marks an item as invalid byt setting type and id to 0xffffffff.
void snap_invalidate_item( int snapid, int index )
Sets the input data to send to the server.
void snap_input( void * data, int size )
Tells the engine how big a specific item always will be.
void snap_set_staticsize( int type, int size )
TODO
int server_send_msg( int client_id )
TODO
int client_send_msg()
TODO
int snap_new_id()
TODO
void snap_free_id( int id )
TODO
void map_unload_data( int index )