From 0effd8a331b66c3e7ee2411e0675584215367feb Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Tue, 2 Mar 2021 23:02:35 +0300 Subject: HADOUKEN!!! --- src/main.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 65a2850..040ef7a 100644 --- a/src/main.c +++ b/src/main.c @@ -23,19 +23,20 @@ int main(int argc, char **argv) Mix_Init(MIX_INIT_OGG); Mix_OpenAudio(44100, AUDIO_S16SYS, 2, 4096); Mix_AllocateChannels(4); - ttwdw = SDL_CreateWindow("T A K E T H I S", SDL_WINDOWPOS_UNDEFINED, + ttwdw = SDL_CreateWindow("T A K E T H I S", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 950, 540, 0); - ttrdr = SDL_CreateRenderer(ttwdw, -1, SDL_RENDERER_ACCELERATED); - tttxr = loadtxr("data/txr.bmp"); - ttfont = TTF_OpenFont("data/font.otf", 24); - grib = Mix_LoadMUS("data/grib.ogg"); - ussr = Mix_LoadMUS("data/ussr.ogg"); - stalin = Mix_LoadMUS("data/stalin.ogg"); - lenin = Mix_LoadMUS("data/lenin.ogg"); - ttcoin = Mix_LoadWAV("data/coin.wav"); - ttdoor = Mix_LoadWAV("data/door.wav"); - ttlenin = Mix_LoadWAV("data/lenin.wav"); - curmus = 0; + ttrdr = SDL_CreateRenderer(ttwdw, -1, SDL_RENDERER_ACCELERATED); + tttxr = loadtxr("data/txr.bmp"); + ttfont = TTF_OpenFont("data/font.otf", 24); + grib = Mix_LoadMUS("data/grib.ogg"); + ussr = Mix_LoadMUS("data/ussr.ogg"); + stalin = Mix_LoadMUS("data/stalin.ogg"); + lenin = Mix_LoadMUS("data/lenin.ogg"); + ttcoin = Mix_LoadWAV("data/coin.wav"); + ttdoor = Mix_LoadWAV("data/door.wav"); + ttlenin = Mix_LoadWAV("data/lenin.wav"); + tthadouken = Mix_LoadWAV("data/hadouken.wav"); + curmus = 0; tt_map_load(); srand(time(0)); @@ -49,6 +50,7 @@ int main(int argc, char **argv) SDL_DestroyRenderer(ttrdr); SDL_DestroyWindow(ttwdw); Mix_HaltMusic(); + Mix_FreeChunk(tthadouken); Mix_FreeChunk(ttlenin); Mix_FreeChunk(ttcoin); Mix_FreeChunk(ttdoor); -- cgit v1.2.3