diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-01 13:18:05 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2021-03-01 13:18:05 +0300 |
commit | bda9513f009aad0c47474942bd875932494da445 (patch) | |
tree | 37743dd6fafa6064490a1c510642d6d21b406306 | |
parent | c47781a9d908536ef3283d4a57c91003013f05d3 (diff) | |
download | takethis-bda9513f009aad0c47474942bd875932494da445.tar takethis-bda9513f009aad0c47474942bd875932494da445.tar.xz takethis-bda9513f009aad0c47474942bd875932494da445.zip |
Stalin shout.
-rw-r--r-- | data/stalin.ogg | bin | 0 -> 16191 bytes | |||
-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 |
5 files changed, 9 insertions, 0 deletions
diff --git a/data/stalin.ogg b/data/stalin.ogg Binary files differnew file mode 100644 index 0000000..05a7364 --- /dev/null +++ b/data/stalin.ogg @@ -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(); |