tSounds added for players joining and leaving the game. - vaccinewars - be a doctor and try to vaccinate the world (HTM) git clone git://src.adamsgaard.dk/vaccinewars (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit e49787577a0d32353cebcac2ad8cedea4b5faaec (DIR) parent 70c177455d56d1d1ecaddf0d9e1479eb434e187f (HTM) Author: Ben Webb <ben@salilab.org> Date: Sat, 4 May 2002 17:49:17 +0000 Sounds added for players joining and leaving the game. Diffstat: M src/curses_client/curses_client.c | 2 ++ M src/dopewars.c | 8 +++++++- M src/dopewars.h | 1 + M src/gui_client/gtk_client.c | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) --- (DIR) diff --git a/src/curses_client/curses_client.c b/src/curses_client/curses_client.c t@@ -1015,12 +1015,14 @@ void HandleClientMessage(char *Message, Player *Play) text = g_strdup_printf(_("%s joins the game!"), Data); display_message(text); g_free(text); + SoundPlay(Sounds.JoinGame); break; case C_LEAVE: if (From != &Noone) { text = g_strdup_printf(_("%s has left the game."), Data); display_message(text); g_free(text); + SoundPlay(Sounds.LeaveGame); } break; case C_RENAME: (DIR) diff --git a/src/dopewars.c b/src/dopewars.c t@@ -154,7 +154,7 @@ struct NAMES Names = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; struct SOUNDS Sounds = { - NULL, NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; /* N.B. The slightly over-enthusiastic comments here are for the benefit t@@ -394,6 +394,12 @@ struct GLOBALS Globals[] = { {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}, + {NULL, NULL, NULL, &Sounds.JoinGame, NULL, "Sounds.JoinGame", + N_("Sound file played when a player joins the game"), + NULL, NULL, 0, "", NULL, NULL, FALSE, 0}, + {NULL, NULL, NULL, &Sounds.LeaveGame, NULL, "Sounds.LeaveGame", + N_("Sound file played when a player leaves the game"), + 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}, (DIR) diff --git a/src/dopewars.h b/src/dopewars.h t@@ -85,6 +85,7 @@ struct NAMES { struct SOUNDS { gchar *FightHit, *FightMiss, *FightReload, *Jet, *TalkToAll, *TalkPrivate; + gchar *JoinGame, *LeaveGame; }; #ifdef NETWORKING (DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c t@@ -472,6 +472,7 @@ void HandleClientMessage(char *pt, Player *Play) text = g_strdup_printf(_("%s joins the game!"), Data); PrintMessage(text, "join"); g_free(text); + SoundPlay(Sounds.JoinGame); UpdatePlayerLists(); UpdateMenus(); break; t@@ -480,6 +481,7 @@ void HandleClientMessage(char *pt, Player *Play) text = g_strdup_printf(_("%s has left the game."), Data); PrintMessage(text, "leave"); g_free(text); + SoundPlay(Sounds.LeaveGame); UpdatePlayerLists(); UpdateMenus(); }