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
|
#ifndef SHOT_H
#define SHOT_H
#include "main.h"
#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
#include "list.h"
#include "tux.h"
typedef struct shot_struct
{
int id;
int x;
int y;
int w;
int h;
int px;
int py;
int position;
int gun;
tux_t *author;
bool_t isCanKillAuthor;
#ifndef PUBLIC_SERVER
SDL_Surface *img;
#endif
} shot_t;
extern bool_t isShotInicialized();
extern void initShot();
extern shot_t* newShot(int x,int y, int px, int py, int gun, tux_t *author);
#ifndef PUBLIC_SERVER
extern void drawShot(shot_t *p);
extern void drawListShot(list_t *listShot);
#endif
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);
extern void destroyShot(shot_t *p);
extern void quitShot();
#endif
|