summaryrefslogtreecommitdiff
path: root/src/room.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/room.c')
-rw-r--r--src/room.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/room.c b/src/room.c
index 90c8430..a51c712 100644
--- a/src/room.c
+++ b/src/room.c
@@ -2,13 +2,14 @@
int tt_room_collide(tt_room *room, SDL_Rect *box)
{
- SDL_Rect r = {0, 0, 32, 16};
+ SDL_Rect r = { 0, 0, 32, 16 };
int i, j;
for (i = 0; i != TT_ROOM_H; ++i) {
r.y = 32 * i;
for (j = 0; j != TT_ROOM_W; ++j) {
r.x = 32 * j;
- if (SDL_HasIntersection(box, room->walls[i][j] ? &r : 0)) return 1;
+ if (SDL_HasIntersection(box, room->walls[i][j] ? &r : 0))
+ return 1;
}
}
return 0;