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