diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-02-09 20:49:15 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-02-09 20:49:15 +0000 |
| commit | ec218f423abf60b6e776d7a5a9ebee408de45a60 (patch) | |
| tree | 47304e931ff78ad6dc62226d845ec6faa7b0af2e /src/sound.c | |
| parent | 601a366b8c665f760463259552fedd7be43e5754 (diff) | |
- oprava chyby, pri zmeneni zbrane zo samopala, alebo lassera ( informoval xHire )
- prepis sietoveho protokolu, teraz je bezpecnejsi
git-svn-id: http://opensvn.csie.org/tuxanci_ng@3 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/sound.c')
| -rw-r--r-- | src/sound.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/sound.c b/src/sound.c index 2e7ef4b..10f11d4 100644 --- a/src/sound.c +++ b/src/sound.c @@ -14,7 +14,7 @@ static list_t *listSound; static bool_t isSoundInit = FALSE; -static bool_t isSoundActive = TRUE; +static bool_t var_isSoundActive = TRUE; bool_t isSoundInicialized() { @@ -30,7 +30,17 @@ void initSound() listSound = newList(); isSoundInit = TRUE; - isSoundActive = TRUE; + var_isSoundActive = TRUE; + + if( isParamFlag("--nomusic") ) + { + setSoundActive(FALSE); + } + + if( isParamFlag("--music") ) + { + setSoundActive(TRUE); + } printf("init sound..\n"); } @@ -92,7 +102,7 @@ void playSound(char *name, int group) sound_t *this; if( isSoundInit == FALSE || - isSoundActive == FALSE ) + var_isSoundActive == FALSE ) { return; } @@ -111,7 +121,12 @@ void playSound(char *name, int group) void setSoundActive(bool_t n) { - isSoundActive = n; + var_isSoundActive = n; +} + +bool_t isSoundActive() +{ + return var_isSoundActive; } void quitSound() |