Update of /cvsroot/netrek/client/netrekxp/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6804/include Modified Files: data.h defs.h proto.h sound.h struct.h Log Message: This latest series of changes adds stereo quasi-3D sound effects for both players and observers, as well as adding much improved support for observer sounds (previously they were limited as to what sounds they would hear). Index: defs.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/defs.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- defs.h 21 Apr 2006 12:00:06 -0000 1.4 +++ defs.h 26 Apr 2006 02:04:24 -0000 1.5 @@ -35,6 +35,8 @@ * tactical windows */ #endif +#define CORNER_DIST (int)(sqrt)(WINSIDE*WINSIDE/2) + #define BORDER 1 /* border width for option * windows */ #define THICKBORDER 3 /* Thicker border for windows */ @@ -170,7 +172,8 @@ #define isLockPlanet(p) ((me->p_flags & PFPLLOCK) && (me->p_planet == p->pl_no)) #define isLockPlayer(p) ((me->p_flags & PFPLOCK) && (me->p_playerl == p->p_no)) - +#define isObsLockPlayer(p) ((me->p_flags & PFOBSERV) && (me->p_flags & PFPLOCK) && \ + (me->p_playerl == p->p_no)) #define torpColor(t) \ (myTorp(t) ? myColor : shipCol[remap[players[(t)->t_owner].p_team]]) #define plasmatorpColor(t) \ Index: sound.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/sound.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sound.h 24 Apr 2006 14:13:25 -0000 1.2 +++ sound.h 26 Apr 2006 02:04:24 -0000 1.3 @@ -15,31 +15,32 @@ #define SHIELD_UP_SOUND 8 #define TORP_HIT_SOUND 9 #define WARNING_SOUND 10 -#define ENGINE_SOUND 11 -#define ENTER_SHIP_SOUND 12 -#define SELF_DESTRUCT_SOUND 13 -#define PLASMA_HIT_SOUND 14 -#define MESSAGE_SOUND 15 -#define MESSAGE1_SOUND 16 -#define MESSAGE2_SOUND 17 -#define MESSAGE3_SOUND 18 -#define MESSAGE4_SOUND 19 -#define MESSAGE5_SOUND 10 -#define MESSAGE6_SOUND 21 -#define MESSAGE7_SOUND 22 -#define MESSAGE8_SOUND 23 -#define MESSAGE9_SOUND 24 +#define RED_ALERT_SOUND 11 +#define ENGINE_SOUND 12 +#define ENTER_SHIP_SOUND 13 +#define SELF_DESTRUCT_SOUND 14 +#define PLASMA_HIT_SOUND 15 +#define MESSAGE_SOUND 16 +#define MESSAGE1_SOUND 17 +#define MESSAGE2_SOUND 18 +#define MESSAGE3_SOUND 19 +#define MESSAGE4_SOUND 20 +#define MESSAGE5_SOUND 21 +#define MESSAGE6_SOUND 22 +#define MESSAGE7_SOUND 23 +#define MESSAGE8_SOUND 24 +#define MESSAGE9_SOUND 25 -#define OTHER_SOUND_OFFSET 24 +#define OTHER_SOUND_OFFSET 26 /* Other people's sounds; not all of these are currently used */ -#define OTHER_FIRE_TORP_SOUND 25 -#define OTHER_PHASER_SOUND 26 -#define OTHER_FIRE_PLASMA_SOUND 27 -#define OTHER_EXPLOSION_SOUND 28 +#define OTHER_FIRE_TORP_SOUND 27 +#define OTHER_PHASER_SOUND 28 +#define OTHER_FIRE_PLASMA_SOUND 29 +#define OTHER_EXPLOSION_SOUND 30 -#define NUM_SOUNDS 28 +#define NUM_SOUNDS 30 struct Sound { @@ -54,6 +55,7 @@ /* extern void soundaction (W_Event * data); */ extern void Play_Sound (int type); +extern void Play_Sound_Loc (int type, int angle, int distance); extern void Abort_Sound (int type); extern void Init_Sound (void); extern void Exit_Sound (void); @@ -65,8 +67,9 @@ EXPLOSION_WAV, EXPLOSION_OTHER_WAV, FIRE_PLASMA_WAV, + OTHER_FIRE_PLASMA_WAV, FIRE_TORP_WAV, - FIRE_TORP_OTHER_WAV, + OTHER_FIRE_TORP_WAV, INTRO_WAV, MESSAGE_WAV, PHASER_WAV, Index: struct.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/struct.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- struct.h 21 Apr 2006 12:00:06 -0000 1.3 +++ struct.h 26 Apr 2006 02:04:24 -0000 1.4 @@ -312,7 +312,7 @@ int t_x; int t_y; short t_fuse; /* Life left in current state */ - unsigned char t_updateFuse; /* Updates before torp will expire */ + short t_updateFuse; /* Updates before torp will expire */ unsigned char t_dir; /* direction */ }; Index: proto.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/proto.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- proto.h 24 Apr 2006 15:30:37 -0000 1.8 +++ proto.h 26 Apr 2006 02:04:24 -0000 1.9 @@ -23,10 +23,10 @@ /******************************************************************************/ /*** beeplite.c ***/ /******************************************************************************/ -rcdlite (struct distress *dist); -litedefaults (void); -liteplanet (struct planet *l); -liteplayer (struct player *j); +void rcdlite (struct distress *dist); +void litedefaults (void); +void liteplanet (struct planet *l); +void liteplayer (struct player *j); makelite (struct distress * dist, char *pm); /******************************************************************************/ @@ -767,6 +767,8 @@ void loadbitmapsG (void); newwin (char *hostmon, char *progname); +newsoundwin (char *hostmon, + char *progname); mapAll (void); savebitmaps (void); void entrywindow (int *team, @@ -1086,6 +1088,8 @@ extern void Exit_Sound (void); extern void Init_Sound (void); extern void Play_Sound (int type); + extern void Play_Sound_Loc (int type, int angle, int distance); + void Group_Sound (int type, int channel); extern void Abort_Sound (int type); extern void soundwindow (void); //static void soundrefresh(int i); Index: data.h =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/include/data.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- data.h 24 Apr 2006 15:30:37 -0000 1.7 +++ data.h 26 Apr 2006 02:04:24 -0000 1.8 @@ -551,7 +551,7 @@ // Missing global variables #include <time.h> -extern time_t autoQuit; +extern int autoQuit; extern int forceDisplay; extern int forceMono;