From 617ba439aab5f1798eb02618dfcfbed80a5baf28 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 30 Mar 2008 16:51:15 +0000 Subject: - polozky casovaca sa nachadzaju v zozname list_t , ktory he sucastou arena_t - pri bonuse neviditelnost sa neda podvadzat modifikovanim clienta - o vystreli sa stara server, ich suradnicu a dalsie info posiela server clientom - parametre sa pisu vo forme --env=val git-svn-id: http://opensvn.csie.org/tuxanci_ng@38 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- include/arena.h | 1 + include/main.h | 4 +++- include/myTimer.h | 11 +++++------ include/server.h | 2 +- include/udp.h | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/arena.h b/include/arena.h index 551c2c2..f133c14 100644 --- a/include/arena.h +++ b/include/arena.h @@ -17,6 +17,7 @@ typedef struct arena_struct SDL_Surface *background; #endif + list_t *listTimer; list_t *listTux; list_t *listShot; list_t *listWall; diff --git a/include/main.h b/include/main.h index f0b15c1..0b96144 100644 --- a/include/main.h +++ b/include/main.h @@ -5,9 +5,11 @@ #include "../config.h" -#if defined SUPPORT_NET_UNIX_UDP && defined SUPPORT_NET_SDL_UDP +#if defined PUBLIC_SERVER +#undef DESTDIR #undef SUPPORT_NET_SDL_UDP +#undef SUPPORT_NET_UNIX_TCP #endif diff --git a/include/myTimer.h b/include/myTimer.h index fbb83a8..21738bb 100644 --- a/include/myTimer.h +++ b/include/myTimer.h @@ -15,12 +15,11 @@ typedef struct my_timer_struct my_time_t time; } my_timer_t; -extern bool_t isMyTimerInit(); -extern void initTimer(); +extern list_t* newTimer(); extern my_time_t getMyTime(); -extern int addTimer(void (*fce)(void *p), void *arg, my_time_t my_time); -extern void eventTimer(); -extern void delTimer(int id); -extern void quitTimer(); +extern int addTimer(list_t *listTimer, void (*fce)(void *p), void *arg, my_time_t my_time); +extern void eventTimer(list_t *listTimer); +extern void delTimer(list_t *listTimer, int id); +extern void destroyTimer(list_t *listTimer); #endif diff --git a/include/server.h b/include/server.h index 397eb41..066c170 100644 --- a/include/server.h +++ b/include/server.h @@ -67,7 +67,7 @@ extern void quitTcpServer(); #endif #ifdef SUPPORT_NET_UNIX_UDP -extern int initUdpServer(int port); +extern int initUdpServer(char *ip, int port); extern client_t* newUdpClient(sock_udp_t *sock_udp); extern void selectServerUdpSocket(); extern void quitUdpServer(); diff --git a/include/udp.h b/include/udp.h index 9d7be85..ce89c53 100644 --- a/include/udp.h +++ b/include/udp.h @@ -15,7 +15,7 @@ typedef struct struct_sock_udp_t extern sock_udp_t* newSockUdp(); extern void destroySockUdp(sock_udp_t *p); -extern sock_udp_t* bindUdpSocket(int port); +extern sock_udp_t* bindUdpSocket(char *address, int port); extern sock_udp_t* connectUdpSocket(char *address, int port); extern int readUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); extern int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); -- cgit v1.2.3