Set the active blending mode to additive (src, one).
void gfx_blend_additive()
Disables blending
void gfx_blend_none()
Set the active blending mode to normal (src, 1-src).
void gfx_blend_normal()
Clears the screen with the specified color.
void gfx_clear( float r, float g, float b )
TODO
void gfx_clip_disable()
TODO
void gfx_clip_enable( int x, int y, int w, int h )
Fetches a list of all the available video modes.
int gfx_get_video_modes( VIDEO_MODE * list, int maxcount )
TODO
void gfx_getscreen( float * tl_x, float * tl_y, float * br_x, float * br_y )
TODO
void gfx_lines_begin()
TODO
void gfx_lines_draw( float x0, float y0, float x1, float y1 )
TODO
void gfx_lines_end()
Loads a PNG image from disk.
int gfx_load_png( IMAGE_INFO * img, const char * filename )
Loads a texture from a file.
int gfx_load_texture( const char * filename, int store_format, int flags )
Loads a texture from memory.
int gfx_load_texture_raw( int w, int h, int format, const void * data, int store_format, int flags )
Specifies the coordinate system for the screen.
void gfx_mapscreen( float tl_x, float tl_y, float br_x, float br_y )
TODO
int gfx_memory_usage()
Minimizes the window.
void gfx_minimize()
Begins a quad drawing session.
void gfx_quads_begin()
Draws a quad by specifying the center point.
void gfx_quads_draw( float x, float y, float w, float h )
Draws a quad by specifying the corner points.
void gfx_quads_draw_freeform( float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3 )
Draws a quad by specifying the top-left point.
void gfx_quads_drawTL( float x, float y, float width, float height )
Ends a quad session.
void gfx_quads_end()
Sets the rotation to use when drawing a quad.
void gfx_quads_setrotation( float angle )
Sets the uv coordinates to use.
void gfx_quads_setsubset( float tl_u, float tl_v, float br_u, float br_v )
TODO
void gfx_quads_setsubset_free( float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3 )
TODO
void gfx_quads_text( float x, float y, float size, const char * text )
Returns the aspect ratio between width and height.
float gfx_screenaspect()
Returns the screen height.
int gfx_screenheight()
TODO
void gfx_screenshot()
TODO
void gfx_screenshot_direct( const char * filename )
Returns the screen width.
int gfx_screenwidth()
Sets the color of all the vertices.
void gfx_setcolor( float r, float g, float b, float a )
Sets the color of a vertex.
void gfx_setcolorvertex( int i, float r, float g, float b, float a )
TODO
void gfx_text( void * font, float x, float y, float size, const char * text, int max_width )
TODO
void gfx_text_color( float r, float g, float b, float a )
TODO
void gfx_text_set_default_font( void * font )
TODO
float gfx_text_width( void * font, float size, const char * text, int length )
Sets the active texture.
void gfx_texture_set( int id )
Unloads a texture.
int gfx_unload_texture( int id )
Compresses a buffer and outputs a compressed buffer.
int huffman_compress( HUFFMAN_STATE * huff, const void * input, int input_size, void * output, int output_size )
Decompresses a buffer
int huffman_decompress( HUFFMAN_STATE * huff, const void * input, int input_size, void * output, int output_size )
Inits the compressor/decompressor.
void huffman_init( HUFFMAN_STATE * huff, const unsigned * frequencies )
TODO
void inp_clear_events()
TODO
void inp_clear_key_states()
TODO
INPUT_EVENT inp_get_event( int index )
TODO
int inp_key_code( const char * key_name )
TODO
int inp_key_down( int key )
TODO
const char *inp_key_name( int k )
Checks if a key is pressed.
int inp_key_pressed( int key )
TODO
int inp_key_presses( int key )
TODO
int inp_key_releases( int key )
TODO
int inp_key_state( int key )
TODO
int inp_key_was_pressed( int key )
TODO
int inp_mouse_doubleclick()
Fetches the mouse movements.
void inp_mouse_relative( int * x, int * y )
TODO
int inp_mouse_scroll()
TODO
int inp_num_events()
Adds an entity to the world.
void insert_entity( ENTITY * entity )
Searches the map for an item.
void *map_find_item( int type, int id )
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 )
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 )
Checks if a map is loaded.
int map_is_loaded()
Checks the number of items in the loaded map.
int map_num_items()
TODO
void map_unload_data( int index )
TODO
void modc_connected()
TODO
void modc_console_init()
Called when the client has successfully connect to a server and loaded a map.
void modc_entergame()
Called when the client starts.
void modc_init()
TODO
void modc_message( int msg )
TODO
const char *modc_net_version()
Called when the client progressed to a new snapshot.
void modc_newsnapshot()
TODO
void modc_predict()
TODO
void modc_rcon_line( const char * line )
Called every frame to let the game render it self.
void modc_render()
TODO
void modc_save_config()
Called when the client closes down.
void modc_shutdown()
TODO
int modc_snap_input( int * data )
Called every time client changes state.
void modc_statechange( int new_state, int old_state )
Called when the server recives new input from a client.
void mods_client_direct_input( int cid, void * input )
Called when a client drops from the server.
void mods_client_drop( int cid )
Called when a client has joined the game.
void mods_client_enter( int cid )
Called when the server applys the predicted input on the client.
void mods_client_predicted_input( int cid, void * input )
TODO
void mods_connected( int client_id )
TODO
void mods_console_init()
Called when the server is started.
void mods_init()
TODO
void mods_message( int msg, int client_id )
TODO
const char *mods_net_version()
Called after the server is done sending the snapshots.
void mods_postsnap()
Called before the server starts to construct snapshots for the clients.
void mods_presnap()
Called when the server quits.
void mods_shutdown()
Called to create the snapshot for a client.
void mods_snap( int cid )
Called with a regular interval to progress the gameplay.
void mods_tick()
TODO
const char *mods_version()
TODO
void msg_pack_end()
TODO
void msg_pack_int( int i )
TODO
void msg_pack_raw( const void * data, int size )
TODO
void msg_pack_start( int msg, int flags )
TODO
void msg_pack_string( const char * p, int limit )
TODO
int msg_unpack_error()
TODO
int msg_unpack_int()
TODO
const unsigned char *msg_unpack_raw( int size )
TODO
const char *msg_unpack_string()