Compares two network addresses.
int net_addr_comp( const NETADDR * a, const NETADDR * b )
Turns a network address into a representive string.
int net_addr_str( const NETADDR * addr, char * string, int max_length )
DOCTODO: serp
int net_errno()
Does a hostname lookup by name and fills out the passed NETADDR struct with the recieved details.
int net_host_lookup( const char * hostname, NETADDR * addr, int types )
Initiates network functionallity.
int net_init()
Polls a listning socket for a new connection.
int net_tcp_accept( NETSOCKET sock, NETSOCKET * new_sock, NETADDR * addr )
Closes a TCP socket.
int net_tcp_close( NETSOCKET sock )
Connects one socket to another.
int net_tcp_connect( NETSOCKET sock, const NETADDR * addr )
DOCTODO: serp
int net_tcp_connect_non_blocking( NETSOCKET sock, const NETADDR * a )
Creates a TCP socket.
NETSOCKET net_tcp_create( const NETADDR * a )
Makes the socket start listening for new connections.
int net_tcp_listen( NETSOCKET sock, int backlog )
Recvives data from a TCP stream.
int net_tcp_recv( NETSOCKET sock, void * data, int maxsize )
Sends data to a TCP stream.
int net_tcp_send( NETSOCKET sock, const void * data, int size )
DOCTODO: serp
int net_tcp_set_non_blocking( NETSOCKET sock )
Closes an UDP socket.
int net_udp_close( NETSOCKET sock )
Creates a UDP socket and binds it to a port.
NETSOCKET net_udp_create( NETADDR bindaddr )
Recives a packet over an UDP socket.
int net_udp_recv( NETSOCKET sock, NETADDR * addr, void * data, int maxsize )
Sends a packet over an UDP socket.
int net_udp_send( NETSOCKET sock, const NETADDR * addr, const void * data, int size )
DOCTODO: serp
int net_would_block()
Called when a character in the world dies.
virtual int on_character_death( class CHARACTER * victim, class PLAYER * killer, int weapon )
Called when a character spawns into the game world.
virtual void on_character_spawn( class CHARACTER * chr )
Called when the map is loaded to process an entity in the map.
virtual bool on_entity( int index, vec2 pos )
Removes an entity from the world.
void remove_entity( ENTITY * entity )
Called when the game resets the map.
virtual void reset()
TODO
const char *server_clientname( int client_id )
TODO
int server_getclientinfo( int client_id, CLIENT_INFO * info )
TODO
void server_kick( int client_id, const char * reason )
TODO
int *server_latestinput( int client_id, int * size )
TODO
int server_send_msg( int client_id )
TODO
void server_setbrowseinfo( int game_type, int progression )
TODO
void server_setclientname( int client_id, const char * name )
TODO
void server_setclientscore( int client_id, int score )
TODO
int server_tick()
TODO
int server_tickspeed()
Called when a new snapshot is being generated for a specific client.
virtual void snap( int snapping_client )
Calls snap on all the entities in the world to create the snapshot.
void snap( int snapping_client )
Searches a snapshot for an item.
void *snap_find_item( int snapid, int type, int id )
TODO
void snap_free_id( int id )
Gets an item from a snapshot.
void *snap_get_item( int snapid, int index, SNAP_ITEM * item )
Sets the input data to send to the server.
void snap_input( void * data, int size )
Marks an item as invalid byt setting type and id to 0xffffffff.
void snap_invalidate_item( int snapid, int index )
TODO
int snap_new_id()
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 )
Tells the engine how big a specific item always will be.
void snap_set_staticsize( int type, int size )
Loads a wavpack compressed sound.
int snd_load_wv( const char * filename )
Plays a sound.
int snd_play( int cid, int sid, int flags )
Plays a sound at a specified postition.
int snd_play_at( int cid, int sid, int flags, float x, float y )
Sets the parameters for a sound channel.
void snd_set_channel( int cid, float vol, float pan )
Sets the listener posititon.
void snd_set_listener_pos( float x, float y )
Stops a currenly playing sound.
void snd_stop( int id )
Appends a string to another.
void str_append( char * dst, const char * src, int dst_size )
Compares to strings case insensitive.
int str_comp_nocase( const char * a, const char * b )
Copies a string to another.
void str_copy( char * dst, const char * src, int dst_size )
Finds a string inside another string case insensitive.
const char *str_find_nocase( const char * haystack, const char * needle )
Performs printf formating into a buffer.
void str_format( char * buffer, int buffer_size, const char * format, ... )
Takes a datablock and generates a hexstring of it.
void str_hex( char * dst, int dst_size, const void * data, int data_size )
Replaces all characters below 32 and above 127 with whitespace with exception to \r, \n and \r.
void str_sanitize( char * str )
Replaces all characters below 32 and above 127 with whitespace.
void str_sanitize_strong( char * str )