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
74
75
76
77
78
79
80
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "main.h"
#include "modules.h"
#include "tux.h"
#include "shot.h"
#include "list.h"
#include "gun.h"
#include "space.h"
#ifndef PUBLIC_SERVER
# include "interface.h"
# include "image.h"
#endif
#ifdef PUBLIC_SERVER
# include "publicServer.h"
#endif
static export_fce_t *export_fce;
int init(export_fce_t * p)
{
export_fce = p;
printf("Initializing Basic module.\n");
return 0;
}
#ifndef PUBLIC_SERVER
int draw(int x, int y, int w, int h)
{
UNUSET(x);
UNUSET(y);
UNUSET(w);
UNUSET(h);
printf("Drawing Basic module.\n");
return 0;
}
#endif
int event()
{
printf("Basic module catch event.\n");
return 0;
}
int isConflict(int x, int y, int w, int h)
{
printf("isConflict(%d, %d, %d, %d) in Basic module.\n", x, y, w, h);
return 0;
}
static void cmd_basic(char *line)
{
printf("cmd_basic(%s) in Basic module.\n", line);
}
void cmdArena(char *line)
{
if (strncmp(line, "basic", 5) == 0)
cmd_basic(line);
}
void recvMsg(char *msg)
{
printf("recvMsg(%s) in Basic module.\n", msg);
}
int destroy()
{
printf("Destroying Basic module.\n");
return 0;
}
|