diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-01 16:52:23 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-01 16:52:23 +0300 |
commit | 59096860aa1b293e7bb8af6e372482b7277038a0 (patch) | |
tree | 21e4f31124363ecfd4fcc6f9597d871c083d2d66 /src/game.c | |
parent | 0e2480485a2353609dc070fbda8649bef884afb0 (diff) | |
download | takethis-59096860aa1b293e7bb8af6e372482b7277038a0.tar takethis-59096860aa1b293e7bb8af6e372482b7277038a0.tar.xz takethis-59096860aa1b293e7bb8af6e372482b7277038a0.zip |
MAUSOLEUM
Diffstat (limited to 'src/game.c')
-rw-r--r-- | src/game.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 }; |