From effc1a3b86df640d31fff0258d12a94ec0e2181e Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Tue, 2 Mar 2021 15:34:56 +0300 Subject: The DOORS! --- src/player.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/player.c') diff --git a/src/player.c b/src/player.c index a1c7dfc..da5c97e 100644 --- a/src/player.c +++ b/src/player.c @@ -47,8 +47,13 @@ void tt_player_draw() (b->txrcol * b->anim + b->rem / b->rate % b->anim) * 16, b->txrrow * 16, 16, 16 }; - SDL_Rect d = { 14 + b->x, 14 + b->y, 32, 32 }; - SDL_RenderCopy(ttrdr, tttxr, &s, &d); + if (b->isdoor) { + SDL_Rect d = { 14 + b->x, 14 + b->y, 32, 32 }; + SDL_RenderCopy(ttrdr, tttxr, &s, &d); + } else { + SDL_Rect d = { 14 + b->x, 14 + b->y, 32, 32 }; + SDL_RenderCopy(ttrdr, tttxr, &s, &d); + } if (b->msg) { SDL_Color c = { 255, 255, 255, 255 }; SDL_Surface *s = TTF_RenderText_Blended(ttfont, b->msg, c); -- cgit v1.2.3