summaryrefslogtreecommitdiff
path: root/src/wall.c
diff options
context:
space:
mode:
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;