From b84b59153c587248ca8a6a94a6d93977e851233f Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 15 Mar 2008 18:35:48 +0000 Subject: - moznost skompilovat public server bez GUI ( pomocou Makefile-publicServer ) port sa nastavuje ako ./publicserver --port - jeto iba prvotna verzia treba to este odladit a zostabilnit git-svn-id: http://opensvn.csie.org/tuxanci_ng@18 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/pipe.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/pipe.c') diff --git a/src/pipe.c b/src/pipe.c index c82cb65..3b41fd0 100644 --- a/src/pipe.c +++ b/src/pipe.c @@ -2,16 +2,33 @@ #include #include +#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; -- cgit v1.2.3