summaryrefslogtreecommitdiff
path: root/src/room.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/room.h')
-rw-r--r--src/room.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/room.h b/src/room.h
index 9d6661a..b4567f2 100644
--- a/src/room.h
+++ b/src/room.h
@@ -3,29 +3,28 @@
#include <SDL2/SDL.h>
+#include "body.h"
-#define TT_ROOM_W 19
-#define TT_ROOM_H 15
+#define TT_ROOM_W 20
+#define TT_ROOM_H 16
typedef struct tt_room {
- char tiletypes[TT_ROOM_H][TT_ROOM_W];
- const SDL_Rect *tiles[TT_ROOM_H][TT_ROOM_W];
- void *bodies[TT_ROOM_H][TT_ROOM_W];
+ SDL_Rect *floor[TT_ROOM_H][TT_ROOM_W];
+ tt_body *walls[TT_ROOM_H][TT_ROOM_W];
+ SDL_Rect *roof[TT_ROOM_H][TT_ROOM_W];
+ tt_body *bodies;
+ int bodies_count;
+ struct tt_room *neighbours[4];
} tt_room;
-tt_room *tt_room_load(char c);
+void tt_room_draw_background(tt_room *room);
+void tt_room_draw_foreground(tt_room *room);
-void tt_room_draw(SDL_Renderer *rdr, SDL_Texture *txr, tt_room *room);
+int tt_room_collide(tt_room *room, SDL_Rect *box);
-/*
-void tt_room_rtol(SDL_Renderer *rdr, SDL_Texture *txr,
- tt_room *right, tt_room *left, int permille);
-
-void tt_room_utod(SDL_Renderer *rdr, SDL_Texture *txr,
- tt_room *up, tt_room *down, int permille);
-*/
+int tt_room_out(tt_room *room, SDL_Rect *box);
#endif