Re: [Super-tux-devel] sound.h and sound.c
Brought to you by:
wkendrick
From: Tobias <tob...@gm...> - 2003-12-21 14:28:14
|
It is commited. ;) Thanks for your patch, it was a child's play this time. Greetz... Tobias Gläßer Am So, den 21.12.2003 schrieb Duong-Khang NGUYEN um 07:36: > Hmm, I have just looked at the "sound.h" and "sound.c" today. And I discover > that there'r still some of these functions in "gameloop.c": > > int Mix_PlayingMusic(); > void Mix_HaltMusic(); > int Mix_PlayMusic(); > void Mix_FreeMusic(); > void Mix_FreeChunk(); > int Mix_OpenAudio(int a, int b, int c, int d); > > They must not exist anywhere else but in "sound.c" only ! Nobody else should > know about the SDL_Mixer exept the sound.c. The following functions (from > sound.h) must be used instead of those above. > > Mix_Chunk * load_sound(char * file); > void play_sound(Mix_Chunk * snd); > Mix_Music * load_song(char * file); > int playing_music(void); > int halt_music(void); > int play_music(Mix_Music*music, int loops); > void free_music(Mix_Music*music); > void free_chunk(Mix_Chunk*chunk); > int open_audio(int a, int b, int c, int d); > > > Added: > Primilary DEBUG_MSG macro > Modifed Makefile for supporting the -DDEBUG > > Changes: > playsound() replaced by play_sound(): I tried to keep everything uniform :-D > gameloop.c exit immediately if it can not open a level file. > > > Duong-Khang NGUYEN, who comes from C++ and thinks that "encapsulation" is his > friend ! (wink at Tobias) > > > -- |