summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxHire <xHire@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-24 15:58:27 +0000
committerxHire <xHire@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-24 15:58:27 +0000
commitb0c18ef9dfe4703484e03a836e44366294afa4ac (patch)
tree5a4ec90bbfdff47de224abc1eaaf4efd8095a763
parentaec5ba5ca31f3d7c895beb658a93c353b2b8d5c1 (diff)
- 'BUBLIC_SERVER' replaced with 'PUBLIC_SERVER'
- small changes in Makefile git-svn-id: http://opensvn.csie.org/tuxanci_ng@34 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
-rw-r--r--Makefile33
-rw-r--r--include/arena.h4
-rw-r--r--include/item.h6
-rw-r--r--include/pipe.h10
-rw-r--r--include/proto.h4
-rw-r--r--include/server.h2
-rw-r--r--include/shot.h6
-rw-r--r--include/teleport.h10
-rw-r--r--include/wall.h8
-rwxr-xr-xsrc/Makefile-publicServer5
-rw-r--r--src/arena.c2
-rw-r--r--src/arenaFile.c28
-rw-r--r--src/gun.c16
-rw-r--r--src/item.c36
-rw-r--r--src/main.c8
-rw-r--r--src/myTimer.c2
-rw-r--r--src/net_multiplayer.c8
-rw-r--r--src/pipe.c14
-rw-r--r--src/proto.c38
-rw-r--r--src/server.c12
-rw-r--r--src/shot.c22
-rw-r--r--src/teleport.c16
-rw-r--r--src/tux.c38
-rw-r--r--src/wall.c14
24 files changed, 167 insertions, 175 deletions
diff --git a/Makefile b/Makefile
index 161743b..e707f62 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-DESTDIR:=/usr/local/
+DESTDIR:=/usr/local
all:
make -C ./src
@@ -48,24 +48,17 @@ server:
make -C ./src -f Makefile-publicServer
install:
- cp ./src/tuxanci-ng $(DESTDIR)bin/
- mkdir $(DESTDIR)share/tuxanci-ng
- mkdir $(DESTDIR)share/tuxanci-ng/arena
- mkdir $(DESTDIR)share/tuxanci-ng/font
- mkdir $(DESTDIR)share/tuxanci-ng/image
- mkdir $(DESTDIR)share/tuxanci-ng/lang
- mkdir $(DESTDIR)share/tuxanci-ng/music
- mkdir $(DESTDIR)share/tuxanci-ng/sound
- mkdir $(DESTDIR)share/tuxanci-ng/data
-
- cp -rf ./arena/* $(DESTDIR)share/tuxanci-ng/arena
- cp -rf ./font/* $(DESTDIR)share/tuxanci-ng/font
- cp -rf ./image/* $(DESTDIR)share/tuxanci-ng/image
- cp -rf ./lang/* $(DESTDIR)share/tuxanci-ng/lang
- cp -rf ./music/* $(DESTDIR)share/tuxanci-ng/music
- cp -rf ./sound/* $(DESTDIR)share/tuxanci-ng/sound
- cp -rf ./data/* $(DESTDIR)share/tuxanci-ng/data
+ mkdir -p $(DESTDIR)/bin
+ mkdir -p $(DESTDIR)/share/tuxanci-ng/{arena,data,font,image,lang,music,sound}
+ cp ./src/tuxanci-ng $(DESTDIR)/bin/
+
+ cp -rf ./arena/* $(DESTDIR)/share/tuxanci-ng/arena/
+ cp -rf ./font/* $(DESTDIR)/share/tuxanci-ng/font/
+ cp -rf ./image/* $(DESTDIR)/share/tuxanci-ng/image/
+ cp -rf ./lang/* $(DESTDIR)/share/tuxanci-ng/lang/
+ cp -rf ./music/* $(DESTDIR)/share/tuxanci-ng/music/
+ cp -rf ./sound/* $(DESTDIR)/share/tuxanci-ng/sound/
+ cp -rf ./data/* $(DESTDIR)/share/tuxanci-ng/data/
uninstall:
- rm -rf $(DESTDIR)bin/tuxanci-ng
- rm -rf $(DESTDIR)share/tuxanci-ng
+ rm -rf $(DESTDIR)/{bin,share}/tuxanci-ng
diff --git a/include/arena.h b/include/arena.h
index c5f34b4..4dc5b83 100644
--- a/include/arena.h
+++ b/include/arena.h
@@ -4,14 +4,14 @@
#define ARENA_H
#include "main.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
#include "list.h"
typedef struct arena_struct
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char music[STR_SIZE];
SDL_Surface *background;
diff --git a/include/item.h b/include/item.h
index a3fa02c..b2c8098 100644
--- a/include/item.h
+++ b/include/item.h
@@ -4,7 +4,7 @@
#define ITEM_H
#include "main.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
#include "list.h"
@@ -25,7 +25,7 @@ typedef struct item_struct
int count;
tux_t *author;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
SDL_Surface *img; //obrazok
#endif
} item_t;
@@ -57,7 +57,7 @@ extern void initItem();
extern item_t* newItem(int x, int y, int type, tux_t *author);
extern item_t* getItemID(list_t *listItem, int id);
extern void addNewItem(list_t *listItem, tux_t *author);
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern void drawItem(item_t *p);
extern void drawListItem(list_t *listItem);
#endif
diff --git a/include/pipe.h b/include/pipe.h
index 867dcc8..af8e180 100644
--- a/include/pipe.h
+++ b/include/pipe.h
@@ -4,7 +4,7 @@
#define PIPE_H
#include "main.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
#include "list.h"
@@ -23,22 +23,22 @@ typedef struct pipe_struct
int layer; // vrstva
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
SDL_Surface *img; //obrazok
#endif
} pipe_t;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern 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 BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
extern pipe_t* newPipe(int x, int y, int w, int h, int layer,
int id, int id_out, int position);
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern void drawPipe(pipe_t *p);
extern void drawListPipe(list_t *listPipe);
#endif
diff --git a/include/proto.h b/include/proto.h
index aba3fda..e083c6c 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -25,7 +25,7 @@
#include "proto.h"
#include "net_multiplayer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "network.h"
#include "screen_world.h"
#include "screen_setting.h"
@@ -33,7 +33,7 @@
#include "client.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
diff --git a/include/server.h b/include/server.h
index 3ee1933..397eb41 100644
--- a/include/server.h
+++ b/include/server.h
@@ -8,7 +8,7 @@
#include "buffer.h"
#include "myTimer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
diff --git a/include/shot.h b/include/shot.h
index d0460e2..d3e9bcc 100644
--- a/include/shot.h
+++ b/include/shot.h
@@ -4,7 +4,7 @@
#define SHOT_H
#include "main.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
#include "list.h"
@@ -29,7 +29,7 @@ typedef struct shot_struct
tux_t *author;
bool_t isCanKillAuthor;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
SDL_Surface *img;
#endif
} shot_t;
@@ -37,7 +37,7 @@ typedef struct shot_struct
extern bool_t isShotInicialized();
extern void initShot();
extern shot_t* newShot(int x,int y, int px, int py, int gun, tux_t *author);
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern void drawShot(shot_t *p);
extern void drawListShot(list_t *listShot);
#endif
diff --git a/include/teleport.h b/include/teleport.h
index fc039c0..1101a57 100644
--- a/include/teleport.h
+++ b/include/teleport.h
@@ -3,7 +3,7 @@
#define TELEPORT_H
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
#include "main.h"
@@ -19,20 +19,20 @@ typedef struct teleport_struct
int layer; // vrstva
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
SDL_Surface *img; //obrazok
#endif
} teleport_t;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img);
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
extern teleport_t* newTeleport(int x, int y, int w, int h, int layer);
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern void drawTeleport(teleport_t *p);
extern void drawListTeleport(list_t *listTeleport);
#endif
diff --git a/include/wall.h b/include/wall.h
index 329063d..1389539 100644
--- a/include/wall.h
+++ b/include/wall.h
@@ -5,7 +5,7 @@
#include "main.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
@@ -24,17 +24,17 @@ typedef struct wall_struct
int layer; // vrstva
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
SDL_Surface *img; //obrazok
#endif
} wall_t;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
extern wall_t* newWall(int x, int y, int w, int h,
int img_x, int img_y, int layer, SDL_Surface *img);
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
extern wall_t* newWall(int x, int y, int w, int h,
int img_x, int img_y, int layer);
#endif
diff --git a/src/Makefile-publicServer b/src/Makefile-publicServer
index ff6cf15..a9fc788 100755
--- a/src/Makefile-publicServer
+++ b/src/Makefile-publicServer
@@ -2,9 +2,9 @@
#CC = /usr/local/gcc/bin/gcc
CC = gcc
-DESTDIR:=/usr/local/
+DESTDIR:=/usr/local
-CFLAGS = -g -O0 -DBUBLIC_SERVER -DSUPPORT_NET_UNIX_UDP -I../include -Wall
+CFLAGS = -g -O0 -DPUBLIC_SERVER -DSUPPORT_NET_UNIX_UDP -I../include -Wall
#CFLAGS = -O2 -DDESTDIR=\"$(DESTDIR)\" `sdl-config --cflags` -I../include -Wall
LIBS =
@@ -84,4 +84,3 @@ pipe.o: pipe.c ../include/pipe.h
clean:
rm -rf *.o *.c~ ../include*.h~ Makefile-publicServer~ publicserver
-
diff --git a/src/arena.c b/src/arena.c
index c2080f9..7f17f57 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -16,7 +16,7 @@ arena_t* newArena()
arena_t *new;
new = malloc( sizeof(arena_t) );
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->background = NULL;
strcpy(new->music, "");
#endif
diff --git a/src/arenaFile.c b/src/arenaFile.c
index a58f3be..5c89476 100644
--- a/src/arenaFile.c
+++ b/src/arenaFile.c
@@ -20,7 +20,7 @@
#include "path.h"
#include "string_length.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "image.h"
#include "music.h"
#endif
@@ -34,7 +34,7 @@ bool_t isAreaFileInicialized()
return isArenaFileInit;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
static void cmd_loadImage(char *line)
{
@@ -101,14 +101,14 @@ static void cmd_wall(arena_t *arena, char *line)
if( getValue(line, "layer", str_layer, STR_NUM_SIZE) != 0 )return;
if( getValue(line, "image", str_image, STR_SIZE) != 0 )return;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new = newWall(atoi(str_x), atoi(str_y),
atoi(str_w), atoi(str_h),
atoi(str_img_x), atoi(str_img_y),
atoi(str_layer), getImage(IMAGE_GROUP_USER, str_image) );
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
new = newWall(atoi(str_x), atoi(str_y),
atoi(str_w), atoi(str_h),
atoi(str_img_x), atoi(str_img_y),
@@ -135,13 +135,13 @@ static void cmd_teleport(arena_t *arena, char *line)
if( getValue(line, "layer", str_layer, STR_NUM_SIZE) != 0 )return;
if( getValue(line, "image", str_image, STR_SIZE) != 0 )return;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new = newTeleport(atoi(str_x), atoi(str_y),
atoi(str_w), atoi(str_h),
atoi(str_layer), getImage(IMAGE_GROUP_USER, str_image) );
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
new = newTeleport(atoi(str_x), atoi(str_y),
atoi(str_w), atoi(str_h),
atoi(str_layer) );
@@ -173,14 +173,14 @@ static void cmd_pipe(arena_t *arena, char *line)
if( getValue(line, "layer", str_layer, STR_NUM_SIZE) != 0 )return;
if( getValue(line, "image", str_image, STR_SIZE) != 0 )return;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new = newPipe(atoi(str_x), atoi(str_y),
atoi(str_w), atoi(str_h),
atoi(str_layer), atoi(str_id), atoi(str_id_out), atoi(str_position),
getImage(IMAGE_GROUP_USER, str_image) );
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
new = newPipe(atoi(str_x), atoi(str_y),
atoi(str_w), atoi(str_h),
atoi(str_layer), atoi(str_id), atoi(str_id_out), atoi(str_position) );
@@ -269,7 +269,7 @@ arena_t* getArena(int id)
char *line;
line = (char *) (ts->text->list[i]);
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
if( strncmp(line, "loadImage", 9) == 0 )cmd_loadImage(line);
if( strncmp(line, "loadMusic", 9) == 0 )cmd_loadMusic(line);
if( strncmp(line, "background", 10) == 0 )cmd_background(arena, line);
@@ -289,18 +289,18 @@ void initArenaFile()
director_t *p;
int i;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
assert( isImageInicialized() == TRUE );
#endif
isArenaFileInit = TRUE;
listArenaFile = newList();
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
p = loadDirector(PATH_ARENA);
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
p = loadDirector(PUBLIC_SERVER_PATH_ARENA);
#endif
@@ -314,10 +314,10 @@ void initArenaFile()
{
char path[STR_PATH_SIZE];
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(path, PATH_ARENA "%s", line);
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
sprintf(path, PUBLIC_SERVER_PATH_ARENA "%s", line);
#endif
printf("load map %s\n", line);
diff --git a/src/gun.c b/src/gun.c
index c4e3c90..6964394 100644
--- a/src/gun.c
+++ b/src/gun.c
@@ -14,14 +14,14 @@
#include "proto.h"
#include "net_multiplayer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "sound.h"
#include "screen_world.h"
#include "interface.h"
#include "term.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
@@ -235,7 +235,7 @@ static void putInGunMine(tux_t *tux)
{
item_t *item;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
playSound("put_mine", SOUND_GROUP_BASE);
sprintf(msg, "tux with id %d pu mine\n", tux->id);
@@ -264,31 +264,31 @@ void shotInGun(tux_t *tux)
switch( tux->gun )
{
case GUN_SIMPLE :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("gun_revolver", SOUND_GROUP_BASE);
#endif
shotInGunSimpe(tux);
break;
case GUN_DUAL_SIMPLE :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("gun_revolver", SOUND_GROUP_BASE);
#endif
shotInGunDualSimpe(tux);
break;
case GUN_SCATTER :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("gun_scatter", SOUND_GROUP_BASE);
#endif
shotInGunScatter(tux);
break;
case GUN_TOMMY :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("gun_tommy", SOUND_GROUP_BASE);
#endif
shotInGunTommy(tux);
break;
case GUN_LASSER :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("gun_lasser", SOUND_GROUP_BASE);
#endif
shotInGunLasser(tux);
diff --git a/src/item.c b/src/item.c
index 3305d7c..4717671 100644
--- a/src/item.c
+++ b/src/item.c
@@ -10,7 +10,7 @@
#include "proto.h"
#include "net_multiplayer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#include "image.h"
#include "sound.h"
@@ -20,11 +20,11 @@
#include "term.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
static SDL_Surface *g_item[ITEM_COUNT];
#endif
@@ -37,7 +37,7 @@ bool_t isItemInicialized()
void initItem()
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
g_item[GUN_DUAL_SIMPLE] = addImageData("item.dual.png", IMAGE_ALPHA, "item_dual_simple", IMAGE_GROUP_BASE);
g_item[GUN_TOMMY] = addImageData("item.tommy.png", IMAGE_ALPHA, "item_tommy_simple", IMAGE_GROUP_BASE);
g_item[GUN_SCATTER] = addImageData("item.scatter.png", IMAGE_ALPHA, "item_scatter_simple", IMAGE_GROUP_BASE);
@@ -72,7 +72,7 @@ item_t* newItem(int x, int y, int type, tux_t *author)
new->y = y;
new->frame = 0;
new->count = 0;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = g_item[type];
#endif
new->author = author;
@@ -94,7 +94,7 @@ item_t* newItem(int x, int y, int type, tux_t *author)
break;
case ITEM_EXPLOSION :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("explozion", SOUND_GROUP_BASE);
#endif
new->w = ITEM_EXPLOSION_WIDTH;
@@ -102,7 +102,7 @@ item_t* newItem(int x, int y, int type, tux_t *author)
break;
case ITEM_BIG_EXPLOSION :
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("explozion", SOUND_GROUP_BASE);
#endif
new->w = ITEM_BIG_EXPLOSION_WIDTH;
@@ -146,7 +146,7 @@ item_t* getItemID(list_t *listItem, int id)
void addNewItem(list_t *listItem, tux_t *author)
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
#endif
arena_t *arena;
@@ -154,7 +154,7 @@ void addNewItem(list_t *listItem, tux_t *author)
int new_x, new_y;
int type;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
if( isSettingAnyItem() == FALSE ||
getNetTypeGame() == NET_GAME_TYPE_CLIENT )
{
@@ -167,7 +167,7 @@ void addNewItem(list_t *listItem, tux_t *author)
type = GUN_DUAL_SIMPLE;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
do{
#endif
switch( random() % 11 )
@@ -195,7 +195,7 @@ void addNewItem(list_t *listItem, tux_t *author)
case 10 : type = BONUS_HIDDEN;
break;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
}while( isSettingItem(type) == FALSE );
#endif
@@ -207,14 +207,14 @@ void addNewItem(list_t *listItem, tux_t *author)
proto_send_additem_server(PROTO_SEND_ALL, NULL, item);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(msg, "in arena is new item\n");
appendTextInTerm(msg);
#endif
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void drawItem(item_t *p)
{
@@ -407,7 +407,7 @@ static void eventTuxIsDeadWithItem(tux_t *tux, item_t *item)
if( item->author != NULL && item->author != tux )
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char term_msg[STR_SIZE];
sprintf(term_msg, "tux with id %d set score to %d\n",
@@ -429,14 +429,14 @@ static void eventTuxIsDeadWithItem(tux_t *tux, item_t *item)
static void tuxGiveBonus(tux_t *tux, item_t *item)
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
playSound("item_bonus", SOUND_GROUP_BASE);
#endif
tux->bonus = item->type;
tux->bonus_time = TUX_MAX_BONUS;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(msg, "tux with id %d bonus enabled\n", tux->id);
appendTextInTerm(msg);
#endif
@@ -444,7 +444,7 @@ static void tuxGiveBonus(tux_t *tux, item_t *item)
static void tuxGiveGun(tux_t *tux, item_t *item)
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
playSound("item_gun", SOUND_GROUP_BASE);
#endif
@@ -453,7 +453,7 @@ static void tuxGiveGun(tux_t *tux, item_t *item)
tux->shot[ item->type ] += GUN_MAX_SHOT;
tux->gun = item->type;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(msg, "tux with id %d has new gun\n", tux->id);
appendTextInTerm(msg);
#endif
diff --git a/src/main.c b/src/main.c
index a9622e3..e0e13d4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -8,7 +8,7 @@
#include "main.h"
#include "tux.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "font.h"
#include "image.h"
@@ -37,7 +37,7 @@
static int my_argc;
static char **my_argv;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
static void init()
{
@@ -154,7 +154,7 @@ int main(int argc, char *argv[])
my_argc = argc;
my_argv = argv;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
init();
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
quit();
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
signal(SIGPIPE, SIG_IGN);
signal(SIGINT, my_handler_quit);
diff --git a/src/myTimer.c b/src/myTimer.c
index ea83fd5..b513835 100644
--- a/src/myTimer.c
+++ b/src/myTimer.c
@@ -9,7 +9,7 @@
#include "list.h"
#include "myTimer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "interface.h"
#endif
diff --git a/src/net_multiplayer.c b/src/net_multiplayer.c
index 9daf943..29d8872 100644
--- a/src/net_multiplayer.c
+++ b/src/net_multiplayer.c
@@ -16,7 +16,7 @@
#include "server.h"
#include "udp.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "sdl_udp.h"
#include "tcp.h"
#include "screen.h"
@@ -68,7 +68,7 @@ int initNetMuliplayer(int type, char *ip, int port)
#endif
break;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
case NET_GAME_TYPE_CLIENT :
#ifdef SUPPORT_NET_UNIX_TCP
if( initTcpClient(ip, port) != 0 )
@@ -128,7 +128,7 @@ void eventNetMultiplayer()
#endif
break;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
case NET_GAME_TYPE_CLIENT :
#ifdef SUPPORT_NET_UNIX_TCP
selectClientTcpSocket();
@@ -171,7 +171,7 @@ void quitNetMultiplayer()
#endif
break;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
case NET_GAME_TYPE_CLIENT :
#ifdef SUPPORT_NET_UNIX_TCP
quitTcpClient();
diff --git a/src/pipe.c b/src/pipe.c
index dde1a11..19b12c5 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -8,27 +8,27 @@
#include "shot.h"
#include "net_multiplayer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "screen_world.h"
#include "layer.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
-#ifndef BUBLIC_SERVER
+#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 BUBLIC_SERVER
+#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 BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
assert( img != NULL );
#endif
@@ -43,13 +43,13 @@ pipe_t* newPipe(int x, int y, int w, int h, int layer, int id, int id_out, int p
new->id = id;
new->id_out = id_out;
new->position = position;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = img;
#endif
return new;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void drawPipe(pipe_t *p)
{
diff --git a/src/proto.c b/src/proto.c
index 0707c72..07a496d 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -15,7 +15,7 @@
#include "proto.h"
#include "net_multiplayer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "network.h"
#include "screen_world.h"
#include "screen_setting.h"
@@ -24,7 +24,7 @@
#include "term.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
@@ -70,7 +70,7 @@ void proto_send_error_server(int type, client_t *client, int errorcode)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_error_client(char *msg)
{
@@ -87,7 +87,7 @@ void proto_recv_error_client(char *msg)
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_send_hello_client(char *name)
{
@@ -158,7 +158,7 @@ void proto_send_init_server(int type, client_t *client, client_t *client2)
assert( client2 != NULL );
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
getSettingCountRound(&n);
#endif
@@ -169,7 +169,7 @@ void proto_send_init_server(int type, client_t *client, client_t *client2)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_init_client(char *msg)
{
@@ -211,7 +211,7 @@ void proto_send_event_server(int type, client_t *client, tux_t *tux, int action)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_event_client(char *msg)
{
@@ -233,7 +233,7 @@ void proto_recv_event_client(char *msg)
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_send_event_client(int action)
{
@@ -278,7 +278,7 @@ void proto_send_newtux_server(int type, client_t *client, tux_t *tux)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_newtux_client(char *msg)
{
@@ -343,7 +343,7 @@ void proto_send_kill_server(int type, client_t *client, tux_t *tux)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_kill_client(char *msg)
{
@@ -376,7 +376,7 @@ void proto_send_score_server(int type, client_t *client, tux_t *tux)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_score_client(char *msg)
{
@@ -415,7 +415,7 @@ void proto_send_deltux_server(int type, client_t *client, client_t *client2)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_deltux_client(char *msg)
{
@@ -462,7 +462,7 @@ void proto_send_additem_server(int type, client_t *client, item_t *p)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_additem_client(char *msg)
{
@@ -514,7 +514,7 @@ void proto_send_item_server(int type, client_t *client, tux_t *tux, item_t *item
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_item_client(char *msg)
{
@@ -569,7 +569,7 @@ void proto_send_shot_server(int type, client_t *client, shot_t *p)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_shot_client(char *msg)
{
@@ -598,7 +598,7 @@ void proto_recv_shot_client(char *msg)
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_send_ping_client()
{
@@ -613,7 +613,7 @@ void proto_recv_ping_server(client_t *client, char *msg)
{
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_send_end_client()
{
@@ -639,7 +639,7 @@ void proto_send_ping_server(int type, client_t *client)
proto_send(type, client, msg);
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_ping_client(char *msg)
{
@@ -655,7 +655,7 @@ void proto_send_end_server(int type, client_t *client)
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void proto_recv_end_client(char *msg)
{
diff --git a/src/server.c b/src/server.c
index 1df2338..bf99659 100644
--- a/src/server.c
+++ b/src/server.c
@@ -20,11 +20,11 @@
#include "myTimer.h"
#include "net_multiplayer.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "screen_world.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
@@ -286,7 +286,7 @@ void sendInfoCreateClient(client_t *client)
proto_send_init_server(PROTO_SEND_ONE, client, client);
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
proto_send_newtux_server(PROTO_SEND_ONE, client,
(tux_t *)(getWorldArena()->listTux->list[SERVER_INDEX_ROOT_TUX]) );
#endif
@@ -553,7 +553,7 @@ void eventPeriodicSyncClient()
{
proto_send_ping_server(PROTO_SEND_ONE, thisClientSend);
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
proto_send_newtux_server(PROTO_SEND_ONE, thisClientSend,
(tux_t *)(getWorldArena()->listTux->list[SERVER_INDEX_ROOT_TUX]));
#endif
@@ -664,12 +664,12 @@ void selectServerUdpSocket()
int max_fd;
int ret;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
tv.tv_sec = 0;
tv.tv_usec = 0;
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
tv.tv_sec = 0;
tv.tv_usec = 5000;
#endif
diff --git a/src/shot.c b/src/shot.c
index f9cfdb1..4b45c35 100644
--- a/src/shot.c
+++ b/src/shot.c
@@ -9,17 +9,17 @@
#include "net_multiplayer.h"
#include "proto.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "image.h"
#include "screen_world.h"
#include "layer.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
static SDL_Surface *g_shot_simple;
static SDL_Surface *g_shot_lasserX;
@@ -36,11 +36,11 @@ bool_t isShotInicialized()
void initShot()
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
assert( isImageInicialized() == TRUE );
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
g_shot_simple = addImageData("shot.png", IMAGE_ALPHA, "shot", IMAGE_GROUP_BASE);
g_shot_lasserX = addImageData("lasserX.png", IMAGE_NO_ALPHA, "lasserX", IMAGE_GROUP_BASE);
@@ -76,7 +76,7 @@ shot_t* newShot(int x,int y, int px, int py, int gun, tux_t *author)
case GUN_SIMPLE :
new->w = GUN_SHOT_WIDTH;
new->h = GUN_SHOT_HEIGHT;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = g_shot_simple;
#endif
break;
@@ -88,7 +88,7 @@ shot_t* newShot(int x,int y, int px, int py, int gun, tux_t *author)
case TUX_LEFT :
new->w = GUN_LASSER_HORIZONTAL;
new->h = GUN_SHOT_VERTICAL;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = g_shot_lasserX;
#endif
break;
@@ -96,7 +96,7 @@ shot_t* newShot(int x,int y, int px, int py, int gun, tux_t *author)
case TUX_DOWN :
new->w = GUN_SHOT_VERTICAL;
new->h = GUN_LASSER_HORIZONTAL;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = g_shot_lasserY;
#endif
break;
@@ -111,7 +111,7 @@ shot_t* newShot(int x,int y, int px, int py, int gun, tux_t *author)
return new;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void drawShot(shot_t *p)
{
@@ -201,7 +201,7 @@ void transformOnlyLasser(shot_t *shot)
case TUX_LEFT :
shot->w = GUN_LASSER_HORIZONTAL;
shot->h = GUN_SHOT_VERTICAL;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
shot->img = g_shot_lasserX;
#endif
break;
@@ -209,7 +209,7 @@ void transformOnlyLasser(shot_t *shot)
case TUX_DOWN :
shot->w = GUN_SHOT_VERTICAL;
shot->h = GUN_LASSER_HORIZONTAL;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
shot->img = g_shot_lasserY;
#endif
break;
diff --git a/src/teleport.c b/src/teleport.c
index 397acb7..da7b740 100644
--- a/src/teleport.c
+++ b/src/teleport.c
@@ -9,27 +9,27 @@
#include "net_multiplayer.h"
#include "proto.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "layer.h"
#include "screen_world.h"
#include "sound.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img)
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
teleport_t* newTeleport(int x, int y, int w, int h, int layer)
#endif
{
teleport_t *new;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
assert( img != NULL );
#endif
@@ -41,13 +41,13 @@ teleport_t* newTeleport(int x, int y, int w, int h, int layer)
new->w = w;
new->h = h;
new->layer = layer;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = img;
#endif
return new;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void drawTeleport(teleport_t *p)
{
@@ -217,7 +217,7 @@ 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
+#ifndef PUBLIC_SERVER
playSound("teleport", SOUND_GROUP_BASE);
#endif
if( getNetTypeGame() == NET_GAME_TYPE_SERVER )
diff --git a/src/tux.c b/src/tux.c
index 4bcf739..589e5af 100644
--- a/src/tux.c
+++ b/src/tux.c
@@ -18,7 +18,7 @@
#include "dynamicInt.h"
#include "proto.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "image.h"
#include "sound.h"
#include "layer.h"
@@ -26,11 +26,11 @@
#include "term.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
static SDL_Surface *g_tux_up;
static SDL_Surface *g_tux_right;
@@ -49,11 +49,11 @@ bool_t isTuxInicialized()
void initTux()
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
assert( isImageInicialized() == TRUE );
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
g_tux_up = addImageData("tux8.png", IMAGE_ALPHA, "tux8", IMAGE_GROUP_BASE);
g_tux_right = addImageData("tux6.png", IMAGE_ALPHA, "tux6", IMAGE_GROUP_BASE);
g_tux_left = addImageData("tux4.png", IMAGE_ALPHA, "tux4", IMAGE_GROUP_BASE);
@@ -147,7 +147,7 @@ void getCourse(int n, int *x, int *y)
}
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void drawTux(tux_t *tux)
{
@@ -361,7 +361,7 @@ static void timer_tuxCanSwitchGun(void *p)
void eventTuxIsDead(tux_t *tux)
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
#endif
@@ -370,7 +370,7 @@ void eventTuxIsDead(tux_t *tux)
return;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(msg, "tux with id %d is dead\n", tux->id);
playSound("dead", SOUND_GROUP_BASE);
appendTextInTerm(msg);
@@ -403,7 +403,7 @@ static void eventTuxIsDeadWIthShot(tux_t *tux, shot_t *shot)
{
if( shot->author != NULL && shot->author != tux )
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char term_msg[STR_SIZE];
sprintf(term_msg, "tux with id %d set score to %d\n",
@@ -426,11 +426,11 @@ static void eventTuxIsDeadWIthShot(tux_t *tux, shot_t *shot)
void tuxTeleport(tux_t *tux)
{
int x, y;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
#endif
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(msg, "tux with id %d teleporting\n", tux->id);
playSound("teleport", SOUND_GROUP_BASE);
appendTextInTerm(msg);
@@ -592,7 +592,7 @@ void moveTux(tux_t *tux, int n)
void switchTuxGun(tux_t *tux)
{
int i;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
#endif
@@ -609,7 +609,7 @@ void switchTuxGun(tux_t *tux)
tux->gun = i;
tux->isCanSwitchGun = FALSE;
addTimer(timer_tuxCanSwitchGun, newInt(tux->id), TUX_TIME_CAN_SWITCH_GUN );
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("switch_gun", SOUND_GROUP_BASE);
sprintf(msg, "tux with id %d switch gun\n", tux->id);
appendTextInTerm(msg);
@@ -626,7 +626,7 @@ void switchTuxGun(tux_t *tux)
tux->isCanSwitchGun = FALSE;
addTimer(timer_tuxCanSwitchGun, newInt(tux->id), TUX_TIME_CAN_SWITCH_GUN );
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("switch_gun", SOUND_GROUP_BASE);
sprintf(msg, "tux with id %d switch gun\n", tux->id);
appendTextInTerm(msg);
@@ -647,7 +647,7 @@ void shotTux(tux_t *tux)
return;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
playSound("switch_gun", SOUND_GROUP_BASE);
#endif
@@ -697,7 +697,7 @@ static void pickUpGun(tux_t *tux)
if( tux->pickup_time == TUX_MAX_PICKUP )
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
playSound("switch_gun", SOUND_GROUP_BASE);
sprintf(msg, "tux with id %d pickup\n", tux->id);
@@ -722,7 +722,7 @@ static void eventBonus(tux_t *tux)
if( tux->bonus_time == 0 && getNetTypeGame() != NET_GAME_TYPE_CLIENT )
{
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
char msg[STR_SIZE];
#endif
@@ -739,7 +739,7 @@ static void eventBonus(tux_t *tux)
tux->bonus = BONUS_NONE;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
sprintf(msg, "tux with id %d bonus disabled\n", tux->id);
appendTextInTerm(msg);
#endif
@@ -764,7 +764,7 @@ void eventListTux(list_t *listTux)
thisTux = (tux_t *)listTux->list[i];
assert( thisTux != NULL );
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
tuxControl(thisTux);
#endif
pickUpGun(thisTux);
diff --git a/src/wall.c b/src/wall.c
index 9f7b183..c66b5c6 100644
--- a/src/wall.c
+++ b/src/wall.c
@@ -6,28 +6,28 @@
#include "wall.h"
#include "shot.h"
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
#include "layer.h"
#include "screen_world.h"
#endif
-#ifdef BUBLIC_SERVER
+#ifdef PUBLIC_SERVER
#include "publicServer.h"
#endif
-#ifndef BUBLIC_SERVER
+#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 BUBLIC_SERVER
+#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 BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
assert( img != NULL );
#endif
new = malloc( sizeof(wall_t) );
@@ -40,14 +40,14 @@ wall_t* newWall(int x, int y, int w, int h,
new->img_x = img_x;
new->img_y = img_y;
new->layer = layer;
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
new->img = img;
#endif
return new;
}
-#ifndef BUBLIC_SERVER
+#ifndef PUBLIC_SERVER
void drawWall(wall_t *p)
{