summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-01 16:52:23 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-01 16:52:23 +0300
commit59096860aa1b293e7bb8af6e372482b7277038a0 (patch)
tree21e4f31124363ecfd4fcc6f9597d871c083d2d66 /src/game.c
parent0e2480485a2353609dc070fbda8649bef884afb0 (diff)
downloadtakethis-59096860aa1b293e7bb8af6e372482b7277038a0.tar
takethis-59096860aa1b293e7bb8af6e372482b7277038a0.tar.xz
takethis-59096860aa1b293e7bb8af6e372482b7277038a0.zip
MAUSOLEUM
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c8
1 files changed, 7 insertions, 1 deletions
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 };