summaryrefslogtreecommitdiff
path: root/src/room.h
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-02-28 23:29:25 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-02-28 23:29:25 +0300
commita365de1b0ab91f9c057196a601d96d2aed6e48fb (patch)
tree4c3262c1745337dbd4e6c87525edc0532b517963 /src/room.h
parent4cfd9c6b96035ca7ccf6444e911b2a908d8500eb (diff)
downloadtakethis-a365de1b0ab91f9c057196a601d96d2aed6e48fb.tar
takethis-a365de1b0ab91f9c057196a601d96d2aed6e48fb.tar.xz
takethis-a365de1b0ab91f9c057196a601d96d2aed6e48fb.zip
o_O
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