diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-05-12 20:39:34 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-05-12 20:39:34 +0000 |
| commit | 7055882c93022da3a6a1cf74cebf3d17c44ce6c4 (patch) | |
| tree | bacb905bbfb33a5ee5a203c4e327495fcbd85ef7 /include | |
| parent | 46958f55432bcbb6f4e90f4dd937d8de355e5785 (diff) | |
- podpora modulov
- hra sa musi kompilovat s GUI ako
v config.h _zakomenotvane_ #define PUBLIC_SERVER
make clean
make
make mod
su
make install
- hra sa musi ako server kompilovat
v config.h _odkomentovane__ #define PUBLIC_SERVER
make clean
make
make mod
- pozor, urcite tam je este vela bugov //je to nedoladene
zatial to ani nedavajte na server
git-svn-id: http://opensvn.csie.org/tuxanci_ng@52 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'include')
| -rw-r--r-- | include/main.h | 2 | ||||
| -rw-r--r-- | include/modules.h | 73 | ||||
| -rw-r--r-- | include/path.h | 1 | ||||
| -rw-r--r-- | include/shot.h | 4 |
4 files changed, 75 insertions, 5 deletions
diff --git a/include/main.h b/include/main.h index 3dd5fc1..09280d0 100644 --- a/include/main.h +++ b/include/main.h @@ -9,7 +9,7 @@ #undef DESTDIR #undef SUPPORT_NET_SDL_UDP -#undef SUPPORT_NET_UNIX_TCP +#define SUPPORT_NET_UNIX_UDP #endif diff --git a/include/modules.h b/include/modules.h new file mode 100644 index 0000000..872cab7 --- /dev/null +++ b/include/modules.h @@ -0,0 +1,73 @@ + +#ifndef MODULE_H + +#define MODULE_H + +#include "tux.h" +#include "shot.h" +#include "arena.h" +#include "proto.h" + +#ifndef PUBLIC_SERVER +#include "image.h" +#endif + +typedef struct export_fce_s +{ + int (*fce_getValue)(char *line, char *env, char *val, int len); + +#ifndef PUBLIC_SERVER + SDL_Surface* (*fce_getImage)(char *group, char *name); + + void (*fce_addLayer)(SDL_Surface *img, + int x,int y, int px,int py, + int w,int h, int player); +#endif + + int (*fce_getNetTypeGame)(); + + void (*fce_getTuxProportion)(tux_t *tux, int *x,int *y, int *w, int *h); + void (*fce_setTuxProportion)(tux_t *tux, int x, int y); + tux_t* (*fce_getTuxID)(list_t *listTux, int id); + + arena_t* (*fce_getCurrentArena)(); + int (*fce_conflictSpace)(int x1,int y1,int w1,int h1,int x2,int y2,int w2,int h2); + int (*fce_isFreeSpace)(arena_t *arena, int x, int y, int w, int h); + void (*fce_findFreeSpace)(arena_t *arena, int *x, int *y, int w, int h); + void (*fce_proto_send_newtux_server)(int type, client_t *client, tux_t *tux); + void (*fce_proto_send_shot_server)(int type, client_t *client, shot_t *p); + + void (*fce_destroyShot)(shot_t *p); + void (*fce_boundBombBall)(shot_t *shot); + + int (*fce_pokus)(char *s); + +} export_fce_t; + +typedef struct module_s +{ + char *file; + void *image; + + int (*fce_init)(export_fce_t *p); +#ifndef PUBLIC_SERVER + int (*fce_draw)(); +#endif + int (*fce_event)(); + int (*fce_isConflict)(int x, int y, int w, int h); + void (*fce_cmd)(char *line); + int (*fce_destroy)(); + +} module_t; + +extern void initModule(); +extern int loadModule(char *name); +#ifndef PUBLIC_SERVER +extern void drawModule(); +#endif +extern void eventModule(); +extern void cmdModule(char *s); +extern int isConflictModule(int x, int y, int w, int h); +extern void quitModule(); + +#endif diff --git a/include/path.h b/include/path.h index 884e13e..d253fe1 100644 --- a/include/path.h +++ b/include/path.h @@ -28,5 +28,6 @@ #define PATH_CONFIG DESTDIR PATH_DIR "conf/" #define PATH_LANG DESTDIR PATH_DIR "lang/" #define PATH_DATA DESTDIR PATH_DIR "data/" +#define PATH_MODULES DESTDIR PATH_DIR "modules/" #endif diff --git a/include/shot.h b/include/shot.h index cc10c9a..156a736 100644 --- a/include/shot.h +++ b/include/shot.h @@ -45,12 +45,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 boundBombBall(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); - extern void destroyShot(shot_t *p); extern void quitShot(); |