summaryrefslogtreecommitdiff
path: root/src/wall.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-15 18:35:48 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-15 18:35:48 +0000
commitb84b59153c587248ca8a6a94a6d93977e851233f (patch)
treee13b33f09ee6ac130bb6045626618b1c5fc4d787 /src/wall.c
parent6038f9434f1eb40caf7992ece9a3972e95a9fc11 (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/wall.c')
-rw-r--r--src/wall.c26
1 files changed, 24 insertions, 2 deletions
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 <stdlib.h>
#include <assert.h>
+#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;