summaryrefslogtreecommitdiff
path: root/src/base/arena.c
diff options
context:
space:
mode:
authorMichal Zima <xhire@mujmalysvet.cz>2010-06-18 13:09:40 +0200
committerMichal Zima <xhire@mujmalysvet.cz>2010-06-18 13:09:40 +0200
commite7a6a7a14aeea2ee9f2c235d0cbabf0cb3660e89 (patch)
tree4ab86d23b7470657761d754426bab3645a91bf14 /src/base/arena.c
parent8a278016b0ebe4b2a20348f1ebb2aff3037248c3 (diff)
Wiped out all "UNUSED" stuff
Plus small code cleaning, simplifying of some statements etc.
Diffstat (limited to 'src/base/arena.c')
-rw-r--r--src/base/arena.c39
1 files changed, 6 insertions, 33 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);
}