From b84b59153c587248ca8a6a94a6d93977e851233f Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 15 Mar 2008 18:35:48 +0000 Subject: - moznost skompilovat public server bez GUI ( pomocou Makefile-publicServer ) port sa nastavuje ako ./publicserver --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 --- src/teleport.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src/teleport.c') diff --git a/src/teleport.c b/src/teleport.c index f0d9c57..776d7c7 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -2,18 +2,35 @@ #include #include +#include "main.h" #include "tux.h" #include "teleport.h" +#include "shot.h" +#include "sound.h" + +#ifndef BUBLIC_SERVER #include "layer.h" #include "screen_world.h" -#include "shot.h" #include "sound.h" +#endif + +#ifdef BUBLIC_SERVER +#include "publicServer.h" +#endif +#ifndef BUBLIC_SERVER teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img) +#endif + +#ifdef BUBLIC_SERVER +teleport_t* newTeleport(int x, int y, int w, int h, int layer) +#endif { teleport_t *new; +#ifndef BUBLIC_SERVER assert( img != NULL ); +#endif new = malloc( sizeof(teleport_t) ); assert( new != NULL ); @@ -23,11 +40,14 @@ teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img) new->w = w; new->h = h; new->layer = layer; +#ifndef BUBLIC_SERVER new->img = img; - +#endif return new; } +#ifndef BUBLIC_SERVER + void drawTeleport(teleport_t *p) { assert( p != NULL ); @@ -50,6 +70,8 @@ void drawListTeleport(list_t *listTeleport) } } +#endif + teleport_t* isConflictWithListTeleport(list_t *listTeleport, int x, int y, int w, int h) { teleport_t *thisTeleport; @@ -185,7 +207,9 @@ void eventTeleportTux(list_t *listTeleport, teleport_t *teleport, tux_t *tux) if( isFreeSpace(dist_x, dist_y, TUX_WIDTH, TUX_HEIGHT) ) { setTuxProportion(tux, dist_x, dist_y); +#ifndef BUBLIC_SERVER playSound("teleport", SOUND_GROUP_BASE); +#endif } } -- cgit v1.2.3