summaryrefslogtreecommitdiff
path: root/src/player.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-02 15:34:56 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-02 15:34:56 +0300
commiteffc1a3b86df640d31fff0258d12a94ec0e2181e (patch)
tree09993d66437d31dead9cd692bda3f3143a68e40a /src/player.c
parent8889468f6af3ad184acfc39e0beaff503b10e3c1 (diff)
downloadtakethis-effc1a3b86df640d31fff0258d12a94ec0e2181e.tar
takethis-effc1a3b86df640d31fff0258d12a94ec0e2181e.tar.xz
takethis-effc1a3b86df640d31fff0258d12a94ec0e2181e.zip
The DOORS!
Diffstat (limited to 'src/player.c')
-rw-r--r--src/player.c9
1 files changed, 7 insertions, 2 deletions
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);