From a365de1b0ab91f9c057196a601d96d2aed6e48fb Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Sun, 28 Feb 2021 23:29:25 +0300 Subject: o_O --- src/room.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/room.h') 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 +#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 -- cgit v1.2.3