diff options
Diffstat (limited to 'src/pipe.c')
| -rw-r--r-- | src/pipe.c | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -2,16 +2,33 @@ #include <stdlib.h> #include <assert.h> +#include "main.h" #include "pipe.h" #include "layer.h" -#include "screen_world.h" #include "shot.h" +#ifndef BUBLIC_SERVER +#include "screen_world.h" +#endif + +#ifdef BUBLIC_SERVER +#include "publicServer.h" +#endif + +#ifndef BUBLIC_SERVER 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 +pipe_t* newPipe(int x, int y, int w, int h, int layer, int id, int id_out, int position) +#endif + { pipe_t *new; +#ifndef BUBLIC_SERVER assert( img != NULL ); +#endif new = malloc( sizeof(pipe_t) ); assert( new != NULL ); @@ -24,11 +41,14 @@ pipe_t* newPipe(int x, int y, int w, int h, int layer, int id, int id_out, int p new->id = id; new->id_out = id_out; new->position = position; +#ifndef BUBLIC_SERVER new->img = img; - +#endif return new; } +#ifndef BUBLIC_SERVER + void drawPipe(pipe_t *p) { assert( p != NULL ); @@ -51,6 +71,8 @@ void drawListPipe(list_t *listPipe) } } +#endif + pipe_t* isConflictWithListPipe(list_t *listPipe, int x, int y, int w, int h) { pipe_t *thisPipe; |