/* ** sdl.c - <+DESC+> ** ** 2014 - Frank Villaro-Dixon */ #include #include #include "SDL/SDL.h" #include "SDL_mixer.h" #include "game.h" void init_SDL(struct s_game *g) { /* initialize SDL */ SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO); /* set the title bar */ SDL_WM_SetCaption("SDL Move", "SDL Move"); /* create window */ g->screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); Mix_OpenAudio(22050,AUDIO_S16SYS,2,640); Mix_Music *mus; mus = Mix_LoadMUS("./mus.mp3"); Mix_PlayMusic(mus,1); }