Re: [Super-tux-devel] --disable-sound and NOSOUND
Brought to you by:
wkendrick
From: Tobias <tob...@gm...> - 2003-12-18 14:27:01
|
Am Do, den 18.12.2003 schrieb Duong-Khang NGUYEN um 09:05: > Hi there, > > I think that the use of "#define NOSOUND" is justified by the fact that some > advanced users don't want the sound support compiled in as Bill said. So if > we do not provide that compile time define anymore, we get the sound support > compiled in all the time. The only argument for #define NOSOUND until now is, that some users maybe don't want to install SDL_mixer and its dependencies. We have following options. -Switching from SDL_mixer to sth. that has less dependencies -Creating fake functions, which do nothing, if someone don't wants to link against SDL_mixer. (Just a idea, I dunno if that is 100% possible ;) ) -And more that I don't know of. > In this case we will get rid of the NOSOUND #define but the sound support is > compiled in anyway. And the user can still disable the sound with > --disable-sound. Yepp, this is a common way in a lot of games. The most users will install a RPM or DEB and packagers will enable sound in RPMs and DEBs, of course. > > The problem is that we can not provide the compile time #define NOSOUND and > then ignore it in the codes. It's just not logical :-D. You guys, have to > decide either we let the user the ability to choose to compile the sound > support or they have the sound support compiled in "forever :-)" Yes, you got the point. There are two ways crossing each other. Compiling with or without sound support or giving a run time option for this. If we don't choose one way and drop the other one, all users will be confused. And in my point of view a runtime option is much better here, since the most people will install a RPM or something like that. > >Tobias GlÀÃer (who comes from C++ and sees #define as his enemy ;) ) > > Hmm, I think "#define" fits some programming needs just like the "goto" > command. That's why they're still around. You, Tobias, must have had a dark > time with "#define"s :-D '#define's are OK for some special needs and have their deserved place esspecially in C. But '#define's should definitivly not be placed, where runtime decicions/options would fit better. And last but not least I red a few advanced C++ books, which told me again and again how satanic '#define's are. :) Greetz... (I'm going to view 'Lord of the Rings' today!) Tobias Gläßer |