summaryrefslogtreecommitdiff
path: root/include/pipe.h
blob: 7f38fb81b2ae75e2a50908fcde3cbbf310437079 (plain)
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

#ifndef PIPE_H

#define PIPE_H

#include "main.h"
#include "interface.h"
#include "list.h"

typedef struct pipe_struct
{
	int x; // poloha steny	
	int y;

	int w; // rozmery steny
	int h;

	int id;
	int id_out;
	int position;

	int layer; // vrstva

#ifndef BUBLIC_SERVER	
	SDL_Surface *img; //obrazok
#endif
} pipe_t;

#ifndef BUBLIC_SERVER	
extern pipe_t* newPipe(int x, int y, int w, int h, int layer,
		int id, int id_out, int position, SDL_Surface *img);
#endif

#ifdef BUBLIC_SERVER	
extern pipe_t* newPipe(int x, int y, int w, int h, int layer,
		int id, int id_out, int position);
#endif

#ifndef BUBLIC_SERVER	
extern void drawPipe(pipe_t *p);
extern void drawListPipe(list_t *listPipe);
#endif
extern pipe_t* isConflictWithListPipe(list_t *listPipe, int x, int y, int w, int h);
extern void eventConflictShotWithPipe(list_t *listPipe, list_t *listShot);
extern void destroyPipe(pipe_t *p);

#endif