diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-17 20:29:34 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-17 20:29:34 +0000 |
| commit | 437da38a26548714e6e1640722148f0f9f601ccb (patch) | |
| tree | 3bc6a5a0903211e2d1ffa4fd9b3e6e467d413ecf /include | |
| parent | 51aae47ae08ad61507f219c24ed6d9321c866f45 (diff) | |
<Oroborus> - opravena chyba, clent nacital iba _jeden_ sietovy packet za 50 ms ( ano aj ked ich prislo viacej)
<Oroborus> - server pinguje clientov a na zaklade toho client vie, ci server nespadol
<Oroborus> - publicserver sa da korektne vypnut signalom SIGQUIT
<Oroborus> - publicserver bol pretiahnuty cez valgrind, teraz za pocet volani funkcie malloc rovna poctu volani
funkcie free
<Oroborus> - v sietovom multiplayeri sa da chodit cez teleporty a strielat do teleportov
<Oroborus> - do rur sa da siez strielat
git-svn-id: http://opensvn.csie.org/tuxanci_ng@24 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'include')
| -rw-r--r-- | include/client.h | 6 | ||||
| -rwxr-xr-x | include/interface.h | 2 | ||||
| -rw-r--r-- | include/proto.h | 5 | ||||
| -rw-r--r-- | include/publicServer.h | 3 | ||||
| -rw-r--r-- | include/server.h | 4 | ||||
| -rw-r--r-- | include/shot.h | 4 |
6 files changed, 19 insertions, 5 deletions
diff --git a/include/client.h b/include/client.h index 6aa4d58..6c827f7 100644 --- a/include/client.h +++ b/include/client.h @@ -5,7 +5,8 @@ #if defined SUPPORT_NET_UNIX_UDP || defined SUPPORT_NET_SDL_UDP -#define CLIENT_TIMEOUT 2500 +#define CLIENT_TIMEOUT 2500 +#define SERVER_TIMEOUT_ALIVE 5000 #endif @@ -19,6 +20,7 @@ extern void quitTcpClient(); extern int initUdpClient(char *ip, int port); extern void eventPingServer(); extern void selectClientUdpSocket(); +extern void refreshPingServerAlive(); extern void quitUdpClient(); #endif @@ -26,6 +28,8 @@ extern void quitUdpClient(); extern int initSdlUdpClient(char *ip, int port); extern void eventPingServer(); extern void selectClientSdlUdpSocket(); +extern void refreshPingServerAlive(); +extern bool_t isServerAlive(); extern void quitSdlUdpClient(); #endif diff --git a/include/interface.h b/include/interface.h index 720676e..a65ffa4 100755 --- a/include/interface.h +++ b/include/interface.h @@ -19,7 +19,7 @@ #define SDL_SUBSYSTEMS SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_DOUBLEBUF //napis na okne -#define WINDOW_TITLE "Tuxanci next generation SVN revision 13" +#define WINDOW_TITLE "Tuxanci next generation SVN revision 23" #define WIN_BPP 0 #define USR_EVT_TIMER 0 diff --git a/include/proto.h b/include/proto.h index cc17f79..5e50965 100644 --- a/include/proto.h +++ b/include/proto.h @@ -6,6 +6,7 @@ #include "tux.h" #include "server.h" #include "item.h" +#include "shot.h" extern void proto_send_hello_client(); extern void proto_recv_hello_server(client_t *client, char *msg); @@ -25,10 +26,14 @@ extern void proto_send_deltux_server(client_t *client); extern void proto_recv_deltux_client(char *msg); extern void proto_send_additem_server(item_t *p); extern void proto_recv_additem_client(char *msg); +extern void proto_send_shot_server(shot_t *p); +extern void proto_recv_shot_client(char *msg); extern void proto_send_context_client(tux_t *tux); extern void proto_recv_context_server(client_t *client, char *msg); extern void proto_send_ping_client(); extern void proto_recv_ping_server(client_t *client, char *msg); +extern void proto_send_ping_server(); +extern void proto_recv_ping_client(char *msg); extern void proto_send_end_client(); extern void proto_recv_end_server(client_t *client, char *msg); extern void proto_send_end_server(); diff --git a/include/publicServer.h b/include/publicServer.h index 9c3a367..9b453d7 100644 --- a/include/publicServer.h +++ b/include/publicServer.h @@ -7,12 +7,13 @@ extern arena_t* getWorldArena(); extern void countRoundInc(); -extern void initPublicServer(); +extern int initPublicServer(); extern int getChoiceArenaId(); extern int conflictSpace(int x1,int y1,int w1,int h1,int x2,int y2,int w2,int h2); extern int isFreeSpace(int x, int y, int w, int h); extern void findFreeSpace(int *x, int *y, int w, int h); extern void eventPublicServer(); +extern void my_handler_quit(int n); extern void quitPublicServer(); #endif diff --git a/include/server.h b/include/server.h index f35f155..623a12e 100644 --- a/include/server.h +++ b/include/server.h @@ -21,7 +21,7 @@ #include "udp.h" #define SERVER_TIMEOUT 5000 -#define SERVER_TIME_SYNC 5000 +#define SERVER_TIME_SYNC 1000 #endif @@ -30,7 +30,7 @@ #include "sdl_udp.h" #define SERVER_TIMEOUT 5000 -#define SERVER_TIME_SYNC 5000 +#define SERVER_TIME_SYNC 1000 #endif diff --git a/include/shot.h b/include/shot.h index 22fb2f5..d0460e2 100644 --- a/include/shot.h +++ b/include/shot.h @@ -1,6 +1,8 @@ #ifndef SHOT_H +#define SHOT_H + #include "main.h" #ifndef BUBLIC_SERVER #include "interface.h" @@ -42,6 +44,8 @@ extern void drawListShot(list_t *listShot); extern int isConflictWithListShot(list_t *listShot, int x, int y, int w, int h); extern void eventMoveListShot(list_t *listShot); +extern void transformOnlyLasser(shot_t *shot); + extern void moveShot(shot_t *shot, int position, int src_x, int src_y, int dist_x, int dist_y, int dist_w, int dist_h); |