summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-03-01 13:10:06 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-03-01 13:10:06 +0300
commitc47781a9d908536ef3283d4a57c91003013f05d3 (patch)
tree81bd3923216a6131a84d5fd03930582a19f68156 /src
parent0e9093bfc12b0db01ae04654aec63f1ea86ffb43 (diff)
downloadtakethis-c47781a9d908536ef3283d4a57c91003013f05d3.tar
takethis-c47781a9d908536ef3283d4a57c91003013f05d3.tar.xz
takethis-c47781a9d908536ef3283d4a57c91003013f05d3.zip
The GIMN.
Diffstat (limited to 'src')
-rw-r--r--src/game.c1
-rw-r--r--src/globals.c1
-rw-r--r--src/globals.h1
-rw-r--r--src/main.c2
4 files changed, 5 insertions, 0 deletions
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();