diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.c | 5 | ||||
-rw-r--r-- | src/globals.c | 1 | ||||
-rw-r--r-- | src/globals.h | 1 | ||||
-rw-r--r-- | src/main.c | 2 |
4 files changed, 9 insertions, 0 deletions
@@ -15,7 +15,12 @@ static void step(int d) if (xw || yw) { ttplayer.rem += d; } + static int first_gulag = 1; if (ttplayer.tobein_gulag && ttplayer.until_gulag > 0) { + if (first_gulag) { + first_gulag = 0; + Mix_PlayMusic(stalin, -1); + } ttplayer.until_gulag -= d; if (ttplayer.until_gulag <= 0) { ttplayer.room = ttmap + 'G'; diff --git a/src/globals.c b/src/globals.c index 79d9922..54c0adf 100644 --- a/src/globals.c +++ b/src/globals.c @@ -9,6 +9,7 @@ SDL_Renderer *ttrdr; Mix_Music *ponpon; Mix_Music *ussr; +Mix_Music *stalin; tt_room ttmap[256]; diff --git a/src/globals.h b/src/globals.h index f189be1..b44cddc 100644 --- a/src/globals.h +++ b/src/globals.h @@ -17,6 +17,7 @@ extern SDL_Renderer *ttrdr; extern Mix_Music *ponpon; extern Mix_Music *ussr; +extern Mix_Music *stalin; extern tt_room ttmap[256]; @@ -32,6 +32,7 @@ int main(int argc, char **argv) ttfont = TTF_OpenFont("data/font.otf", 24); ponpon = Mix_LoadMUS("data/ponpon.ogg"); ussr = Mix_LoadMUS("data/ussr.ogg"); + stalin = Mix_LoadMUS("data/stalin.ogg"); tt_map_load(); srand(time(0)); @@ -45,6 +46,7 @@ int main(int argc, char **argv) SDL_DestroyRenderer(ttrdr); SDL_DestroyWindow(wdw); Mix_HaltMusic(); + Mix_FreeMusic(stalin); Mix_FreeMusic(ussr); Mix_FreeMusic(ponpon); Mix_CloseAudio(); |