diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-15 18:35:48 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-15 18:35:48 +0000 |
| commit | b84b59153c587248ca8a6a94a6d93977e851233f (patch) | |
| tree | e13b33f09ee6ac130bb6045626618b1c5fc4d787 /src/pipe.c | |
| parent | 6038f9434f1eb40caf7992ece9a3972e95a9fc11 (diff) | |
- moznost skompilovat public server bez GUI ( pomocou Makefile-publicServer )
port sa nastavuje ako ./publicserver --port <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
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; |