tNow fully functional ESD sound support; sound files can be configured via. con… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 78ae695cf08250d7a52cc01786a525de2836f8f9 | |
parent 97d4df56c79b91f95c61f9f6f0a85d25eb314373 | |
Author: Ben Webb <[email protected]> | |
Date: Sat, 4 May 2002 17:44:54 +0000 | |
Now fully functional ESD sound support; sound files can be configured via. | |
configuration files (Sound.Jet etc.) | |
Diffstat: | |
M src/dopewars.c | 26 ++++++++++++++++++++++++++ | |
1 file changed, 26 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/src/dopewars.c b/src/dopewars.c | |
t@@ -46,6 +46,7 @@ | |
#include "message.h" | |
#include "nls.h" | |
#include "serverside.h" | |
+#include "sound.h" | |
#include "tstring.h" | |
#include "AIPlayer.h" | |
#include "util.h" | |
t@@ -152,6 +153,9 @@ struct COP StaticCop, *Cop = NULL; | |
struct NAMES Names = { | |
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL | |
}; | |
+struct SOUNDS Sounds = { | |
+ NULL, NULL, NULL, NULL, NULL, NULL | |
+}; | |
/* N.B. The slightly over-enthusiastic comments here are for the benefit | |
* of translators ;) */ | |
t@@ -372,6 +376,24 @@ struct GLOBALS Globals[] = { | |
N_("Name of the gun shop"), NULL, NULL, 0, "", NULL, NULL, FALSE, 0}, | |
{NULL, NULL, NULL, &Names.RoughPubName, NULL, "RoughPubName", | |
N_("Name of the pub"), NULL, NULL, 0, "", NULL, NULL, FALSE, 0}, | |
+ {NULL, NULL, NULL, &Sounds.FightHit, NULL, "Sounds.FightHit", | |
+ N_("Sound file played for a gun \"hit\""), NULL, NULL, 0, "", | |
+ NULL, NULL, FALSE, 0}, | |
+ {NULL, NULL, NULL, &Sounds.FightMiss, NULL, "Sounds.FightMiss", | |
+ N_("Sound file played for a gun \"miss\""), NULL, NULL, 0, "", | |
+ NULL, NULL, FALSE, 0}, | |
+ {NULL, NULL, NULL, &Sounds.FightReload, NULL, "Sounds.FightReload", | |
+ N_("Sound file played when guns are reloaded"), NULL, NULL, 0, "", | |
+ NULL, NULL, FALSE, 0}, | |
+ {NULL, NULL, NULL, &Sounds.Jet, NULL, "Sounds.Jet", | |
+ N_("Sound file played on arriving at a new location"), NULL, NULL, 0, "", | |
+ NULL, NULL, FALSE, 0}, | |
+ {NULL, NULL, NULL, &Sounds.TalkToAll, NULL, "Sounds.TalkToAll", | |
+ N_("Sound file played when a player sends a public chat message"), | |
+ NULL, NULL, 0, "", NULL, NULL, FALSE, 0}, | |
+ {NULL, NULL, NULL, &Sounds.TalkPrivate, NULL, "Sounds.TalkPrivate", | |
+ N_("Sound file played when a player sends a private chat message"), | |
+ NULL, NULL, 0, "", NULL, NULL, FALSE, 0}, | |
{&DrugSortMethod, NULL, NULL, NULL, NULL, "DrugSortMethod", | |
N_("Sort key for listing available drugs"), | |
NULL, NULL, 0, "", NULL, NULL, FALSE, 0}, | |
t@@ -2420,6 +2442,8 @@ void SetupParameters(void) | |
ServerMOTD = g_strdup(""); | |
g_free(WebBrowser); | |
WebBrowser = g_strdup("/usr/bin/mozilla"); | |
+ AssignName(&Sounds.FightHit, "hit.wav"); | |
+ AssignName(&Sounds.Jet, "jet.wav"); | |
CopyNames(&Names, &DefaultNames); | |
CopyDrugs(&Drugs, &DefaultDrugs); | |
t@@ -2817,6 +2841,7 @@ int main(int argc, char *argv[]) | |
bindtextdomain(PACKAGE, LOCALEDIR); | |
textdomain(PACKAGE); | |
#endif | |
+ SoundInit(); | |
WantUTF8Errors(FALSE); | |
GeneralStartup(argc, argv); | |
OpenLog(); | |
t@@ -2870,6 +2895,7 @@ int main(int argc, char *argv[]) | |
g_free(PidFile); | |
g_free(Log.File); | |
g_free(ConvertFile); | |
+ SoundClose(); | |
return 0; | |
} | |