From c94fd664bba352732bf0e5c9a77e709b49f1aa4f Mon Sep 17 00:00:00 2001 From: oroborus Date: Mon, 26 May 2008 12:45:53 +0000 Subject: - 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 --- src/wall.c | 142 ------------------------------------------------------------- 1 file changed, 142 deletions(-) delete mode 100644 src/wall.c (limited to 'src/wall.c') 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 -#include - -#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); -} - -- cgit v1.2.3