summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/base/arena.c12
-rw-r--r--src/base/item.c2
-rw-r--r--src/base/main.h2
-rw-r--r--src/base/proto.c9
-rw-r--r--src/base/server.c6
-rw-r--r--src/base/shot.c4
-rw-r--r--src/base/tux.c9
-rw-r--r--src/client/interface.c3
-rw-r--r--src/client/saveLoad.c12
-rw-r--r--src/client/term.c3
-rw-r--r--src/modules/modAI.c20
-rw-r--r--src/modules/modBasic.c5
-rw-r--r--src/modules/modMove.c11
-rw-r--r--src/modules/modPipe.c7
-rw-r--r--src/modules/modTeleport.c32
-rw-r--r--src/modules/modWall.c12
-rw-r--r--src/screen/world.c3
17 files changed, 137 insertions, 15 deletions
diff --git a/src/base/arena.c b/src/base/arena.c
index 868d6bb..4f9f51f 100644
--- a/src/base/arena.c
+++ b/src/base/arena.c
@@ -222,16 +222,25 @@ static void drawBackground(arena_t * arena, int screen_x, int screen_y)
static void action_tux_draw(space_t * space, tux_t * tux, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
tux_draw(tux);
}
static void action_item_draw(space_t * space, item_t * item, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
item_draw(item);
}
static void action_shot_draw(space_t * space, shot_t * shot, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
shot_draw(shot);
}
@@ -372,6 +381,9 @@ void arena_draw(arena_t * arena)
static void action_tux(space_t * space, tux_t * tux, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
tux_event(tux);
}
diff --git a/src/base/item.c b/src/base/item.c
index b7299c5..8de0e37 100644
--- a/src/base/item.c
+++ b/src/base/item.c
@@ -280,6 +280,8 @@ static void action_itemevent(space_t * space, item_t * item, void *p)
{
my_time_t currentTime;
+ UNUSET(p);
+
currentTime = timer_get_current_time();
item->count++;
diff --git a/src/base/main.h b/src/base/main.h
index c938eb5..f935972 100644
--- a/src/base/main.h
+++ b/src/base/main.h
@@ -28,6 +28,8 @@
#define DEBUG_MSG(msg,arg...)
#endif
+#define UNUSET(var) if( 0 && var ){}
+
extern char *getParam(char *s);
extern char *getParamElse(char *s1, char *s2);
diff --git a/src/base/proto.c b/src/base/proto.c
index 3038cd8..b1a6799 100644
--- a/src/base/proto.c
+++ b/src/base/proto.c
@@ -100,6 +100,8 @@ void proto_send_hello_client(char *name)
static void action_sendItem(space_t * space, item_t * item, client_t * client)
{
+ UNUSET(space);
+
proto_send_additem_server(PROTO_SEND_ONE, client, item);
}
@@ -242,6 +244,8 @@ void proto_send_status_server(int type, client_t * client)
void proto_recv_status_server(client_t * client, char *msg)
{
+ UNUSET(msg);
+
proto_send_status_server(PROTO_SEND_ONE, client);
}
@@ -878,6 +882,8 @@ void proto_send_module_client(char *msg)
void proto_recv_module_server(client_t * client, char *msg)
{
+ UNUSET(client);
+
module_recv_msg(msg + 7);
}
@@ -917,6 +923,8 @@ void proto_send_ping_client()
void proto_recv_ping_server(client_t * client, char *msg)
{
+ UNUSET(client);
+ UNUSET(msg);
}
void proto_send_ping_server(int type, client_t * client)
@@ -931,6 +939,7 @@ void proto_send_ping_server(int type, client_t * client)
void proto_recv_ping_client(char *msg)
{
+ UNUSET(msg);
}
#endif
diff --git a/src/base/server.c b/src/base/server.c
index bbaf71d..6eeab70 100644
--- a/src/base/server.c
+++ b/src/base/server.c
@@ -162,6 +162,8 @@ static void delZombieCLient(void *p_nothink)
my_time_t currentTime;
int i;
+ UNUSET(p_nothink);
+
currentTime = timer_get_current_time();
for (i = 0; i < listClient->count; i++) {
@@ -190,6 +192,8 @@ static void eventPeriodicSyncClient(void *p_nothink)
tux_t *thisTux;
int i;
+ UNUSET(p_nothink);
+
#ifndef PUBLIC_SERVER
proto_send_newtux_server(PROTO_SEND_ALL_SEES_TUX, NULL, world_get_control_tux(TUX_CONTROL_KEYBOARD_RIGHT));
#endif
@@ -209,6 +213,8 @@ static void eventPeriodicSyncClient(void *p_nothink)
static void eventSendPingClients(void *p_nothink)
{
+ UNUSET(p_nothink);
+
proto_send_ping_server(PROTO_SEND_ALL, NULL);
}
diff --git a/src/base/shot.c b/src/base/shot.c
index 5d55f82..b19877a 100644
--- a/src/base/shot.c
+++ b/src/base/shot.c
@@ -262,6 +262,8 @@ static void action_moveShot(space_t * space, shot_t * shot, void *p)
int new_x, new_y;
arena_t *arena;
+ UNUSET(p);
+
arena = arena_get_current();
new_x = shot->x + shot->px;
@@ -295,6 +297,8 @@ static int isValueInList(list_t * list, int x)
static void action_check(space_t * space, shot_t * shot, client_t * client)
{
+ UNUSET(space);
+
if (isValueInList(client->listSeesShot, shot->id) == 0) {
list_add(client->listSeesShot, newInt(shot->id));
proto_send_shot_server(PROTO_SEND_ONE, client, shot);
diff --git a/src/base/tux.c b/src/base/tux.c
index 5a10c7a..d8fff10 100644
--- a/src/base/tux.c
+++ b/src/base/tux.c
@@ -409,6 +409,8 @@ static void action_tux(space_t * space, tux_t * tux, shot_t * shot)
{
arena_t *arena;
+ UNUSET(space);
+
arena = arena_get_current();
if (tux->status == TUX_STATUS_ALIVE) {
@@ -443,6 +445,8 @@ static void action_tux(space_t * space, tux_t * tux, shot_t * shot)
static void action_shot(space_t * space, shot_t * shot, space_t * spaceTux)
{
+ UNUSET(space);
+
space_action_from_location(spaceTux, action_tux, shot, shot->x, shot->y, shot->w, shot->h);
}
@@ -721,12 +725,17 @@ void tux_set_status(void *p, int x, int y, int w, int h)
{
tux_t *tux;
+ UNUSET(w);
+ UNUSET(h);
+
tux = p;
tux_set_proportion(tux, x, y);
}
static void action_checkMine(space_t * space, item_t * item, tux_t * tux)
{
+ UNUSET(space);
+
if (item->type == ITEM_MINE && item->author_id == tux->id) {
item->author_id = ID_UNKNOWN;
}
diff --git a/src/client/interface.c b/src/client/interface.c
index ab374b5..52c368b 100644
--- a/src/client/interface.c
+++ b/src/client/interface.c
@@ -38,6 +38,9 @@ bool_t interface_is_inicialized()
static Uint32 TimerCallback(Uint32 interval, void *param)
{
SDL_Event event;
+
+ UNUSET(param);
+
event.type = SDL_USEREVENT;
event.user.code = USR_EVT_TIMER;
event.user.data1 = NULL;
diff --git a/src/client/saveLoad.c b/src/client/saveLoad.c
index 57661e6..5d1685a 100644
--- a/src/client/saveLoad.c
+++ b/src/client/saveLoad.c
@@ -23,6 +23,8 @@ static void action_saveTux(space_t * space, tux_t * tux, textFile_t * textFile)
{
char str[STR_PROTO_SIZE];
+ UNUSET(space);
+
snprintf(str, STR_PROTO_SIZE,
"TUX %d %d %d %d %d %d %d %d %s %d %d %d %d %d %d %d %d %d %d %d",
tux->id, tux->x, tux->y, tux->status, tux->position,
@@ -35,11 +37,12 @@ static void action_saveTux(space_t * space, tux_t * tux, textFile_t * textFile)
list_add(textFile->text, strdup(str));
}
-static void
-action_saveShot(space_t * space, shot_t * shot, textFile_t * textFile)
+static void action_saveShot(space_t * space, shot_t * shot, textFile_t * textFile)
{
char str[STR_PROTO_SIZE];
+ UNUSET(space);
+
snprintf(str, STR_PROTO_SIZE, "SHOT %d %d %d %d %d %d %d %d %d",
shot->id, shot->x, shot->y, shot->px, shot->py,
shot->position, shot->gun, shot->author_id,
@@ -48,11 +51,12 @@ action_saveShot(space_t * space, shot_t * shot, textFile_t * textFile)
list_add(textFile->text, strdup(str));
}
-static void
-action_saveItem(space_t * space, item_t * item, textFile_t * textFile)
+static void action_saveItem(space_t * space, item_t * item, textFile_t * textFile)
{
char str[STR_PROTO_SIZE];
+ UNUSET(space);
+
snprintf(str, STR_PROTO_SIZE, "ITEM %d %d %d %d %d %d %d",
item->id, item->type, item->x, item->y,
item->count, item->frame, item->author_id);
diff --git a/src/client/term.c b/src/client/term.c
index 7cfb346..50a7580 100644
--- a/src/client/term.c
+++ b/src/client/term.c
@@ -77,6 +77,9 @@ static void action_refreshTerm(space_t * space, tux_t * tux, void *p)
{
char str[STR_SIZE];
+ UNUSET(space);
+ UNUSET(p);
+
sprintf(str,
"name: %s "
"score: %d "
diff --git a/src/modules/modAI.c b/src/modules/modAI.c
index f084933..63b94c8 100644
--- a/src/modules/modAI.c
+++ b/src/modules/modAI.c
@@ -48,6 +48,9 @@ alternative_t *cloneAlternative(alternative_t * p, int route, int x, int y)
assert(p != NULL);
+ UNUSET(x);
+ UNUSET(y);
+
new = newAlternative(route, p->x, p->y);
new->first = p->first;
new->step = p->step;
@@ -118,6 +121,7 @@ void destroyAlternative(alternative_t * p)
static void cmd_ai(char *line)
{
+ UNUSET(line);
}
int init(export_fce_t * p)
@@ -130,6 +134,11 @@ int init(export_fce_t * p)
#ifndef PUBLIC_SERVER
int draw(int x, int y, int w, int h)
{
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
+
return 0;
}
#endif
@@ -158,6 +167,8 @@ static void shotTux(arena_t * arena, tux_t * tux_ai, tux_t * tux_rival)
int x_rival, y_rival;
int w, h;
+ UNUSET(arena);
+
export_fce->fce_tux_get_proportion(tux_ai, &x_ai, &y_ai, &w, &h);
export_fce->fce_tux_get_proportion(tux_rival, &x_rival, &y_rival, &w, &h);
@@ -325,6 +336,9 @@ static void tux_eventAI(tux_t * tux)
static void action_tuxAI(space_t * space, tux_t * tux, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
if (tux->control == TUX_CONTROL_AI && tux->status == TUX_STATUS_ALIVE) {
tux_eventAI(tux);
}
@@ -380,6 +394,11 @@ int event()
int isConflict(int x, int y, int w, int h)
{
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
+
return 0;
}
@@ -391,6 +410,7 @@ void cmdArena(char *line)
void recvMsg(char *msg)
{
+ UNUSET(msg);
}
int destroy()
diff --git a/src/modules/modBasic.c b/src/modules/modBasic.c
index 7bddd7a..012466e 100644
--- a/src/modules/modBasic.c
+++ b/src/modules/modBasic.c
@@ -35,6 +35,11 @@ int init(export_fce_t * p)
int draw(int x, int y, int w, int h)
{
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
+
printf("Drawing Basic module.\n");
return 0;
}
diff --git a/src/modules/modMove.c b/src/modules/modMove.c
index 552e6bd..231a827 100644
--- a/src/modules/modMove.c
+++ b/src/modules/modMove.c
@@ -226,6 +226,11 @@ static void proto_moveshot(char *msg)
int draw(int x, int y, int w, int h)
{
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
+
return 0;
}
@@ -238,11 +243,17 @@ int event()
int isConflict(int x, int y, int w, int h)
{
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
+
return 0;
}
void cmdArena(char *line)
{
+ UNUSET(line);
}
void recvMsg(char *msg)
diff --git a/src/modules/modPipe.c b/src/modules/modPipe.c
index 1759fc5..19c840d 100644
--- a/src/modules/modPipe.c
+++ b/src/modules/modPipe.c
@@ -221,6 +221,9 @@ int init(export_fce_t * p)
static void action_drawpipe(space_t * space, pipe_t * pipe, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
drawPipe(pipe);
}
@@ -296,6 +299,8 @@ static void action_eventpipe(space_t * space, pipe_t * pipe, shot_t * shot)
arena_t *arena;
tux_t *author;
+ UNUSET(space);
+
arena = export_fce->fce_arena_get_current();
author = space_get_object_id(arena->spaceTux, shot->author_id);
@@ -365,7 +370,7 @@ void cmdArena(char *line)
void recvMsg(char *msg)
{
-
+ UNUSET(msg);
}
int destroy()
diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c
index 4d3a9ca..301a368 100644
--- a/src/modules/modTeleport.c
+++ b/src/modules/modTeleport.c
@@ -249,9 +249,11 @@ int init(export_fce_t * p)
#ifndef PUBLIC_SERVER
-static void
-action_drawteleport(space_t * space, teleport_t * teleport, void *p)
+static void action_drawteleport(space_t * space, teleport_t * teleport, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
drawTeleport(teleport);
}
@@ -268,12 +270,13 @@ int draw(int x, int y, int w, int h)
}
#endif
-static void
-action_eventteleportshot(space_t * space, teleport_t * teleport, shot_t * shot)
+static void action_eventteleportshot(space_t * space, teleport_t * teleport, shot_t * shot)
{
arena_t *arena;
tux_t *author;
+ UNUSET(space);
+
arena = export_fce->fce_arena_get_current();
author = space_get_object_id(arena->spaceTux, shot->author_id);
@@ -286,24 +289,27 @@ action_eventteleportshot(space_t * space, teleport_t * teleport, shot_t * shot)
moveShotFromTeleport(shot, teleport, spaceTeleport);
}
-static void
-action_eventshot(space_t * space, shot_t * shot, space_t * p_spaceTeleport)
+static void action_eventshot(space_t * space, shot_t * shot, space_t * p_spaceTeleport)
{
+ UNUSET(space);
+
space_action_from_location(p_spaceTeleport, action_eventteleportshot, shot,
shot->x, shot->y, shot->w, shot->h);
}
-static void
-action_eventteleporttux(space_t * space, teleport_t * teleport, tux_t * tux)
+static void action_eventteleporttux(space_t * space, teleport_t * teleport, tux_t * tux)
{
+ UNUSET(space);
+
teleportTux(tux, teleport);
}
-static void
-action_eventtux(space_t * space, tux_t * tux, space_t * p_spaceTeleport)
+static void action_eventtux(space_t * space, tux_t * tux, space_t * p_spaceTeleport)
{
int x, y, w, h;
+ UNUSET(space);
+
export_fce->fce_tux_get_proportion(tux, &x, &y, &w, &h);
space_action_from_location(p_spaceTeleport, action_eventteleporttux, tux, x, y,
@@ -330,6 +336,11 @@ int event()
int isConflict(int x, int y, int w, int h)
{
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
+
if (spaceTeleport == NULL) {
return 0;
}
@@ -345,6 +356,7 @@ void cmdArena(char *line)
void recvMsg(char *msg)
{
+ UNUSET(msg);
}
int destroy()
diff --git a/src/modules/modWall.c b/src/modules/modWall.c
index 966edcd..6e9b54f 100644
--- a/src/modules/modWall.c
+++ b/src/modules/modWall.c
@@ -157,6 +157,11 @@ static void getStatusImgWall(void *p, int *id, int *x, int *y, int *w, int *h)
static void setStatusImgWall(void *p, int x, int y, int w, int h)
{
+ UNUSET(p);
+ UNUSET(x);
+ UNUSET(y);
+ UNUSET(w);
+ UNUSET(h);
}
#endif
@@ -253,6 +258,9 @@ int init(export_fce_t * p)
static void action_drawwall(space_t * space, wall_t * wall, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
drawWall(wall);
}
@@ -275,6 +283,9 @@ static void action_eventwall(space_t * space, wall_t * wall, shot_t * shot)
arena_t *arena;
tux_t *author;
+ UNUSET(space);
+ UNUSET(wall);
+
arena = export_fce->fce_arena_get_current();
author = space_get_object_id(arena->spaceTux, shot->author_id);
@@ -335,6 +346,7 @@ void cmdArena(char *line)
void recvMsg(char *msg)
{
+ UNUSET(msg);
}
int destroy()
diff --git a/src/screen/world.c b/src/screen/world.c
index 6aee31b..5cfb301 100644
--- a/src/screen/world.c
+++ b/src/screen/world.c
@@ -500,6 +500,9 @@ void startWorld()
static void action_analyze(space_t * space, tux_t * tux, void *p)
{
+ UNUSET(space);
+ UNUSET(p);
+
analyze_add(tux->name, tux->score);
}