From c47781a9d908536ef3283d4a57c91003013f05d3 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Mon, 1 Mar 2021 13:10:06 +0300 Subject: The GIMN. --- src/game.c | 1 + src/globals.c | 1 + src/globals.h | 1 + src/main.c | 2 ++ 4 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/game.c b/src/game.c index a4b4924..599fd50 100644 --- a/src/game.c +++ b/src/game.c @@ -19,6 +19,7 @@ static void step(int d) ttplayer.until_gulag -= d; if (ttplayer.until_gulag <= 0) { ttplayer.room = ttmap + 'G'; + Mix_PlayMusic(ussr, -1); } } if (xw && yw) { diff --git a/src/globals.c b/src/globals.c index 0a95a00..79d9922 100644 --- a/src/globals.c +++ b/src/globals.c @@ -8,6 +8,7 @@ SDL_Texture *tttxr; SDL_Renderer *ttrdr; Mix_Music *ponpon; +Mix_Music *ussr; tt_room ttmap[256]; diff --git a/src/globals.h b/src/globals.h index e4d03a1..f189be1 100644 --- a/src/globals.h +++ b/src/globals.h @@ -16,6 +16,7 @@ extern SDL_Texture *tttxr; extern SDL_Renderer *ttrdr; extern Mix_Music *ponpon; +extern Mix_Music *ussr; extern tt_room ttmap[256]; diff --git a/src/main.c b/src/main.c index 01756ae..a71312b 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,7 @@ int main(int argc, char **argv) tttxr = loadtxr("data/txr.bmp"); ttfont = TTF_OpenFont("data/font.otf", 24); ponpon = Mix_LoadMUS("data/ponpon.ogg"); + ussr = Mix_LoadMUS("data/ussr.ogg"); tt_map_load(); srand(time(0)); @@ -44,6 +45,7 @@ int main(int argc, char **argv) SDL_DestroyRenderer(ttrdr); SDL_DestroyWindow(wdw); Mix_HaltMusic(); + Mix_FreeMusic(ussr); Mix_FreeMusic(ponpon); Mix_CloseAudio(); TTF_Quit(); -- cgit v1.2.3