Nilorea Library
C utilities for networking, threading, graphics
Loading...
Searching...
No Matches
ex_gui_netclient.c File Reference
+ Include dependency graph for ex_gui_netclient.c:

Go to the source code of this file.

Data Structures

struct  PEER_OBJECT
 a simple structure to hold objects positions / timeouts More...
 

Macros

#define HAVE_ALLEGRO   1
 
#define HEIGHT   480
 
#define WIDTH   640
 

Enumerations

enum  APP_KEYS {
  KEY_UP , KEY_DOWN , KEY_LEFT , KEY_RIGHT ,
  KEY_ESC , KEY_SPACE , KEY_CTRL
}
 

Functions

int draw_peers (HASH_TABLE *peer_table, ALLEGRO_FONT *font, ALLEGRO_COLOR color)
 
int main (int argc, char *argv[])
 
int manage_peers (HASH_TABLE *peer_table, int delta_t)
 
void process_args (int argc, char **argv, char **server, char **port, int *ip_version)
 
int update_peer (HASH_TABLE *peer_table, int id, double position[3])
 
void usage (void)
 

Variables

int key [7] = { (1==0) , (1==0) , (1==0) , (1==0) , (1==0) , (1==0) , (1==0) }
 

Data Structure Documentation

◆ PEER_OBJECT

struct PEER_OBJECT

a simple structure to hold objects positions / timeouts

Examples
ex_gui_netclient.c.

Definition at line 22 of file ex_gui_netclient.c.

+ Collaboration diagram for PEER_OBJECT:
Data Fields
int id remote object id
long int life_time current life time, updated when receiving a position from a peer.

Object is removed if it reach 0

double position[3] last received object position

Macro Definition Documentation

◆ HAVE_ALLEGRO

#define HAVE_ALLEGRO   1

Definition at line 10 of file ex_gui_netclient.c.

◆ HEIGHT

#define HEIGHT   480

Definition at line 8 of file ex_gui_netclient.c.

◆ WIDTH

#define WIDTH   640

Definition at line 7 of file ex_gui_netclient.c.

Enumeration Type Documentation

◆ APP_KEYS

enum APP_KEYS
Enumerator
KEY_UP 
KEY_DOWN 
KEY_LEFT 
KEY_RIGHT 
KEY_ESC 
KEY_SPACE 
KEY_CTRL 

Definition at line 227 of file ex_gui_netclient.c.

Function Documentation

◆ draw_peers()

int draw_peers ( HASH_TABLE peer_table,
ALLEGRO_FONT *  font,
ALLEGRO_COLOR  color 
)
Examples
ex_gui_netclient.c.

Definition at line 81 of file ex_gui_netclient.c.

References _nstr, free_nstr, hash_val, ht_foreach, and nstrprintf.

Referenced by main().

+ Here is the caller graph for this function:

◆ main()

◆ manage_peers()

int manage_peers ( HASH_TABLE peer_table,
int  delta_t 
)
Examples
ex_gui_netclient.c.

Definition at line 60 of file ex_gui_netclient.c.

References hash_val, ht_foreach, ht_remove_ex(), list_foreach, list_push(), and new_generic_list().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ process_args()

void process_args ( int  argc,
char **  argv,
char **  server,
char **  port,
int *  ip_version 
)

Definition at line 108 of file ex_gui_netclient.c.

References getoptret, LOG_DEBUG, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, LOG_NULL, n_log, NETWORK_IPV4, NETWORK_IPV6, set_log_level(), and usage().

+ Here is the call graph for this function:

◆ update_peer()

int update_peer ( HASH_TABLE peer_table,
int  id,
double  position[3] 
)
Examples
ex_gui_netclient.c.

Definition at line 34 of file ex_gui_netclient.c.

References __n_assert, ht_get_ptr_ex(), ht_put_ptr_ex(), and Malloc.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ usage()

void usage ( void  )

Definition at line 97 of file ex_gui_netclient.c.

Variable Documentation

◆ key

int key[7] = { (1==0) , (1==0) , (1==0) , (1==0) , (1==0) , (1==0) , (1==0) }
Examples
ex_configfile.c, ex_crypto.c, ex_gui_dictionary.c, ex_gui_netclient.c, ex_gui_netserver.c, ex_gui_particles.c, and ex_hash.c.

Definition at line 231 of file ex_gui_netclient.c.

Referenced by _ht_check_trie_divergence(), _ht_depth_first_search(), _ht_find_longest_prefix_trie(), _ht_get_double(), _ht_get_double_trie(), _ht_get_int(), _ht_get_int_trie(), _ht_get_node(), _ht_get_node_trie(), _ht_get_ptr(), _ht_get_ptr_trie(), _ht_get_string(), _ht_get_string_trie(), _ht_is_leaf_node_trie(), _ht_new_double_node(), _ht_new_int_node(), _ht_new_node(), _ht_new_node_trie(), _ht_new_ptr_node(), _ht_new_string_node(), _ht_new_string_ptr_node(), _ht_node_destroy(), _ht_print(), _ht_print_trie_helper(), _ht_put_double(), _ht_put_double_trie(), _ht_put_int(), _ht_put_int_trie(), _ht_put_ptr(), _ht_put_ptr_trie(), _ht_put_string(), _ht_put_string_ptr(), _ht_put_string_ptr_trie(), _ht_put_string_trie(), _ht_remove(), _ht_remove_trie(), _ht_search(), _ht_search_trie_helper(), _n_nodup_log(), _n_nodup_log_indexed(), check_n_log_dup(), check_n_log_dup_indexed(), ht_get_completion_list(), ht_get_double(), ht_get_int(), ht_get_node(), ht_get_ptr(), ht_get_string(), ht_put_double(), ht_put_int(), ht_put_ptr(), ht_put_ptr_ex(), ht_put_string(), ht_put_string_ptr(), ht_remove(), main(), MurmurHash3_x64_128(), MurmurHash3_x86_128(), MurmurHash3_x86_32(), n_vigenere_cypher(), n_vigenere_cypher_thread(), n_vigenere_decode(), n_vigenere_decode_file(), n_vigenere_decode_in_place(), n_vigenere_encode(), n_vigenere_encode_file(), n_vigenere_encode_in_place(), and write_config_file().