diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.c | 1 | ||||
-rw-r--r-- | src/globals.c | 1 | ||||
-rw-r--r-- | src/globals.h | 1 | ||||
-rw-r--r-- | src/main.c | 2 |
4 files changed, 5 insertions, 0 deletions
@@ -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]; @@ -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(); |