Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11788/src
Modified Files:
data.c socket.c sound.c
Log Message:
Cleaned up nt_plasma_kill.wav
Added nt_start_tmode.wav and nt_start_mode.wav, and the corresponding code necessary for adding new sound files
Updated to do list with things that have popped up over the last few months
Index: data.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/data.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- data.c 25 Jun 2006 08:19:40 -0000 1.40
+++ data.c 20 Sep 2006 13:04:53 -0000 1.41
@@ -62,6 +62,7 @@
* system support */
int niftyNewMessages = 1;
unsigned int oldalert = 0;
+unsigned char oldtourn = (unsigned char) 2; /* placeholder starting status */
int alertBorderColor = 0;
int remap[16] = { 0, 1, 2, 0, 3, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0 };
int messpend = 0;
Index: socket.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/socket.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- socket.c 22 May 2006 22:05:14 -0000 1.6
+++ socket.c 20 Sep 2006 13:04:53 -0000 1.7
@@ -1168,6 +1168,28 @@
handleStatus (struct status_spacket *packet)
{
status->tourn = packet->tourn;
+ /* T-mode sounds - avoid playing on game entry by using
+ placeholder setting for oldtourn */
+ if (oldtourn != status->tourn && oldtourn != 2)
+ {
+#ifdef SOUND
+ if (status->tourn)
+ {
+ if (newSound)
+ Play_Sound(START_TMODE_WAV);
+ else
+ Play_Sound(START_TMODE_SOUND);
+ }
+ else
+ {
+ if (newSound)
+ Play_Sound(STOP_TMODE_WAV);
+ else
+ Play_Sound(STOP_TMODE_SOUND);
+ }
+#endif
+ }
+ oldtourn = status->tourn;
status->armsbomb = ntohl (packet->armsbomb);
status->planets = ntohl (packet->planets);
status->kills = ntohl (packet->kills);
Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- sound.c 11 Jun 2006 09:36:25 -0000 1.17
+++ sound.c 20 Sep 2006 13:04:53 -0000 1.18
@@ -63,6 +63,8 @@
{"nt_plasma_kill", 11, 1},
{"nt_enter_warp", 4, 1},
{"nt_exit_warp", 4, 1},
+ {"nt_start_tmode", 6, 1},
+ {"nt_stop_tmode", 6, 1},
{"nt_message", 4, 1},
{"nt_message1", 4, 1},
{"nt_message2", 4, 1},
@@ -126,6 +128,8 @@
newsounds[SELF_DESTRUCT_WAV] = Mix_LoadWAV(DATAFILE("nt_self_destruct.wav"));
newsounds[SHIELD_DOWN_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_down.wav"));
newsounds[SHIELD_UP_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_up.wav"));
+ newsounds[START_TMODE_WAV] = Mix_LoadWAV(DATAFILE("nt_start_tmode.wav"));
+ newsounds[STOP_TMODE_WAV] = Mix_LoadWAV(DATAFILE("nt_stop_tmode.wav"));
newsounds[TORP_HIT_WAV] = Mix_LoadWAV(DATAFILE("nt_torp_hit.wav"));
newsounds[UNCLOAK_WAV] = Mix_LoadWAV(DATAFILE("nt_uncloak.wav"));
newsounds[WARNING_WAV] = Mix_LoadWAV(DATAFILE("nt_warning.wav"));
@@ -478,6 +482,12 @@
case SHIELD_UP_SOUND:
sprintf (buf, "Shield up sound is %s", flag);
break;
+ case START_TMODE_SOUND:
+ sprintf (buf, "Start tmode sound is %s", flag);
+ break;
+ case STOP_TMODE_SOUND:
+ sprintf (buf, "Stop tmode sound is %s", flag);
+ break;
case TORP_HIT_SOUND:
sprintf (buf, "Torp hit sound is %s", flag);
break;