summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/arena.c39
-rw-r--r--src/base/item.c2
-rw-r--r--src/base/proto.c9
-rw-r--r--src/base/tux.c7
4 files changed, 6 insertions, 51 deletions
diff --git a/src/base/arena.c b/src/base/arena.c
index 89b8e05..6d883b3 100644
--- a/src/base/arena.c
+++ b/src/base/arena.c
@@ -127,27 +127,12 @@ int arena_conflict_space(int x1, int y1, int w1, int h1, int x2, int y2, int w2,
int arena_is_free_space(arena_t *arena, int x, int y, int w, int h)
{
- if (x < 0 || y < 0 || x + w > arena->w || y + h > arena->h) {
- return 0;
- }
-
- if (space_is_conflict_with_object(arena->spaceTux, x, y, w, h)) {
- return 0;
- }
-
- if (space_is_conflict_with_object(arena->spaceShot, x, y, w, h)) {
- return 0;
- }
-
- if (space_is_conflict_with_object(arena->spaceItem, x, y, w, h)) {
- return 0;
- }
-
- if (space_is_conflict_with_object(arena->spaceShot, x, y, w, h)) {
- return 0;
- }
-
- if (module_is_conflict(x, y, w, h)) {
+ if ((x < 0 || y < 0 || x + w > arena->w || y + h > arena->h) ||
+ space_is_conflict_with_object(arena->spaceTux, x, y, w, h) ||
+ space_is_conflict_with_object(arena->spaceShot, x, y, w, h) ||
+ space_is_conflict_with_object(arena->spaceItem, x, y, w, h) ||
+ space_is_conflict_with_object(arena->spaceShot, x, y, w, h) ||
+ module_is_conflict(x, y, w, h)) {
return 0;
}
@@ -223,25 +208,16 @@ 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)
{
- UNUSED(space);
- UNUSED(p);
-
tux_draw(tux);
}
static void action_item_draw(space_t *space, item_t *item, void *p)
{
- UNUSED(space);
- UNUSED(p);
-
item_draw(item);
}
static void action_shot_draw(space_t *space, shot_t *shot, void *p)
{
- UNUSED(space);
- UNUSED(p);
-
shot_draw(shot);
}
@@ -382,9 +358,6 @@ void arena_draw(arena_t *arena)
static void action_tux(space_t *space, tux_t *tux, void *p)
{
- UNUSED(space);
- UNUSED(p);
-
tux_event(tux);
}
diff --git a/src/base/item.c b/src/base/item.c
index 0a3a58f..66d69e2 100644
--- a/src/base/item.c
+++ b/src/base/item.c
@@ -278,8 +278,6 @@ static void action_itemevent(space_t *space, item_t *item, void *p)
{
my_time_t currentTime;
- UNUSED(p);
-
currentTime = timer_get_current_time();
item->count++;
diff --git a/src/base/proto.c b/src/base/proto.c
index f3f66ff..4a9e2bb 100644
--- a/src/base/proto.c
+++ b/src/base/proto.c
@@ -91,8 +91,6 @@ void proto_send_hello_client(char *name)
static void action_sendItem(space_t *space, item_t *item, client_t *client)
{
- UNUSED(space);
-
proto_send_additem_server(PROTO_SEND_ONE, client, item);
}
@@ -233,8 +231,6 @@ void proto_send_status_server(int type, client_t *client)
void proto_recv_status_server(client_t *client, char *msg)
{
- UNUSED(msg);
-
proto_send_status_server(PROTO_SEND_ONE, client);
}
@@ -842,8 +838,6 @@ void proto_send_module_client(char *msg)
void proto_recv_module_server(client_t *client, char *msg)
{
- UNUSED(client);
-
module_recv_msg(msg + 7);
}
@@ -878,8 +872,6 @@ void proto_send_ping_client()
void proto_recv_ping_server(client_t *client, char *msg)
{
- UNUSED(client);
- UNUSED(msg);
}
void proto_send_ping_server(int type, client_t *client)
@@ -893,7 +885,6 @@ void proto_send_ping_server(int type, client_t *client)
#ifndef PUBLIC_SERVER
void proto_recv_ping_client(char *msg)
{
- UNUSED(msg);
}
#endif /* PUBLIC_SERVER */
diff --git a/src/base/tux.c b/src/base/tux.c
index 33984f7..f88d6a4 100644
--- a/src/base/tux.c
+++ b/src/base/tux.c
@@ -405,8 +405,6 @@ static void bombBallExplosion(shot_t *shot)
static void action_tux(space_t *space, tux_t *tux, shot_t *shot)
{
- UNUSED(space);
-
if (tux->status == TUX_STATUS_ALIVE) {
if (shot->author_id == tux->id && shot->isCanKillAuthor == FALSE) {
return;
@@ -736,17 +734,12 @@ void tux_set_status(void *p, int x, int y, int w, int h)
{
tux_t *tux;
- UNUSED(w);
- UNUSED(h);
-
tux = p;
tux_set_proportion(tux, x, y);
}
static void action_checkMine(space_t *space, item_t *item, tux_t *tux)
{
- UNUSED(space);
-
if (item->type == ITEM_MINE && item->author_id == tux->id) {
item->author_id = ID_UNKNOWN;
}