summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/ussr.oggbin0 -> 1465633 bytes
-rw-r--r--src/game.c1
-rw-r--r--src/globals.c1
-rw-r--r--src/globals.h1
-rw-r--r--src/main.c2
5 files changed, 5 insertions, 0 deletions
diff --git a/data/ussr.ogg b/data/ussr.ogg
new file mode 100644
index 0000000..45ade07
--- /dev/null
+++ b/data/ussr.ogg
Binary files differ
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();