1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
|