From 59096860aa1b293e7bb8af6e372482b7277038a0 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Mon, 1 Mar 2021 16:52:23 +0300 Subject: MAUSOLEUM --- src/game.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index 300f750..b39a140 100644 --- a/src/game.c +++ b/src/game.c @@ -43,11 +43,17 @@ static void step(int d) { SDL_Rect box = { ttplayer.x, ttplayer.y, 32, 32 }; int out = tt_room_out(ttplayer.room, &box); - if (out) ttplayer.room = ttplayer.room->neighbours[out - 1]; if (out == 1) ttplayer.y = TT_ROOM_H * 32 - 32; else if (out == 2) ttplayer.x = 0; else if (out == 3) ttplayer.y = 0; else if (out == 4) ttplayer.x = TT_ROOM_W * 32 - 32; + if (out) { + ttplayer.room = ttplayer.room->neighbours[out - 1]; + if (ttplayer.room == ttmap + 'L') { + ttplayer.y -= 32; + Mix_PlayMusic(lenin, -1); + } + } } { SDL_Rect box = { ttplayer.x, ttplayer.y, 32, 32 }; -- cgit v1.2.3