diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-15 18:35:48 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-15 18:35:48 +0000 |
| commit | b84b59153c587248ca8a6a94a6d93977e851233f (patch) | |
| tree | e13b33f09ee6ac130bb6045626618b1c5fc4d787 /src/teleport.c | |
| parent | 6038f9434f1eb40caf7992ece9a3972e95a9fc11 (diff) | |
- moznost skompilovat public server bez GUI ( pomocou Makefile-publicServer )
port sa nastavuje ako ./publicserver --port <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
Diffstat (limited to 'src/teleport.c')
| -rw-r--r-- | src/teleport.c | 28 |
1 files changed, 26 insertions, 2 deletions
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 <stdlib.h> #include <assert.h> +#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 } } |