summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-05-26 12:45:53 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-05-26 12:45:53 +0000
commitc94fd664bba352732bf0e5c9a77e709b49f1aa4f (patch)
tree70936acfc33b46792ce1e3170de6a82f86edfe68 /src
parenta1e9bc7430ca827808a502f455b20a23ba15e31a (diff)
- mensie upravy v kode
- navod na zostavovanie projektu - da sa to skompilovat :D - PS: este to nie je odladene, a musim sa ucit na prijmacky na FEI git-svn-id: http://opensvn.csie.org/tuxanci_ng@54 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src')
-rwxr-xr-xsrc/Makefile6
-rwxr-xr-xsrc/Makefile-publicServer13
-rw-r--r--src/arena.c3
-rw-r--r--src/arenaFile.c3
-rw-r--r--src/dynamicInt.c13
-rw-r--r--src/gun.c1
-rwxr-xr-xsrc/interface.c9
-rw-r--r--src/item.c2
-rw-r--r--src/pipe.c223
-rw-r--r--src/proto.c13
-rw-r--r--src/publicServer.c10
-rw-r--r--src/screen.c1
-rw-r--r--src/screen_world.c4
-rw-r--r--src/shot.c2
-rw-r--r--src/teleport.c242
-rw-r--r--src/tux.c4
-rw-r--r--src/wall.c142
17 files changed, 32 insertions, 659 deletions
diff --git a/src/Makefile b/src/Makefile
index 25db7f8..cfc9478 100755
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,7 +9,7 @@ CFLAGS = -g -O0 -std=c99 -I../include -Wall `sdl-config --cflags`
BUILD_DIR = .
LIBS = `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer -lSDL_net
-FILES = interface.o idManager.o checkFront.o font.o list.o modules.o image.o layer.o director.o\
+FILES = interface.o idManager.o font.o list.o modules.o image.o layer.o director.o\
configFile.o tux.o main.o \
screen.o screen_world.o shot.o myTimer.o panel.o net_multiplayer.o \
buffer.o arena.o arenaFile.o textFile.o audio.o sound.o music.o gun.o \
@@ -33,8 +33,8 @@ modules.o: modules.c ../include/modules.h
idManager.o: idManager.c ../include/idManager.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/idManager.o -c idManager.c
-checkFront.o: checkFront.c ../include/checkFront.h
- $(CC) $(CFLAGS) -o $(BUILD_DIR)/checkFront.o -c checkFront.c
+#checkFront.o: checkFront.c ../include/checkFront.h
+# $(CC) $(CFLAGS) -o $(BUILD_DIR)/checkFront.o -c checkFront.c
font.o: font.c ../include/font.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/font.o -c font.c
diff --git a/src/Makefile-publicServer b/src/Makefile-publicServer
index d6956bf..69edffd 100755
--- a/src/Makefile-publicServer
+++ b/src/Makefile-publicServer
@@ -10,8 +10,8 @@ CFLAGS = -g -O0 -I../include -Wall
BUILD_DIR = ../build-server
LIBS = -ldl
-FILES = list.o modules.o director.o configFile.o tux.o wall.o shot.o myTimer.o \
- buffer.o dynamicInt.o arena.o arenaFile.o textFile.o gun.o item.o\
+FILES = list.o modules.o director.o configFile.o tux.o shot.o myTimer.o \
+ buffer.o arena.o arenaFile.o textFile.o gun.o item.o idManager.o\
udp.o proto.o server.o publicServer.o net_multiplayer.o serverConfigFile.o main.o
$(BUILD_DIR)/publicserver: mkdir_build $(FILES)
@@ -23,6 +23,9 @@ mkdir_build:
main.o: main.c
$(CC) $(CFLAGS) -o $(BUILD_DIR)/main.o -c main.c
+idManager.o: idManager.c ../include/idManager.h
+ $(CC) $(CFLAGS) -o $(BUILD_DIR)/idManager.o -c idManager.c
+
modules.o: modules.c
$(CC) $(CFLAGS) -o $(BUILD_DIR)/modules.o -c modules.c
@@ -41,9 +44,6 @@ configFile.o: configFile.c ../include/configFile.h
tux.o: tux.c ../include/tux.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/tux.o -c tux.c
-wall.o: wall.c ../include/wall.h
- $(CC) $(CFLAGS) -o $(BUILD_DIR)/wall.o -c wall.c
-
shot.o: shot.c ../include/shot.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/shot.o -c shot.c
@@ -68,9 +68,6 @@ server.o: server.c ../include/server.h
net_multiplayer.o: net_multiplayer.c ../include/net_multiplayer.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/net_multiplayer.o -c net_multiplayer.c
-dynamicInt.o: dynamicInt.c ../include/dynamicInt.h
- $(CC) $(CFLAGS) -o $(BUILD_DIR)/dynamicInt.o -c dynamicInt.c
-
arena.o: arena.c ../include/arena.h
$(CC) $(CFLAGS) -o $(BUILD_DIR)/arena.o -c arena.c
diff --git a/src/arena.c b/src/arena.c
index 3e14066..1980a95 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -8,10 +8,7 @@
#include "list.h"
#include "tux.h"
#include "shot.h"
-#include "wall.h"
#include "item.h"
-#include "teleport.h"
-#include "pipe.h"
#include "myTimer.h"
#include "modules.h"
diff --git a/src/arenaFile.c b/src/arenaFile.c
index dc705fd..53b6138 100644
--- a/src/arenaFile.c
+++ b/src/arenaFile.c
@@ -12,9 +12,6 @@
#include "arena.h"
#include "tux.h"
#include "shot.h"
-#include "wall.h"
-#include "pipe.h"
-#include "teleport.h"
#include "item.h"
#include "director.h"
#include "path.h"
diff --git a/src/dynamicInt.c b/src/dynamicInt.c
deleted file mode 100644
index 0b53762..0000000
--- a/src/dynamicInt.c
+++ /dev/null
@@ -1,13 +0,0 @@
-
-#include <stdlib.h>
-#include "main.h"
-#include "dynamicInt.h"
-
-
-int* newInt(int x)
-{
- int *new;
- new = malloc( sizeof(int) );
- *new = x;
- return new;
-}
diff --git a/src/gun.c b/src/gun.c
index a1ebdc8..c18fa07 100644
--- a/src/gun.c
+++ b/src/gun.c
@@ -7,7 +7,6 @@
#include "arena.h"
#include "tux.h"
#include "shot.h"
-#include "dynamicInt.h"
#include "myTimer.h"
#include "item.h"
#include "gun.h"
diff --git a/src/interface.c b/src/interface.c
index 4fdf2ba..675c4d2 100755
--- a/src/interface.c
+++ b/src/interface.c
@@ -9,7 +9,7 @@
//povrch okna
static SDL_Surface *screen;
-static SDL_Surface *fake_screen;
+//static SDL_Surface *my_surface;
//casovac
static SDL_TimerID timer;
@@ -53,11 +53,14 @@ int initSDL()
//screen = SDL_SetVideoMode(WINDOW_SIZE_X, WINDOW_SIZE_Y, 0, g_win_flags);
screen = SDL_SetVideoMode(WINDOW_SIZE_X, WINDOW_SIZE_Y, 0, g_win_flags);
- fake_screen = SDL_CreateRGBSurface(screen->flags, WINDOW_SIZE_X, WINDOW_SIZE_Y,
+/*
+ my_surface = SDL_CreateRGBSurface(screen->flags, WINDOW_SIZE_X, WINDOW_SIZE_Y,
screen->format->BitsPerPixel,
screen->format->Rmask, screen->format->Gmask,
screen->format->Bmask, screen->format->Amask);
+ memset(my_surface->pixels, 128, 200);
+*/
if (screen == NULL )
{
fprintf(stderr, "%s\n", SDL_GetError());
@@ -86,6 +89,8 @@ void interfaceRefresh()
{
//SDL_BlitSurface(fake_screen, NULL, screen, NULL);
//SDL_UpdateRect(screen, 0, 0, screen->w, screen->h);
+
+ //drawImage(my_surface, 200, 100, 0, 0, 200, 200);
SDL_Flip(screen);
}
diff --git a/src/item.c b/src/item.c
index 2ca4875..801a979 100644
--- a/src/item.c
+++ b/src/item.c
@@ -215,8 +215,6 @@ void addNewItem(list_t *listItem, int author_id)
(getNetTypeGame() == NET_GAME_TYPE_NONE && type == BONUS_HIDDEN) );
#endif
- type = GUN_MINE;
-
item = newItem(new_x, new_y, type, author_id);
addList(listItem, item);
diff --git a/src/pipe.c b/src/pipe.c
deleted file mode 100644
index 9225be5..0000000
--- a/src/pipe.c
+++ /dev/null
@@ -1,223 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-
-#include "main.h"
-#include "pipe.h"
-#include "shot.h"
-#include "net_multiplayer.h"
-
-#ifndef PUBLIC_SERVER
-#include "screen_world.h"
-#include "layer.h"
-#endif
-
-#ifdef PUBLIC_SERVER
-#include "publicServer.h"
-#endif
-
-#ifndef PUBLIC_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 PUBLIC_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 PUBLIC_SERVER
- assert( img != NULL );
-#endif
-
- new = malloc( sizeof(pipe_t) );
- assert( new != NULL );
-
- new->x = x;
- new->y = y;
- new->w = w;
- new->h = h;
- new->layer = layer;
- new->id = id;
- new->id_out = id_out;
- new->position = position;
-#ifndef PUBLIC_SERVER
- new->img = img;
-#endif
- return new;
-}
-
-#ifndef PUBLIC_SERVER
-
-void drawPipe(pipe_t *p)
-{
- assert( p != NULL );
-
- addLayer(p->img, p->x, p->y, 0, 0, p->img->w, p->img->h, p->layer);
-}
-
-void drawListPipe(list_t *listPipe)
-{
- pipe_t *thisPipe;
- int i;
-
- assert( listPipe != NULL );
-
- for( i = 0 ; i < listPipe->count ; i++ )
- {
- thisPipe = (pipe_t *)listPipe->list[i];
- assert( thisPipe != NULL );
- drawPipe(thisPipe);
- }
-}
-
-#endif
-
-pipe_t* isConflictWithListPipe(list_t *listPipe, int x, int y, int w, int h)
-{
- pipe_t *thisPipe;
- int i;
-
- assert( listPipe != NULL );
-
- for( i = 0 ; i < listPipe->count ; i++ )
- {
- thisPipe = (pipe_t *)listPipe->list[i];
- assert( thisPipe != NULL );
-
- if( conflictSpace(x, y, w, h,
- thisPipe->x, thisPipe->y, thisPipe->w, thisPipe->h) )
- {
- return thisPipe;
- }
- }
-
- return NULL;
-}
-
-static int negPosition(int n)
-{
- switch( n )
- {
- case TUX_UP :
- return TUX_DOWN;
-
- case TUX_LEFT :
- return TUX_RIGHT;
-
- case TUX_RIGHT :
- return TUX_LEFT;
-
- case TUX_DOWN :
- return TUX_UP;
-
- default :
- assert( ! "premenna n ma zlu hodnotu !" );
- break;
- }
-}
-
-static pipe_t* getPipeId(list_t *listPipe, int id)
-{
- int i;
-
- for( i = 0 ; i < listPipe->count ; i++ )
- {
- pipe_t *thisPipe;
-
- thisPipe = (pipe_t *) listPipe->list[i];
-
- if( thisPipe->id == id )
- {
- return thisPipe;
- }
- }
-
- return NULL;
-}
-
-static void moveShotFromPipe(shot_t *shot, pipe_t *pipe, list_t *listPipe)
-{
- pipe_t *distPipe;
-
- distPipe = getPipeId(listPipe, pipe->id_out);
-
- if( distPipe == NULL )
- {
- fprintf(stderr, "Pipe %d ID not found\n", pipe->id);
- return;
- }
-/*
- moveShot(shot, distPipe->position, pipe->x, pipe->y,
- distPipe->x, distPipe->y, distPipe->w, distPipe->h);
-*/
-}
-
-void eventConflictShotWithPipe(list_t *listPipe, list_t *listShot)
-{
- shot_t *thisShot;
- pipe_t *thisPipe;
- int i;
-
- assert( listPipe != NULL );
- assert( listShot != NULL );
-
- for( i = 0 ; i < listShot->count ; i++ )
- {
- thisShot = (shot_t *)listShot->list[i];
- assert( thisShot != NULL );
-
- if( ( thisPipe = isConflictWithListPipe(listPipe, thisShot->x, thisShot->y,
- thisShot->w, thisShot->h) ) != NULL )
- {
- tux_t *author;
-
- author = getTuxID(getCurrentArena()->listTux, thisShot->author_id);
-
- if( author != NULL &&
- author->bonus == BONUS_GHOST &&
- author->bonus_time > 0 )
- {
- continue;
- }
-
- if( negPosition( thisShot->position ) == thisPipe->position )
- {
- if( getNetTypeGame() == NET_GAME_TYPE_CLIENT )
- {
- if( thisShot->gun != GUN_BOMBBALL )
- {
- delListItem(listShot, i, destroyShot);
- i--;
- }
- }
- else
- {
- moveShotFromPipe(thisShot, thisPipe, listPipe);
- }
- }
- else
- {
- if( thisShot->gun == GUN_BOMBBALL && getNetTypeGame() != NET_GAME_TYPE_CLIENT )
- {
- boundBombBall(thisShot);
- continue;
- }
- else
- {
- delListItem(listShot, i, destroyShot);
- i--;
- }
- }
- }
- }
-}
-
-void destroyPipe(pipe_t *p)
-{
- assert( p != NULL );
- free(p);
-}
-
diff --git a/src/proto.c b/src/proto.c
index 45abf8c..4174f09 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -577,7 +577,7 @@ void proto_send_shot_server(int type, client_t *client, shot_t *p)
char msg[STR_PROTO_SIZE];
assert( p != NULL );
-
+
sprintf(msg, "shot %d %d %d %d %d %d %d %d %d\n",
p->id, p->x, p->y, p->px, p->py, p->position, p->gun, p->author_id, p->isCanKillAuthor);
@@ -597,12 +597,15 @@ void proto_recv_shot_client(char *msg)
sscanf(msg, "%s %d %d %d %d %d %d %d %d %d",
cmd, &shot_id, &x, &y, &px, &py, &position, &gun, &author_id, &isCanKillAuthor);
-/*
- if( getShotID(getCurrentArena()->listShot, shot_id) != NULL )
+
+ if( ( shot = getShotID(getCurrentArena()->listShot, shot_id) ) != NULL )
{
- return;
+ delListItem(getCurrentArena()->listShot,
+ searchListItem(getCurrentArena()->listShot, shot), destroyShot);
+
+ //return;
}
-*/
+
shot = newShot(x, y, px, py, gun, author_id);
replaceShotID(shot, shot_id);
diff --git a/src/publicServer.c b/src/publicServer.c
index 66d530f..6ac64c9 100644
--- a/src/publicServer.c
+++ b/src/publicServer.c
@@ -9,9 +9,7 @@
#include "main.h"
#include "list.h"
#include "tux.h"
-#include "wall.h"
-#include "teleport.h"
-#include "pipe.h"
+#include "idManager.h"
#include "myTimer.h"
#include "arena.h"
#include "item.h"
@@ -111,8 +109,14 @@ void my_handler_quit(int n)
void quitPublicServer()
{
printf("quit public server\n");
+
quitNetMultiplayer();
destroyArena(arena);
+
+ quitTux();
+ quitItem();
+ quitShot();
+
quitArenaFile();
quitServerConfigFile();
quitModule();
diff --git a/src/screen.c b/src/screen.c
index 0fc0d69..07a30a2 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -6,6 +6,7 @@
#include "interface.h"
#include "screen.h"
#include "list.h"
+#include "layer.h"
static screen_t *currentScreen;
static list_t *listScreen;
diff --git a/src/screen_world.c b/src/screen_world.c
index fde1d4a..c90b419 100644
--- a/src/screen_world.c
+++ b/src/screen_world.c
@@ -21,9 +21,6 @@
#include "sound.h"
#include "fake_audio.h"
#include "tux.h"
-#include "wall.h"
-#include "teleport.h"
-#include "pipe.h"
#include "item.h"
#include "shot.h"
#include "gun.h"
@@ -37,6 +34,7 @@
#include "font.h"
#include "music.h"
#include "modules.h"
+#include "idManager.h"
static arena_t *arena;
static int count;
diff --git a/src/shot.c b/src/shot.c
index f5da8a9..cdbdb4e 100644
--- a/src/shot.c
+++ b/src/shot.c
@@ -6,8 +6,6 @@
#include "main.h"
#include "shot.h"
#include "gun.h"
-#include "wall.h"
-#include "pipe.h"
#include "net_multiplayer.h"
#include "proto.h"
#include "idManager.h"
diff --git a/src/teleport.c b/src/teleport.c
deleted file mode 100644
index d8557e3..0000000
--- a/src/teleport.c
+++ /dev/null
@@ -1,242 +0,0 @@
-
-#include <stdlib.h>
-#include <assert.h>
-
-#include "main.h"
-#include "tux.h"
-#include "teleport.h"
-#include "shot.h"
-#include "net_multiplayer.h"
-#include "proto.h"
-#include "arena.h"
-
-#ifndef PUBLIC_SERVER
-#include "layer.h"
-#include "screen_world.h"
-#include "sound.h"
-#include "fake_audio.h"
-#endif
-
-#ifdef PUBLIC_SERVER
-#include "publicServer.h"
-#endif
-
-#ifndef PUBLIC_SERVER
-teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img)
-#endif
-
-#ifdef PUBLIC_SERVER
-teleport_t* newTeleport(int x, int y, int w, int h, int layer)
-#endif
-{
- teleport_t *new;
-
-#ifndef PUBLIC_SERVER
- assert( img != NULL );
-#endif
-
- new = malloc( sizeof(teleport_t) );
- assert( new != NULL );
-
- new->x = x;
- new->y = y;
- new->w = w;
- new->h = h;
- new->layer = layer;
-#ifndef PUBLIC_SERVER
- new->img = img;
-#endif
- return new;
-}
-
-#ifndef PUBLIC_SERVER
-
-void drawTeleport(teleport_t *p)
-{
- assert( p != NULL );
-
- addLayer(p->img, p->x, p->y, 0, 0, p->img->w, p->img->h, p->layer);
-}
-
-void drawListTeleport(list_t *listTeleport)
-{
- teleport_t *thisTeleport;
- int i;
-
- assert( listTeleport != NULL );
-
- for( i = 0 ; i < listTeleport->count ; i++ )
- {
- thisTeleport = (teleport_t *)listTeleport->list[i];
- assert( thisTeleport != NULL );
- drawTeleport(thisTeleport);
- }
-}
-
-#endif
-
-teleport_t* isConflictWithListTeleport(list_t *listTeleport, int x, int y, int w, int h)
-{
- teleport_t *thisTeleport;
- int i;
-
- assert( listTeleport != NULL );
-
- for( i = 0 ; i < listTeleport->count ; i++ )
- {
- thisTeleport = (teleport_t *)listTeleport->list[i];
- assert( thisTeleport != NULL );
-
- if( conflictSpace(x, y, w, h,
- thisTeleport->x, thisTeleport->y, thisTeleport->w, thisTeleport->h) )
- {
- return thisTeleport;
- }
- }
-
- return NULL;
-}
-
-static teleport_t* getRandomTeleportBut(list_t *listTeleport, teleport_t *teleport)
-{
- int x;
-
- do{
- x = random() % listTeleport->count;
- }while( listTeleport->list[x] == teleport );
-
- return (teleport_t *) listTeleport->list[x];
-}
-
-static int getRandomPosition()
-{
- switch( random() % 4 )
- {
- case 0 :
- return TUX_UP;
-
- case 1 :
- return TUX_LEFT;
-
- case 2 :
- return TUX_RIGHT;
-
- case 3 :
- return TUX_DOWN;
- }
-
- assert( ! "Stupid error ! " );
-}
-
-static void moveShotFromTeleport(shot_t *shot, teleport_t *teleport, list_t *listTeleport)
-{
- teleport_t *distTeleport;
-
- distTeleport = getRandomTeleportBut(listTeleport, teleport);
-
- moveShot(shot, getRandomPosition(), teleport->x, teleport->y,
- distTeleport->x, distTeleport->y, distTeleport->w, distTeleport->h);
-}
-
-void eventConflictShotWithTeleport(list_t *listTeleport, list_t *listShot)
-{
- shot_t *thisShot;
- teleport_t *thisTeleport;
- int i;
-
- assert( listTeleport != NULL );
- assert( listShot != NULL );
-
- for( i = 0 ; i < listShot->count ; i++ )
- {
- thisShot = (shot_t *)listShot->list[i];
- assert( thisShot != NULL );
-
- if( ( thisTeleport = isConflictWithListTeleport(listTeleport, thisShot->x, thisShot->y, thisShot->w, thisShot->h) ) != NULL )
- {
- tux_t *author;
-
- author = getTuxID(getCurrentArena()->listTux, thisShot->author_id);
-
- if( author != NULL &&
- author->bonus == BONUS_GHOST &&
- author->bonus_time > 0 )
- {
- continue;
- }
-
- if( getNetTypeGame() == NET_GAME_TYPE_CLIENT )
- {
- delListItem(listShot, i, destroyShot);
- i--;
- }
- else
- {
- moveShotFromTeleport(thisShot, thisTeleport, listTeleport);
- }
- }
- }
-}
-
-void eventTeleportTux(list_t *listTeleport, teleport_t *teleport, tux_t *tux)
-{
- teleport_t *distTeleport;
- int current_x, current_y;
- int dist_x, dist_y;
-
- if( tux->bonus == BONUS_GHOST ||
- getNetTypeGame() == NET_GAME_TYPE_CLIENT )
- {
- return;
- }
-
- distTeleport = getRandomTeleportBut(listTeleport, teleport);
-
- getTuxProportion(tux, &current_x, &current_y, NULL, NULL);
-
- switch( tux->position )
- {
- case TUX_UP :
- dist_x = distTeleport->x + distTeleport->w/2;
- dist_y = distTeleport->y - ( TUX_HEIGHT + 10 );
- break;
-
- case TUX_LEFT :
- dist_y = distTeleport->y + distTeleport->h/2;
- dist_x = distTeleport->x - ( TUX_WIDTH + 10 );
- break;
-
- case TUX_RIGHT :
- dist_y = distTeleport->y + distTeleport->h/2;
- dist_x = distTeleport->x + distTeleport->w + 10;
- break;
-
- case TUX_DOWN :
- dist_x = distTeleport->x + distTeleport->w/2;
- dist_y = distTeleport->y + distTeleport->h + 10;
- break;
-
- default :
- assert( ! "premenna p->control ma zlu hodnotu !" );
- break;
- }
-
- if( isFreeSpace(getCurrentArena(), dist_x, dist_y, TUX_WIDTH, TUX_HEIGHT) )
- {
- setTuxProportion(tux, dist_x, dist_y);
-#ifndef PUBLIC_SERVER
- playSound("teleport", SOUND_GROUP_BASE);
-#endif
- if( getNetTypeGame() == NET_GAME_TYPE_SERVER )
- {
- proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux);
- }
- }
-}
-
-void destroyTeleport(teleport_t *p)
-{
- assert( p != NULL );
- free(p);
-}
-
diff --git a/src/tux.c b/src/tux.c
index ce9a249..bc66708 100644
--- a/src/tux.c
+++ b/src/tux.c
@@ -9,14 +9,10 @@
#include "arena.h"
#include "shot.h"
#include "gun.h"
-#include "wall.h"
-#include "teleport.h"
-#include "pipe.h"
#include "item.h"
#include "arena.h"
#include "myTimer.h"
#include "net_multiplayer.h"
-#include "dynamicInt.h"
#include "proto.h"
#include "modules.h"
#include "idManager.h"
diff --git a/src/wall.c b/src/wall.c
deleted file mode 100644
index c91f58d..0000000
--- a/src/wall.c
+++ /dev/null
@@ -1,142 +0,0 @@
-
-#include <stdlib.h>
-#include <assert.h>
-
-#include "main.h"
-#include "wall.h"
-#include "shot.h"
-#include "net_multiplayer.h"
-#include "proto.h"
-
-#ifndef PUBLIC_SERVER
-#include "layer.h"
-#include "screen_world.h"
-#endif
-
-#ifdef PUBLIC_SERVER
-#include "publicServer.h"
-#endif
-
-#ifndef PUBLIC_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 PUBLIC_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 PUBLIC_SERVER
- assert( img != NULL );
-#endif
- new = malloc( sizeof(wall_t) );
- assert( new != NULL );
-
- new->x = x;
- new->y = y;
- new->w = w;
- new->h = h;
- new->img_x = img_x;
- new->img_y = img_y;
- new->layer = layer;
-#ifndef PUBLIC_SERVER
- new->img = img;
-#endif
-
- return new;
-}
-
-#ifndef PUBLIC_SERVER
-
-void drawWall(wall_t *p)
-{
- assert( p != NULL );
-
- addLayer(p->img, p->img_x, p->img_y, 0, 0, p->img->w, p->img->h, p->layer);
-}
-
-void drawListWall(list_t *listWall)
-{
- wall_t *thisWall;
- int i;
-
- assert( listWall != NULL );
-
- for( i = 0 ; i < listWall->count ; i++ )
- {
- thisWall = (wall_t *)listWall->list[i];
- assert( thisWall != NULL );
- drawWall(thisWall);
- }
-}
-
-#endif
-
-int isConflictWithListWall(list_t *listWall, int x, int y, int w, int h)
-{
- wall_t *thisWall;
- int i;
-
- assert( listWall != NULL );
-
- for( i = 0 ; i < listWall->count ; i++ )
- {
- thisWall = (wall_t *)listWall->list[i];
- assert( thisWall != NULL );
-
- if( conflictSpace(x, y, w, h,
- thisWall->x, thisWall->y, thisWall->w, thisWall->h) )
- {
- return 1;
- }
- }
-
- return 0;
-}
-
-void eventConflictShotWithWall(list_t *listWall, list_t *listShot)
-{
- shot_t *thisShot;
- tux_t *author;
- int i;
-
- assert( listWall != NULL );
- assert( listShot != NULL );
-
- for( i = 0 ; i < listShot->count ; i++ )
- {
- thisShot = (shot_t *)listShot->list[i];
- assert( thisShot != NULL );
-
- if( isConflictWithListWall(listWall, thisShot->x, thisShot->y, thisShot->w, thisShot->h) )
- {
- author = getTuxID( getCurrentArena()->listShot, thisShot->author_id );
-
- if( author != NULL &&
- author->bonus == BONUS_GHOST &&
- author->bonus_time > 0 )
- {
- continue;
- }
-
- if( thisShot->gun == GUN_BOMBBALL && getNetTypeGame() != NET_GAME_TYPE_CLIENT )
- {
- boundBombBall(thisShot);
- continue;
- }
-
- delListItem(listShot, i, destroyShot);
- i--;
- }
- }
-}
-
-void destroyWall(wall_t *p)
-{
- assert( p != NULL );
- free(p);
-}
-