Nilorea Library
C utilities for networking, threading, graphics
|
#include "nilorea/n_common.h"
#include "nilorea/n_str.h"
#include "nilorea/n_list.h"
#include "nilorea/n_hash.h"
#include "nilorea/n_network.h"
#include "nilorea/n_network_msg.h"
#include "nilorea/n_allegro5.h"
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) } |
struct PEER_OBJECT |
a simple structure to hold objects positions / timeouts
Definition at line 22 of file ex_gui_netclient.c.
#define HAVE_ALLEGRO 1 |
Definition at line 10 of file ex_gui_netclient.c.
#define HEIGHT 480 |
Definition at line 8 of file ex_gui_netclient.c.
#define WIDTH 640 |
Definition at line 7 of file ex_gui_netclient.c.
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.
int draw_peers | ( | HASH_TABLE * | peer_table, |
ALLEGRO_FONT * | font, | ||
ALLEGRO_COLOR | color | ||
) |
Definition at line 81 of file ex_gui_netclient.c.
References _nstr, free_nstr, hash_val, ht_foreach, and nstrprintf.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Network for managing conenctions
Definition at line 235 of file ex_gui_netclient.c.
References _str, char_to_nstr(), display, DONE, draw_peers(), fps_timer, free_nstr, get_keyboard(), getoptret, HEIGHT, ip_version, key, KEY_CTRL, KEY_DOWN, KEY_ESC, KEY_LEFT, KEY_RIGHT, KEY_SPACE, KEY_UP, LOG_ERR, LOG_INFO, log_level, LOG_NOTICE, logic_timer, manage_peers(), n_abort(), n_log, NETMSG_BOX, NETMSG_GET_BOX, NETMSG_IDENT_REPLY_NOK, NETMSG_IDENT_REPLY_OK, NETMSG_IDENT_REQUEST, netmsg_make_string_msg(), NETMSG_PING_REPLY, NETMSG_PING_REQUEST, NETMSG_POSITION, NETMSG_QUIT, NETMSG_STRING, netw, netw_add_msg(), netw_connect(), netw_get_ident(), netw_get_msg(), netw_get_position(), netw_get_string(), netw_msg_get_type(), netw_send_ident(), netw_send_position(), netw_send_quit(), netw_start_thr_engine(), netw_thr, netw_wait_close(), NETWORK_IPALL, new_generic_list(), new_ht(), new_nstr(), process_args(), scr_buf, server, set_log_level(), update_peer(), and WIDTH.
int manage_peers | ( | HASH_TABLE * | peer_table, |
int | delta_t | ||
) |
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().
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().
int update_peer | ( | HASH_TABLE * | peer_table, |
int | id, | ||
double | position[3] | ||
) |
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().
void usage | ( | void | ) |
Definition at line 97 of file ex_gui_netclient.c.
int key[7] = { (1==0) , (1==0) , (1==0) , (1==0) , (1==0) , (1==0) , (1==0) } |
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().