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/wall.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/wall.c') diff --git a/src/wall.c b/src/wall.c index cc2efe4..9f7b183 100644 --- a/src/wall.c +++ b/src/wall.c @@ -2,18 +2,34 @@ #include #include +#include "main.h" #include "wall.h" +#include "shot.h" + +#ifndef BUBLIC_SERVER #include "layer.h" #include "screen_world.h" -#include "shot.h" +#endif +#ifdef BUBLIC_SERVER +#include "publicServer.h" +#endif + +#ifndef BUBLIC_SERVER wall_t* newWall(int x, int y, int w, int h, int img_x, int img_y, int layer, SDL_Surface *img) +#endif + +#ifdef BUBLIC_SERVER +wall_t* newWall(int x, int y, int w, int h, + int img_x, int img_y, int layer) +#endif { wall_t *new; +#ifndef BUBLIC_SERVER assert( img != NULL ); - +#endif new = malloc( sizeof(wall_t) ); assert( new != NULL ); @@ -24,11 +40,15 @@ wall_t* newWall(int x, int y, int w, int h, new->img_x = img_x; new->img_y = img_y; new->layer = layer; +#ifndef BUBLIC_SERVER new->img = img; +#endif return new; } +#ifndef BUBLIC_SERVER + void drawWall(wall_t *p) { assert( p != NULL ); @@ -51,6 +71,8 @@ void drawListWall(list_t *listWall) } } +#endif + int isConflictWithListWall(list_t *listWall, int x, int y, int w, int h) { wall_t *thisWall; -- cgit v1.2.3