summaryrefslogtreecommitdiff
path: root/src/wall.c
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/wall.c
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/wall.c')
-rw-r--r--src/wall.c142
1 files changed, 0 insertions, 142 deletions
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);
-}
-