Added support for positional (stereo) sound effects, currently works only with OpenAL
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1021 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
Changes towards version 0.3:
|
Changes towards version 0.3:
|
||||||
|
- Added support for positional (stereo) sound effects, currently
|
||||||
|
works only with OpenAL -Mika
|
||||||
- Fixed screen transitions from homeworld conversations (bug #348) -Michael
|
- Fixed screen transitions from homeworld conversations (bug #348) -Michael
|
||||||
- Fixed Fwiffo join_us_refusals initialization (bug #405) -Mika
|
- Fixed Fwiffo join_us_refusals initialization (bug #405) -Mika
|
||||||
- Fix Druuge transactions to not elevate crew costs baselessly (bug #235),
|
- Fix Druuge transactions to not elevate crew costs baselessly (bug #235),
|
||||||
|
|||||||
@@ -106,6 +106,11 @@ well with some sound cards.
|
|||||||
Use "none" as a last resort if you cannot get other drivers to work,
|
Use "none" as a last resort if you cannot get other drivers to work,
|
||||||
or if you have no soundcard.
|
or if you have no soundcard.
|
||||||
|
|
||||||
|
--stereosfx (no short version)
|
||||||
|
|
||||||
|
Enables positional sound effects in melee. Currently works only when
|
||||||
|
using openal.
|
||||||
|
|
||||||
-u (or --nosubtitles)
|
-u (or --nosubtitles)
|
||||||
|
|
||||||
Disables subtitles.
|
Disables subtitles.
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ int optMeleeScale = TFB_SCALE_TRILINEAR;
|
|||||||
|
|
||||||
char *configDir, *saveDir, *meleeDir;
|
char *configDir, *saveDir, *meleeDir;
|
||||||
BOOLEAN optSubtitles = TRUE;
|
BOOLEAN optSubtitles = TRUE;
|
||||||
|
BOOLEAN optStereoSFX = FALSE;
|
||||||
|
|
||||||
void
|
void
|
||||||
prepareConfigDir (void) {
|
prepareConfigDir (void) {
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ extern int optSmoothScroll;
|
|||||||
extern int optMeleeScale;
|
extern int optMeleeScale;
|
||||||
|
|
||||||
extern BOOLEAN optSubtitles;
|
extern BOOLEAN optSubtitles;
|
||||||
|
extern BOOLEAN optStereoSFX;
|
||||||
|
|
||||||
extern char *configDir;
|
extern char *configDir;
|
||||||
extern char *meleeDir;
|
extern char *meleeDir;
|
||||||
|
|||||||
@@ -150,9 +150,9 @@ extern void FreeElement (HELEMENT hElement);
|
|||||||
#define GetTailElement() GetTailLink (&disp_q)
|
#define GetTailElement() GetTailLink (&disp_q)
|
||||||
#define LockElement(h,eptr) *(eptr) = (ELEMENTPTR)LockLink (&disp_q, h)
|
#define LockElement(h,eptr) *(eptr) = (ELEMENTPTR)LockLink (&disp_q, h)
|
||||||
#define UnlockElement(h) UnlockLink (&disp_q, h)
|
#define UnlockElement(h) UnlockLink (&disp_q, h)
|
||||||
#define RemoveElement(h) RemoveQueue (&disp_q, h)
|
|
||||||
#define GetPredElement(l) _GetPredLink (l)
|
#define GetPredElement(l) _GetPredLink (l)
|
||||||
#define GetSuccElement(l) _GetSuccLink (l)
|
#define GetSuccElement(l) _GetSuccLink (l)
|
||||||
|
extern void RemoveElement (HLINK hLink);
|
||||||
|
|
||||||
extern void RedrawQueue (BOOLEAN clear);
|
extern void RedrawQueue (BOOLEAN clear);
|
||||||
extern BOOLEAN DeltaEnergy (ELEMENTPTR ElementPtr, SIZE
|
extern BOOLEAN DeltaEnergy (ELEMENTPTR ElementPtr, SIZE
|
||||||
@@ -160,9 +160,11 @@ extern BOOLEAN DeltaEnergy (ELEMENTPTR ElementPtr, SIZE
|
|||||||
extern BOOLEAN DeltaCrew (ELEMENTPTR ElementPtr, SIZE
|
extern BOOLEAN DeltaCrew (ELEMENTPTR ElementPtr, SIZE
|
||||||
crew_delta);
|
crew_delta);
|
||||||
|
|
||||||
extern void PlaySound (SOUND S, BYTE Priority);
|
extern void PlaySound (SOUND S, SoundPosition Pos,
|
||||||
|
ELEMENTPTR PositionalObject, BYTE Priority);
|
||||||
extern void ProcessSound (SOUND Sound);
|
extern void ProcessSound (SOUND Sound, ELEMENTPTR PositionalObject);
|
||||||
|
extern SoundPosition CalcSoundPosition (ELEMENTPTR ElementPtr);
|
||||||
|
extern SoundPosition NotPositional (void);
|
||||||
|
|
||||||
extern void PreProcessStatus (PELEMENT ShipPtr);
|
extern void PreProcessStatus (PELEMENT ShipPtr);
|
||||||
extern void PostProcessStatus (PELEMENT ShipPtr);
|
extern void PostProcessStatus (PELEMENT ShipPtr);
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ DoInput (PVOID pInputState, BOOLEAN resetInput)
|
|||||||
if (CurrentMenuState.select)
|
if (CurrentMenuState.select)
|
||||||
S = SetAbsSoundIndex (S, 1);
|
S = SetAbsSoundIndex (S, 1);
|
||||||
|
|
||||||
PlaySoundEffect (S, 0, 0);
|
PlaySoundEffect (S, 0, NotPositional (), NULL, 0);
|
||||||
}
|
}
|
||||||
} while ((*((PINPUT_STATE_DESC)pInputState)->InputFunc)
|
} while ((*((PINPUT_STATE_DESC)pInputState)->InputFunc)
|
||||||
(pInputState));
|
(pInputState));
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ typedef STRING_TABLE SOUND_REF;
|
|||||||
typedef STRING SOUND;
|
typedef STRING SOUND;
|
||||||
typedef STRINGPTR SOUNDPTR;
|
typedef STRINGPTR SOUNDPTR;
|
||||||
|
|
||||||
|
typedef struct soundposition
|
||||||
|
{
|
||||||
|
BOOLEAN positional;
|
||||||
|
int x, y;
|
||||||
|
} SoundPosition;
|
||||||
|
|
||||||
#define InitSoundResources InitStringTableResources
|
#define InitSoundResources InitStringTableResources
|
||||||
#define CaptureSound CaptureStringTable
|
#define CaptureSound CaptureStringTable
|
||||||
#define ReleaseSound ReleaseStringTable
|
#define ReleaseSound ReleaseStringTable
|
||||||
@@ -60,9 +66,12 @@ extern void PLRStop (MUSIC_REF MusicRef);
|
|||||||
extern BOOLEAN PLRPlaying (MUSIC_REF MusicRef);
|
extern BOOLEAN PLRPlaying (MUSIC_REF MusicRef);
|
||||||
extern void PLRPause (MUSIC_REF MusicRef);
|
extern void PLRPause (MUSIC_REF MusicRef);
|
||||||
extern void PLRResume (MUSIC_REF MusicRef);
|
extern void PLRResume (MUSIC_REF MusicRef);
|
||||||
extern void PlayChannel (COUNT Channel, PVOID lpSample, COUNT SampLen,
|
extern void PlayChannel (COUNT channel, PVOID sample, SoundPosition pos,
|
||||||
COUNT LoopBegin, COUNT LoopLen, BYTE Priority);
|
void *positional_object, unsigned char priority);
|
||||||
extern BOOLEAN ChannelPlaying (COUNT Channel);
|
extern BOOLEAN ChannelPlaying (COUNT Channel);
|
||||||
|
extern void * GetPositionalObject (COUNT channel);
|
||||||
|
extern void SetPositionalObject (COUNT channel, void *positional_object);
|
||||||
|
extern void UpdateSoundPosition (COUNT channel, SoundPosition pos);
|
||||||
extern void StopChannel (COUNT Channel, BYTE Priority);
|
extern void StopChannel (COUNT Channel, BYTE Priority);
|
||||||
extern void SetMusicVolume (COUNT Volume);
|
extern void SetMusicVolume (COUNT Volume);
|
||||||
extern void SetChannelVolume (COUNT Channel, COUNT Volume, BYTE
|
extern void SetChannelVolume (COUNT Channel, COUNT Volume, BYTE
|
||||||
|
|||||||
@@ -550,6 +550,12 @@ mixSDL_Sourcef (mixSDL_Object srcobj, mixSDL_SourceProp pname, float value)
|
|||||||
mixSDL_UnlockMutex (src_mutex);
|
mixSDL_UnlockMutex (src_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set source float array property (CURRENTLY NOT IMPLEMENTED) */
|
||||||
|
void mixSDL_Sourcefv (mixSDL_Object srcobj, mixSDL_SourceProp pname, float *value)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* get source integer property */
|
/* get source integer property */
|
||||||
void
|
void
|
||||||
mixSDL_GetSourcei (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
mixSDL_GetSourcei (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ enum
|
|||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
MIX_POSITION = 0x1004,
|
||||||
MIX_LOOPING = 0x1007,
|
MIX_LOOPING = 0x1007,
|
||||||
MIX_BUFFER = 0x1009,
|
MIX_BUFFER = 0x1009,
|
||||||
MIX_GAIN = 0x100A,
|
MIX_GAIN = 0x100A,
|
||||||
@@ -231,6 +232,8 @@ void mixSDL_Sourcei (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
|||||||
mixSDL_IntVal value);
|
mixSDL_IntVal value);
|
||||||
void mixSDL_Sourcef (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
void mixSDL_Sourcef (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
||||||
float value);
|
float value);
|
||||||
|
void mixSDL_Sourcefv (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
||||||
|
float *value);
|
||||||
void mixSDL_GetSourcei (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
void mixSDL_GetSourcei (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
||||||
mixSDL_IntVal *value);
|
mixSDL_IntVal *value);
|
||||||
void mixSDL_GetSourcef (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
void mixSDL_GetSourcef (mixSDL_Object srcobj, mixSDL_SourceProp pname,
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#define TFBSound_IsSource mixSDL_IsSource
|
#define TFBSound_IsSource mixSDL_IsSource
|
||||||
#define TFBSound_Sourcei mixSDL_Sourcei
|
#define TFBSound_Sourcei mixSDL_Sourcei
|
||||||
#define TFBSound_Sourcef mixSDL_Sourcef
|
#define TFBSound_Sourcef mixSDL_Sourcef
|
||||||
|
#define TFBSound_Sourcefv mixSDL_Sourcefv
|
||||||
#define TFBSound_GetSourcei mixSDL_GetSourcei
|
#define TFBSound_GetSourcei mixSDL_GetSourcei
|
||||||
#define TFBSound_GetSourcef mixSDL_GetSourcef
|
#define TFBSound_GetSourcef mixSDL_GetSourcef
|
||||||
#define TFBSound_SourceRewind mixSDL_SourceRewind
|
#define TFBSound_SourceRewind mixSDL_SourceRewind
|
||||||
@@ -70,3 +71,4 @@
|
|||||||
#define TFBSOUND_BUFFERS_QUEUED MIX_BUFFERS_QUEUED
|
#define TFBSOUND_BUFFERS_QUEUED MIX_BUFFERS_QUEUED
|
||||||
#define TFBSOUND_NO_ERROR MIX_NO_ERROR
|
#define TFBSOUND_NO_ERROR MIX_NO_ERROR
|
||||||
#define TFBSOUND_SIZE MIX_SIZE
|
#define TFBSOUND_SIZE MIX_SIZE
|
||||||
|
#define TFBSOUND_POSITION MIX_POSITION
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#ifdef HAVE_OPENAL
|
#ifdef HAVE_OPENAL
|
||||||
|
|
||||||
#include "libs/sound/sound.h"
|
#include "libs/sound/sound.h"
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
ALCcontext *alcContext = NULL;
|
ALCcontext *alcContext = NULL;
|
||||||
ALCdevice *alcDevice = NULL;
|
ALCdevice *alcDevice = NULL;
|
||||||
@@ -98,9 +99,11 @@ TFB_alInitSound (int driver, int flags)
|
|||||||
SetSFXVolume (sfxVolumeScale);
|
SetSFXVolume (sfxVolumeScale);
|
||||||
SetSpeechVolume (speechVolumeScale);
|
SetSpeechVolume (speechVolumeScale);
|
||||||
SetMusicVolume ((COUNT) musicVolume);
|
SetMusicVolume ((COUNT) musicVolume);
|
||||||
|
|
||||||
// NOTE: change this if implementing 3D sound stuff
|
if (optStereoSFX)
|
||||||
alDistanceModel (AL_NONE);
|
alDistanceModel (AL_INVERSE_DISTANCE);
|
||||||
|
else
|
||||||
|
alDistanceModel (AL_NONE);
|
||||||
|
|
||||||
StreamDecoderTask = AssignTask (StreamDecoderTaskFunc, 1024,
|
StreamDecoderTask = AssignTask (StreamDecoderTaskFunc, 1024,
|
||||||
"audio stream decoder");
|
"audio stream decoder");
|
||||||
|
|||||||
@@ -20,28 +20,32 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
static void CheckFinishedChannels (void);
|
static void CheckFinishedChannels (void);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PlayChannel (COUNT channel, PVOID sample, COUNT sample_length, COUNT loop_begin,
|
PlayChannel (COUNT channel, PVOID sample, SoundPosition pos,
|
||||||
COUNT loop_length, unsigned char priority)
|
void *positional_object, unsigned char priority)
|
||||||
{
|
{
|
||||||
TFB_SoundSample *tfb_sample = *(TFB_SoundSample**) sample;
|
TFB_SoundSample *tfb_sample = *(TFB_SoundSample**) sample;
|
||||||
|
|
||||||
StopSource (channel);
|
StopSource (channel);
|
||||||
// all finished (stopped) channels can be cleaned up at this point
|
// all finished (stopped) channels can be cleaned up at this point
|
||||||
// since this is the only func that can initiate an sfx sound
|
// since this is the only func that can initiate an sfx sound
|
||||||
CheckFinishedChannels ();
|
CheckFinishedChannels ();
|
||||||
|
|
||||||
soundSource[channel].sample = tfb_sample;
|
soundSource[channel].sample = tfb_sample;
|
||||||
|
soundSource[channel].positional_object = positional_object;
|
||||||
|
|
||||||
|
if (optStereoSFX)
|
||||||
|
UpdateSoundPosition (channel, pos);
|
||||||
|
|
||||||
TFBSound_Sourcei (soundSource[channel].handle, TFBSOUND_BUFFER,
|
TFBSound_Sourcei (soundSource[channel].handle, TFBSOUND_BUFFER,
|
||||||
tfb_sample->buffer[0]);
|
tfb_sample->buffer[0]);
|
||||||
TFBSound_SourcePlay (soundSource[channel].handle);
|
TFBSound_SourcePlay (soundSource[channel].handle);
|
||||||
/* ignored arguments */
|
(void) priority;
|
||||||
(void)sample_length;
|
|
||||||
(void)loop_begin;
|
|
||||||
(void)loop_length;
|
|
||||||
(void)priority;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -83,6 +87,40 @@ ChannelPlaying (COUNT WhichChannel)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *
|
||||||
|
GetPositionalObject (COUNT channel)
|
||||||
|
{
|
||||||
|
return soundSource[channel].positional_object;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SetPositionalObject (COUNT channel, void *positional_object)
|
||||||
|
{
|
||||||
|
soundSource[channel].positional_object = positional_object;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
UpdateSoundPosition (COUNT channel, SoundPosition pos)
|
||||||
|
{
|
||||||
|
const float ATTENUATION = 70.0f;
|
||||||
|
float fpos[3];
|
||||||
|
|
||||||
|
if (pos.positional)
|
||||||
|
{
|
||||||
|
fpos[0] = pos.x / ATTENUATION;
|
||||||
|
fpos[1] = 0.0f;
|
||||||
|
fpos[2] = pos.y / ATTENUATION;
|
||||||
|
TFBSound_Sourcefv (soundSource[channel].handle, TFBSOUND_POSITION, fpos);
|
||||||
|
//fprintf (stderr, "UpdateSoundPosition(): channel %d, pos %d %d, posobj %x\n",
|
||||||
|
// channel, pos.x, pos.y, (unsigned int)soundSource[channel].positional_object);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fpos[0] = fpos[1] = fpos[2] = 0.0f;
|
||||||
|
TFBSound_Sourcefv (soundSource[channel].handle, TFBSOUND_POSITION, fpos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SetChannelVolume (COUNT channel, COUNT volume, BYTE priority)
|
SetChannelVolume (COUNT channel, COUNT volume, BYTE priority)
|
||||||
// I wonder what this whole priority business is...
|
// I wonder what this whole priority business is...
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ CleanSource (int iSource)
|
|||||||
#define MAX_STACK_BUFFERS 64
|
#define MAX_STACK_BUFFERS 64
|
||||||
TFBSound_IntVal processed;
|
TFBSound_IntVal processed;
|
||||||
|
|
||||||
|
soundSource[iSource].positional_object = NULL;
|
||||||
TFBSound_GetSourcei (soundSource[iSource].handle,
|
TFBSound_GetSourcei (soundSource[iSource].handle,
|
||||||
TFBSOUND_BUFFERS_PROCESSED, &processed);
|
TFBSOUND_BUFFERS_PROCESSED, &processed);
|
||||||
if (processed != 0)
|
if (processed != 0)
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ typedef struct tfb_soundsource
|
|||||||
bool stream_should_be_playing;
|
bool stream_should_be_playing;
|
||||||
Mutex stream_mutex;
|
Mutex stream_mutex;
|
||||||
sint32 start_time;
|
sint32 start_time;
|
||||||
|
void *positional_object;
|
||||||
|
|
||||||
// for oscilloscope
|
// for oscilloscope
|
||||||
void *sbuffer;
|
void *sbuffer;
|
||||||
|
|||||||
@@ -103,6 +103,16 @@ TFBSound_Sourcef (TFBSound_Object srcobj, TFBSound_SourceProp pname, float value
|
|||||||
(mixSDL_SourceProp) tfb_enum_lookup[pname], value);
|
(mixSDL_SourceProp) tfb_enum_lookup[pname], value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TFBSound_Sourcefv (TFBSound_Object srcobj, TFBSound_SourceProp pname, float *value)
|
||||||
|
{
|
||||||
|
if (SoundDriver == TFB_SOUNDDRIVER_OPENAL)
|
||||||
|
alSourcefv ((ALuint) srcobj, (ALenum) tfb_enum_lookup[pname], value);
|
||||||
|
else
|
||||||
|
mixSDL_Sourcefv ((mixSDL_Object) srcobj,
|
||||||
|
(mixSDL_SourceProp) tfb_enum_lookup[pname], value);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TFBSound_GetSourcei (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
TFBSound_GetSourcei (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
||||||
TFBSound_IntVal *value)
|
TFBSound_IntVal *value)
|
||||||
@@ -260,6 +270,7 @@ TFB_choose_InitSound (int driver, int flags)
|
|||||||
tfb_enum_lookup[TFBSOUND_BUFFERS_PROCESSED] = AL_BUFFERS_PROCESSED;
|
tfb_enum_lookup[TFBSOUND_BUFFERS_PROCESSED] = AL_BUFFERS_PROCESSED;
|
||||||
tfb_enum_lookup[TFBSOUND_BUFFERS_QUEUED] = AL_BUFFERS_QUEUED;
|
tfb_enum_lookup[TFBSOUND_BUFFERS_QUEUED] = AL_BUFFERS_QUEUED;
|
||||||
tfb_enum_lookup[TFBSOUND_SIZE] = AL_SIZE;
|
tfb_enum_lookup[TFBSOUND_SIZE] = AL_SIZE;
|
||||||
|
tfb_enum_lookup[TFBSOUND_POSITION] = AL_POSITION;
|
||||||
TFBSOUND_NO_ERROR = AL_NO_ERROR;
|
TFBSOUND_NO_ERROR = AL_NO_ERROR;
|
||||||
TFBSOUND_PAUSED = AL_PAUSED;
|
TFBSOUND_PAUSED = AL_PAUSED;
|
||||||
TFBSOUND_PLAYING = AL_PLAYING;
|
TFBSOUND_PLAYING = AL_PLAYING;
|
||||||
@@ -280,6 +291,7 @@ TFB_choose_InitSound (int driver, int flags)
|
|||||||
tfb_enum_lookup[TFBSOUND_BUFFERS_PROCESSED] = MIX_BUFFERS_PROCESSED;
|
tfb_enum_lookup[TFBSOUND_BUFFERS_PROCESSED] = MIX_BUFFERS_PROCESSED;
|
||||||
tfb_enum_lookup[TFBSOUND_BUFFERS_QUEUED] = MIX_BUFFERS_QUEUED;
|
tfb_enum_lookup[TFBSOUND_BUFFERS_QUEUED] = MIX_BUFFERS_QUEUED;
|
||||||
tfb_enum_lookup[TFBSOUND_SIZE] = MIX_SIZE;
|
tfb_enum_lookup[TFBSOUND_SIZE] = MIX_SIZE;
|
||||||
|
tfb_enum_lookup[TFBSOUND_POSITION] = MIX_POSITION;
|
||||||
TFBSOUND_NO_ERROR = MIX_NO_ERROR;
|
TFBSOUND_NO_ERROR = MIX_NO_ERROR;
|
||||||
TFBSOUND_PAUSED = MIX_PAUSED;
|
TFBSOUND_PAUSED = MIX_PAUSED;
|
||||||
TFBSOUND_PLAYING = MIX_PLAYING;
|
TFBSOUND_PLAYING = MIX_PLAYING;
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ void TFBSound_Sourcei (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
|||||||
TFBSound_IntVal value);
|
TFBSound_IntVal value);
|
||||||
void TFBSound_Sourcef (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
void TFBSound_Sourcef (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
||||||
float value);
|
float value);
|
||||||
|
void TFBSound_Sourcefv (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
||||||
|
float *value);
|
||||||
void TFBSound_GetSourcei (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
void TFBSound_GetSourcei (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
||||||
TFBSound_IntVal *value);
|
TFBSound_IntVal *value);
|
||||||
void TFBSound_GetSourcef (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
void TFBSound_GetSourcef (TFBSound_Object srcobj, TFBSound_SourceProp pname,
|
||||||
@@ -96,6 +98,7 @@ enum
|
|||||||
TFBSOUND_BUFFERS_PROCESSED,
|
TFBSOUND_BUFFERS_PROCESSED,
|
||||||
TFBSOUND_BUFFERS_QUEUED,
|
TFBSOUND_BUFFERS_QUEUED,
|
||||||
TFBSOUND_SIZE,
|
TFBSOUND_SIZE,
|
||||||
|
TFBSOUND_POSITION,
|
||||||
TFBSOUND_ENUMSIZE
|
TFBSOUND_ENUMSIZE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1663,7 +1663,7 @@ DoMelee (PMELEE_STATE pMS)
|
|||||||
if (pMS->star_bucks[0] == 0 || pMS->star_bucks[1] == 0)
|
if (pMS->star_bucks[0] == 0 || pMS->star_bucks[1] == 0)
|
||||||
{
|
{
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
||||||
0, GAME_SOUND_PRIORITY);
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1724,7 +1724,7 @@ DoMelee (PMELEE_STATE pMS)
|
|||||||
DoSaveTeam (pMS);
|
DoSaveTeam (pMS);
|
||||||
else
|
else
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
||||||
0, GAME_SOUND_PRIORITY);
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
break;
|
break;
|
||||||
case CONTROLS_TOP:
|
case CONTROLS_TOP:
|
||||||
case CONTROLS_BOT:
|
case CONTROLS_BOT:
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ crew_collision (PELEMENT ElementPtr0, PPOINT pPt0,
|
|||||||
GetElementStarShip (ElementPtr1, &StarShipPtr);
|
GetElementStarShip (ElementPtr1, &StarShipPtr);
|
||||||
if (!(StarShipPtr->RaceDescPtr->ship_info.ship_flags & CREW_IMMUNE))
|
if (!(StarShipPtr->RaceDescPtr->ship_info.ship_flags & CREW_IMMUNE))
|
||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (GameSounds, GRAB_CREW));
|
ProcessSound (SetAbsSoundIndex (GameSounds, GRAB_CREW), ElementPtr1);
|
||||||
DeltaCrew ((ELEMENTPTR)ElementPtr1, 1);
|
DeltaCrew ((ELEMENTPTR)ElementPtr1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ GetMeleeStarShip (STARSHIPPTR LastStarShipPtr, COUNT which_player)
|
|||||||
row = new_row;
|
row = new_row;
|
||||||
col = new_col;
|
col = new_col;
|
||||||
|
|
||||||
PlaySoundEffect (MenuSounds, 0, 0);
|
PlaySoundEffect (MenuSounds, 0, NotPositional (), NULL, 0);
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
ChangeSelection:
|
ChangeSelection:
|
||||||
flash_rect.corner.x = PICK_X_OFFS
|
flash_rect.corner.x = PICK_X_OFFS
|
||||||
@@ -312,7 +312,7 @@ ChangeSelection:
|
|||||||
StarShipPtr->captains_name_index = 0;
|
StarShipPtr->captains_name_index = 0;
|
||||||
UnlockStarShip (&race_q[which_player], hBattleShip);
|
UnlockStarShip (&race_q[which_player], hBattleShip);
|
||||||
|
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 1), 0, 0);
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 1), 0, NotPositional (), NULL, 0);
|
||||||
|
|
||||||
WaitForSoundEnd (0);
|
WaitForSoundEnd (0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ DeviceFailed (BYTE which_device)
|
|||||||
BYTE fade_buf[1];
|
BYTE fade_buf[1];
|
||||||
|
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 3),
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 3),
|
||||||
0, GAME_SOUND_PRIORITY);
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
fade_buf[0] = FadeAllToWhite;
|
fade_buf[0] = FadeAllToWhite;
|
||||||
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)fade_buf, ONE_SECOND * 1)
|
SleepThreadUntil (XFormColorMap ((COLORMAPPTR)fade_buf, ONE_SECOND * 1)
|
||||||
+ (ONE_SECOND * 2));
|
+ (ONE_SECOND * 2));
|
||||||
@@ -457,10 +457,10 @@ DoManipulateDevices (PMENU_STATE pMS)
|
|||||||
NewState = LOBYTE (status);
|
NewState = LOBYTE (status);
|
||||||
if (NewState)
|
if (NewState)
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
||||||
0, GAME_SOUND_PRIORITY);
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
else if (HIBYTE (status) == 0)
|
else if (HIBYTE (status) == 0)
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 3),
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 3),
|
||||||
0, GAME_SOUND_PRIORITY);
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
return ((BOOLEAN)NewState);
|
return ((BOOLEAN)NewState);
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ object_animation (PELEMENT ElementPtr)
|
|||||||
SetAbsFrameIndex (pPrim->Object.Stamp.frame, 0);
|
SetAbsFrameIndex (pPrim->Object.Stamp.frame, 0);
|
||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LIFEFORM_CANNED),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LIFEFORM_CANNED),
|
||||||
GAME_SOUND_PRIORITY);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ object_animation (PELEMENT ElementPtr)
|
|||||||
SetPrimColor (pPrim, BUILD_COLOR (0x8000 | MAKE_RGB15 (0x1F, 0x1F, 0x1F), s));
|
SetPrimColor (pPrim, BUILD_COLOR (0x8000 | MAKE_RGB15 (0x1F, 0x1F, 0x1F), s));
|
||||||
if (frame_index == 13)
|
if (frame_index == 13)
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, EARTHQUAKE_DISASTER),
|
PlaySound (SetAbsSoundIndex (LanderSounds, EARTHQUAKE_DISASTER),
|
||||||
GAME_SOUND_PRIORITY);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ElementPtr->mass_points == LAVASPOT_DISASTER
|
if (ElementPtr->mass_points == LAVASPOT_DISASTER
|
||||||
@@ -437,7 +437,7 @@ DeltaLanderCrew (SIZE crew_delta, COUNT which_disaster)
|
|||||||
s.frame = SetAbsFrameIndex (LanderFrame[0], 56);
|
s.frame = SetAbsFrameIndex (LanderFrame[0], 56);
|
||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_INJURED),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_INJURED),
|
||||||
GAME_SOUND_PRIORITY);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
s.origin.x = 11 + (6 * (crew_delta % NUM_CREW_COLS));
|
s.origin.x = 11 + (6 * (crew_delta % NUM_CREW_COLS));
|
||||||
@@ -456,7 +456,7 @@ FillLanderHold (PPLANETSIDE_DESC pPSD, COUNT scan, COUNT NumRetrieved)
|
|||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_PICKUP),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_PICKUP),
|
||||||
GAME_SOUND_PRIORITY);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
|
|
||||||
if (scan == BIOLOGICAL_SCAN)
|
if (scan == BIOLOGICAL_SCAN)
|
||||||
{
|
{
|
||||||
@@ -639,7 +639,7 @@ CheckObjectCollision (COUNT index)
|
|||||||
{
|
{
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
LanderSounds, BIOLOGICAL_DISASTER
|
LanderSounds, BIOLOGICAL_DISASTER
|
||||||
), GAME_SOUND_PRIORITY);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
DeltaLanderCrew (-1, BIOLOGICAL_DISASTER);
|
DeltaLanderCrew (-1, BIOLOGICAL_DISASTER);
|
||||||
}
|
}
|
||||||
UnlockElement (hElement);
|
UnlockElement (hElement);
|
||||||
@@ -703,7 +703,7 @@ CheckObjectCollision (COUNT index)
|
|||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
LanderSounds, LANDER_HITS
|
LanderSounds, LANDER_HITS
|
||||||
), GAME_SOUND_PRIORITY);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
}
|
}
|
||||||
UnlockElement (hElement);
|
UnlockElement (hElement);
|
||||||
break;
|
break;
|
||||||
@@ -771,7 +771,7 @@ CheckObjectCollision (COUNT index)
|
|||||||
}
|
}
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
LanderSounds, LANDER_FULL
|
LanderSounds, LANDER_FULL
|
||||||
), GAME_SOUND_PRIORITY);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
continue;
|
continue;
|
||||||
case BIOLOGICAL_SCAN:
|
case BIOLOGICAL_SCAN:
|
||||||
if (pPSD->BiologicalLevel < MAX_SCROUNGED)
|
if (pPSD->BiologicalLevel < MAX_SCROUNGED)
|
||||||
@@ -787,7 +787,7 @@ CheckObjectCollision (COUNT index)
|
|||||||
}
|
}
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
LanderSounds, LANDER_FULL
|
LanderSounds, LANDER_FULL
|
||||||
), GAME_SOUND_PRIORITY);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -920,7 +920,7 @@ AddLightning (void)
|
|||||||
PutElement (hLightningElement);
|
PutElement (hLightningElement);
|
||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LIGHTNING_DISASTER),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LIGHTNING_DISASTER),
|
||||||
GAME_SOUND_PRIORITY);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,7 +1000,7 @@ BuildObjectList (void)
|
|||||||
{
|
{
|
||||||
AddGroundDisaster (LAVASPOT_DISASTER);
|
AddGroundDisaster (LAVASPOT_DISASTER);
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LAVASPOT_DISASTER),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LAVASPOT_DISASTER),
|
||||||
GAME_SOUND_PRIORITY);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HIBYTE (LOWORD (rand_val)) < pPSD->TectonicsChance)
|
if (HIBYTE (LOWORD (rand_val)) < pPSD->TectonicsChance)
|
||||||
@@ -1463,7 +1463,7 @@ InitPlanetSide (void)
|
|||||||
|
|
||||||
SetSemaphore (GraphicsSem);
|
SetSemaphore (GraphicsSem);
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_DEPARTS),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_DEPARTS),
|
||||||
GAME_SOUND_PRIORITY + 1);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY + 1);
|
||||||
SetContext (SpaceContext);
|
SetContext (SpaceContext);
|
||||||
AnimateLaunch (LanderFrame[5], FALSE);
|
AnimateLaunch (LanderFrame[5], FALSE);
|
||||||
#ifdef SPIN_ON_LAUNCH
|
#ifdef SPIN_ON_LAUNCH
|
||||||
@@ -1632,7 +1632,7 @@ SetVelocityComponents (
|
|||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
LanderSounds, LANDER_DESTROYED
|
LanderSounds, LANDER_DESTROYED
|
||||||
), GAME_SOUND_PRIORITY + 1);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1749,7 +1749,7 @@ SetVelocityComponents (
|
|||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
LanderSounds, LANDER_SHOOTS
|
LanderSounds, LANDER_SHOOTS
|
||||||
), GAME_SOUND_PRIORITY);
|
), NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
|
|
||||||
wdx = SHUTTLE_FIRE_WAIT;
|
wdx = SHUTTLE_FIRE_WAIT;
|
||||||
if (GET_GAME_STATE (IMPROVED_LANDER_SHOT))
|
if (GET_GAME_STATE (IMPROVED_LANDER_SHOT))
|
||||||
@@ -1999,7 +1999,7 @@ PlanetSide (PMENU_STATE pMS)
|
|||||||
{
|
{
|
||||||
PSD.InTransit = TRUE;
|
PSD.InTransit = TRUE;
|
||||||
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_RETURNS),
|
PlaySound (SetAbsSoundIndex (LanderSounds, LANDER_RETURNS),
|
||||||
GAME_SOUND_PRIORITY + 1);
|
NotPositional (), NULL, GAME_SOUND_PRIORITY + 1);
|
||||||
|
|
||||||
TimeIn = GetTimeCounter ();
|
TimeIn = GetTimeCounter ();
|
||||||
for (index = NUM_LANDING_DELTAS; index >= 0; --index)
|
for (index = NUM_LANDING_DELTAS; index >= 0; --index)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ MakeReport (SOUND ReadOutSounds, UNICODE *pStr, COUNT StrLen)
|
|||||||
font_DrawText (&t);
|
font_DrawText (&t);
|
||||||
ClearSemaphore (GraphicsSem);
|
ClearSemaphore (GraphicsSem);
|
||||||
|
|
||||||
PlaySound (ReadOutSounds, GAME_SOUND_PRIORITY);
|
PlaySound (ReadOutSounds, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
|
|
||||||
if (t.pStr[0] == ',')
|
if (t.pStr[0] == ',')
|
||||||
TimeOut += ONE_SECOND / 4;
|
TimeOut += ONE_SECOND / 4;
|
||||||
|
|||||||
@@ -996,7 +996,7 @@ DoScan (PMENU_STATE pMS)
|
|||||||
|| GLOBAL_SIS (CrewEnlisted) == 0)
|
|| GLOBAL_SIS (CrewEnlisted) == 0)
|
||||||
{
|
{
|
||||||
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
PlaySoundEffect (SetAbsSoundIndex (MenuSounds, 2),
|
||||||
0, GAME_SOUND_PRIORITY);
|
0, NotPositional (), NULL, GAME_SOUND_PRIORITY);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+105
-6
@@ -620,6 +620,7 @@ ProcessCollisions (HELEMENT hSuccElement, register ELEMENTPTR ElementPtr,
|
|||||||
#define MAX_SOUNDS 8
|
#define MAX_SOUNDS 8
|
||||||
static BYTE num_sounds;
|
static BYTE num_sounds;
|
||||||
static SOUND sound_buf[MAX_SOUNDS];
|
static SOUND sound_buf[MAX_SOUNDS];
|
||||||
|
static ELEMENTPTR sound_posobj[MAX_SOUNDS];
|
||||||
|
|
||||||
static VIEW_STATE
|
static VIEW_STATE
|
||||||
PreProcessQueue (PSIZE pscroll_x, PSIZE pscroll_y)
|
PreProcessQueue (PSIZE pscroll_x, PSIZE pscroll_y)
|
||||||
@@ -882,7 +883,6 @@ PostProcessQueue (register VIEW_STATE view_state, register SIZE scroll_x,
|
|||||||
{
|
{
|
||||||
hNextElement = GetSuccElement (ElementPtr);
|
hNextElement = GetSuccElement (ElementPtr);
|
||||||
UnlockElement (hElement);
|
UnlockElement (hElement);
|
||||||
|
|
||||||
RemoveElement (hElement);
|
RemoveElement (hElement);
|
||||||
FreeElement (hElement);
|
FreeElement (hElement);
|
||||||
}
|
}
|
||||||
@@ -1053,7 +1053,8 @@ InitDisplayList (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PlaySound (SOUND S, BYTE Priority)
|
PlaySound (SOUND S, SoundPosition Pos, ELEMENTPTR PositionalObject,
|
||||||
|
BYTE Priority)
|
||||||
{
|
{
|
||||||
#define MIN_FX_CHANNEL 1
|
#define MIN_FX_CHANNEL 1
|
||||||
#define NUM_FX_CHANNELS 4 /* obviously number of channels
|
#define NUM_FX_CHANNELS 4 /* obviously number of channels
|
||||||
@@ -1098,7 +1099,7 @@ PlaySound (SOUND S, BYTE Priority)
|
|||||||
}
|
}
|
||||||
lru_channel[NUM_FX_CHANNELS - 1] = chan;
|
lru_channel[NUM_FX_CHANNELS - 1] = chan;
|
||||||
|
|
||||||
PlaySoundEffect (S, chan + MIN_FX_CHANNEL, Priority);
|
PlaySoundEffect (S, chan + MIN_FX_CHANNEL, Pos, PositionalObject, Priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
UWORD nth_frame;
|
UWORD nth_frame;
|
||||||
@@ -1108,12 +1109,30 @@ RedrawQueue (BOOLEAN clear)
|
|||||||
{
|
{
|
||||||
SIZE scroll_x, scroll_y;
|
SIZE scroll_x, scroll_y;
|
||||||
VIEW_STATE view_state;
|
VIEW_STATE view_state;
|
||||||
|
int i;
|
||||||
|
|
||||||
SetContext (StatusContext);
|
SetContext (StatusContext);
|
||||||
|
|
||||||
view_state = PreProcessQueue (&scroll_x, &scroll_y);
|
view_state = PreProcessQueue (&scroll_x, &scroll_y);
|
||||||
PostProcessQueue (view_state, scroll_x, scroll_y);
|
PostProcessQueue (view_state, scroll_x, scroll_y);
|
||||||
|
|
||||||
|
if (optStereoSFX)
|
||||||
|
{
|
||||||
|
for (i = 0; i <= NUM_FX_CHANNELS; ++i)
|
||||||
|
{
|
||||||
|
/* Updates positional sound effects */
|
||||||
|
|
||||||
|
ELEMENTPTR posobj;
|
||||||
|
if (ChannelPlaying (i) && ((posobj = GetPositionalObject (i)) != NULL))
|
||||||
|
{
|
||||||
|
SoundPosition pos;
|
||||||
|
pos = CalcSoundPosition (posobj);
|
||||||
|
if (pos.positional)
|
||||||
|
UpdateSoundPosition (i, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SetContext (SpaceContext);
|
SetContext (SpaceContext);
|
||||||
if (LOBYTE (GLOBAL (CurrentActivity)) == SUPER_MELEE
|
if (LOBYTE (GLOBAL (CurrentActivity)) == SUPER_MELEE
|
||||||
|| !(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD)))
|
|| !(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD)))
|
||||||
@@ -1139,11 +1158,15 @@ RedrawQueue (BOOLEAN clear)
|
|||||||
if (num_sounds > 0)
|
if (num_sounds > 0)
|
||||||
{
|
{
|
||||||
SOUND *pSound;
|
SOUND *pSound;
|
||||||
|
ELEMENTPTR *pSoundPosObj;
|
||||||
|
|
||||||
pSound = sound_buf;
|
pSound = sound_buf;
|
||||||
|
pSoundPosObj = sound_posobj;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
PlaySound (*pSound++, GAME_SOUND_PRIORITY);
|
SoundPosition pos = CalcSoundPosition (*pSoundPosObj);
|
||||||
|
PlaySound (*pSound++, pos, *pSoundPosObj++,
|
||||||
|
GAME_SOUND_PRIORITY);
|
||||||
} while (--num_sounds);
|
} while (--num_sounds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1151,15 +1174,59 @@ RedrawQueue (BOOLEAN clear)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessSound (SOUND Sound)
|
ProcessSound (SOUND Sound, ELEMENTPTR PositionalObject)
|
||||||
{
|
{
|
||||||
if (Sound == (SOUND)~0)
|
if (Sound == (SOUND)~0)
|
||||||
{
|
{
|
||||||
memset (sound_buf, 0, sizeof (sound_buf));
|
memset (sound_buf, 0, sizeof (sound_buf));
|
||||||
|
memset (sound_posobj, 0, sizeof (sound_posobj));
|
||||||
num_sounds = MAX_SOUNDS;
|
num_sounds = MAX_SOUNDS;
|
||||||
}
|
}
|
||||||
else if (num_sounds < MAX_SOUNDS)
|
else if (num_sounds < MAX_SOUNDS)
|
||||||
sound_buf[num_sounds++] = Sound;
|
{
|
||||||
|
sound_buf[num_sounds] = Sound;
|
||||||
|
sound_posobj[num_sounds++] = PositionalObject;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundPosition
|
||||||
|
CalcSoundPosition (ELEMENTPTR ElementPtr)
|
||||||
|
{
|
||||||
|
SoundPosition pos;
|
||||||
|
|
||||||
|
if (ElementPtr == NULL)
|
||||||
|
{
|
||||||
|
pos.x = pos.y = 0;
|
||||||
|
pos.positional = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GRAPHICS_PRIM objtype;
|
||||||
|
|
||||||
|
objtype = GetPrimType (&DisplayArray[ElementPtr->PrimIndex]);
|
||||||
|
if (objtype == LINE_PRIM)
|
||||||
|
{
|
||||||
|
pos.x = DisplayArray[ElementPtr->PrimIndex].Object.Line.first.x;
|
||||||
|
pos.y = DisplayArray[ElementPtr->PrimIndex].Object.Line.first.y;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pos.x = DisplayArray[ElementPtr->PrimIndex].Object.Point.x;
|
||||||
|
pos.y = DisplayArray[ElementPtr->PrimIndex].Object.Point.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
pos.x -= (SPACE_WIDTH >> 1);
|
||||||
|
pos.y -= (SPACE_HEIGHT >> 1);
|
||||||
|
pos.positional = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
SoundPosition
|
||||||
|
NotPositional (void)
|
||||||
|
{
|
||||||
|
return CalcSoundPosition (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1190,3 +1257,35 @@ Untarget (ELEMENTPTR ElementPtr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
RemoveElement (HLINK hLink)
|
||||||
|
{
|
||||||
|
if (optStereoSFX)
|
||||||
|
{
|
||||||
|
ELEMENTPTR ElementPtr, PosObj;
|
||||||
|
|
||||||
|
LockElement (hLink, &ElementPtr);
|
||||||
|
if (ElementPtr != NULL)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i <= NUM_FX_CHANNELS; ++i)
|
||||||
|
{
|
||||||
|
if ((PosObj = GetPositionalObject (i)) == ElementPtr)
|
||||||
|
{
|
||||||
|
SetPositionalObject (i, NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; i < num_sounds; ++i)
|
||||||
|
{
|
||||||
|
if (sound_posobj[i] == ElementPtr)
|
||||||
|
{
|
||||||
|
sound_posobj[i] = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UnlockElement (hLink);
|
||||||
|
}
|
||||||
|
RemoveQueue (&disp_q, hLink);
|
||||||
|
}
|
||||||
|
|||||||
@@ -80,16 +80,14 @@ ToggleSoundEffect (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PlaySoundEffect (SOUND S, COUNT Channel, BYTE Priority)
|
PlaySoundEffect (SOUND S, COUNT Channel, SoundPosition Pos,
|
||||||
|
void *PositionalObject, BYTE Priority)
|
||||||
{
|
{
|
||||||
if (!(GLOBAL (glob_flags) & SOUND_DISABLED))
|
if (!(GLOBAL (glob_flags) & SOUND_DISABLED))
|
||||||
{
|
{
|
||||||
SetChannelVolume (Channel, MAX_VOLUME >> 1, Priority);
|
SetChannelVolume (Channel, MAX_VOLUME >> 1, Priority);
|
||||||
SetChannelRate (Channel, GetSampleRate (S), Priority);
|
SetChannelRate (Channel, GetSampleRate (S), Priority);
|
||||||
PlayChannel (Channel,
|
PlayChannel (Channel, GetSampleAddress (S), Pos, PositionalObject, Priority);
|
||||||
GetSampleAddress (S),
|
|
||||||
GetSampleLength (S),
|
|
||||||
0, 0, Priority);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-3
@@ -300,13 +300,13 @@ ship_postprocess (register
|
|||||||
{
|
{
|
||||||
HELEMENT *WeaponPtr;
|
HELEMENT *WeaponPtr;
|
||||||
STARSHIPPTR StarShipPtr;
|
STARSHIPPTR StarShipPtr;
|
||||||
|
BOOLEAN played_sfx = FALSE;
|
||||||
|
|
||||||
GetElementStarShip (ElementPtr, &StarShipPtr);
|
GetElementStarShip (ElementPtr, &StarShipPtr);
|
||||||
WeaponPtr = &Weapon[0];
|
WeaponPtr = &Weapon[0];
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
HELEMENT w;
|
HELEMENT w;
|
||||||
|
|
||||||
w = *WeaponPtr++;
|
w = *WeaponPtr++;
|
||||||
if (w)
|
if (w)
|
||||||
{
|
{
|
||||||
@@ -314,12 +314,19 @@ ship_postprocess (register
|
|||||||
|
|
||||||
EPtr = LockElement (w, &EPtr);
|
EPtr = LockElement (w, &EPtr);
|
||||||
SetElementStarShip (EPtr, StarShipPtr);
|
SetElementStarShip (EPtr, StarShipPtr);
|
||||||
|
if (!played_sfx)
|
||||||
|
{
|
||||||
|
ProcessSound (RDPtr->ship_data.ship_sounds, EPtr);
|
||||||
|
played_sfx = TRUE;
|
||||||
|
}
|
||||||
UnlockElement (w);
|
UnlockElement (w);
|
||||||
|
|
||||||
PutElement (w);
|
PutElement (w);
|
||||||
}
|
}
|
||||||
} while (--num_weapons);
|
} while (--num_weapons);
|
||||||
ProcessSound (RDPtr->ship_data.ship_sounds);
|
|
||||||
|
if (!played_sfx)
|
||||||
|
ProcessSound (RDPtr->ship_data.ship_sounds, ElementPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
StarShipPtr->weapon_counter =
|
StarShipPtr->weapon_counter =
|
||||||
@@ -357,7 +364,7 @@ collision (PELEMENT
|
|||||||
damage = TARGET_DAMAGED_FOR_1_PT + (damage >> 1);
|
damage = TARGET_DAMAGED_FOR_1_PT + (damage >> 1);
|
||||||
if (damage > TARGET_DAMAGED_FOR_6_PLUS_PT)
|
if (damage > TARGET_DAMAGED_FOR_6_PLUS_PT)
|
||||||
damage = TARGET_DAMAGED_FOR_6_PLUS_PT;
|
damage = TARGET_DAMAGED_FOR_6_PLUS_PT;
|
||||||
ProcessSound (SetAbsSoundIndex (GameSounds, damage));
|
ProcessSound (SetAbsSoundIndex (GameSounds, damage), ElementPtr0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void) pPt0; /* Satisfying compiler (unused parameter) */
|
(void) pPt0; /* Satisfying compiler (unused parameter) */
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ androsynth_postprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* COMET_ON */
|
/* COMET_ON */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
ElementPtr->turn_wait = 0;
|
ElementPtr->turn_wait = 0;
|
||||||
ElementPtr->thrust_wait = 0;
|
ElementPtr->thrust_wait = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ arilou_preprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* HYPERJUMP */
|
/* HYPERJUMP */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ black_urquan_postprocess (PELEMENT ElementPtr)
|
|||||||
spawn_gas_cloud (ElementPtr);
|
spawn_gas_cloud (ElementPtr);
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter = SPECIAL_WAIT;
|
StarShipPtr->special_counter = SPECIAL_WAIT;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ crystal_postprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* CRYSTAL_FRAGMENTS */
|
/* CRYSTAL_FRAGMENTS */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -285,7 +285,7 @@ doggy_death (PELEMENT ElementPtr)
|
|||||||
GetElementStarShip (ElementPtr, &StarShipPtr);
|
GetElementStarShip (ElementPtr, &StarShipPtr);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* DOGGY_DIES */
|
/* DOGGY_DIES */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3), ElementPtr);
|
||||||
|
|
||||||
ElementPtr->state_flags &= ~DISAPPEARING;
|
ElementPtr->state_flags &= ~DISAPPEARING;
|
||||||
ElementPtr->state_flags |= NONSOLID | FINITE_LIFE;
|
ElementPtr->state_flags |= NONSOLID | FINITE_LIFE;
|
||||||
@@ -316,7 +316,7 @@ doggy_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT ElementPtr1, PPOINT
|
|||||||
GetElementStarShip (ElementPtr0, &StarShipPtr);
|
GetElementStarShip (ElementPtr0, &StarShipPtr);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* DOGGY_STEALS_ENERGY */
|
/* DOGGY_STEALS_ENERGY */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), ElementPtr0);
|
||||||
GetElementStarShip (ElementPtr1, &StarShipPtr);
|
GetElementStarShip (ElementPtr1, &StarShipPtr);
|
||||||
if (StarShipPtr->RaceDescPtr->ship_info.energy_level < ENERGY_DRAIN)
|
if (StarShipPtr->RaceDescPtr->ship_info.energy_level < ENERGY_DRAIN)
|
||||||
DeltaEnergy (ElementPtr1, -StarShipPtr->RaceDescPtr->ship_info.energy_level);
|
DeltaEnergy (ElementPtr1, -StarShipPtr->RaceDescPtr->ship_info.energy_level);
|
||||||
@@ -373,6 +373,10 @@ spawn_doggy (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
SetElementStarShip (DoggyElementPtr, StarShipPtr);
|
SetElementStarShip (DoggyElementPtr, StarShipPtr);
|
||||||
|
|
||||||
|
ProcessSound (SetAbsSoundIndex (
|
||||||
|
/* RELEASE_DOGGY */
|
||||||
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 4), DoggyElementPtr);
|
||||||
|
|
||||||
UnlockElement (hDoggyElement);
|
UnlockElement (hDoggyElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -533,10 +537,6 @@ chenjesu_postprocess (PELEMENT ElementPtr)
|
|||||||
&& DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST))
|
&& DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST))
|
||||||
{
|
{
|
||||||
spawn_doggy (ElementPtr);
|
spawn_doggy (ElementPtr);
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
|
||||||
/* RELEASE_DOGGY */
|
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 4));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StarShipPtr->special_counter = 1;
|
StarShipPtr->special_counter = 1;
|
||||||
|
|||||||
@@ -317,9 +317,14 @@ chmmr_postprocess (PELEMENT ElementPtr)
|
|||||||
&& DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST))
|
&& DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST))
|
||||||
{
|
{
|
||||||
COUNT facing;
|
COUNT facing;
|
||||||
|
ELEMENTPTR ShipElementPtr;
|
||||||
|
|
||||||
|
LockElement (ElementPtr->hTarget, &ShipElementPtr);
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ShipElementPtr);
|
||||||
|
|
||||||
|
UnlockElement (ElementPtr->hTarget);
|
||||||
|
|
||||||
facing = 0;
|
facing = 0;
|
||||||
if (TrackShip (ElementPtr, &facing) >= 0)
|
if (TrackShip (ElementPtr, &facing) >= 0)
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ druuge_preprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* BURN UP CREW */
|
/* BURN UP CREW */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
|
|
||||||
DeltaCrew (ElementPtr, -1);
|
DeltaCrew (ElementPtr, -1);
|
||||||
DeltaEnergy (ElementPtr, SPECIAL_ENERGY_COST);
|
DeltaEnergy (ElementPtr, SPECIAL_ENERGY_COST);
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ spawn_point_defense (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* POINT_DEFENSE_LASER */
|
/* POINT_DEFENSE_LASER */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
PaidFor = TRUE;
|
PaidFor = TRUE;
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ ilwrath_preprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* CLOAKING_OFF */
|
/* CLOAKING_OFF */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), ElementPtr);
|
||||||
SetPrimColor (lpPrim,
|
SetPrimColor (lpPrim,
|
||||||
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01));
|
BUILD_COLOR (MAKE_RGB15 (0x00, 0x00, 0x14), 0x01));
|
||||||
if (weapon_discharge)
|
if (weapon_discharge)
|
||||||
@@ -347,7 +347,7 @@ ilwrath_preprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* CLOAKING_ON */
|
/* CLOAKING_ON */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ pump_up_postprocess (PELEMENT ElementPtr)
|
|||||||
EPtr->current.image.frame, NUM_PUMP_ANIMS
|
EPtr->current.image.frame, NUM_PUMP_ANIMS
|
||||||
);
|
);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), EPtr);
|
||||||
}
|
}
|
||||||
EPtr->thrust_wait = LEVEL_COUNTER;
|
EPtr->thrust_wait = LEVEL_COUNTER;
|
||||||
}
|
}
|
||||||
@@ -229,7 +229,7 @@ pump_up_postprocess (PELEMENT ElementPtr)
|
|||||||
SINE (angle, WORLD_TO_VELOCITY (PUMPUP_SPEED)));
|
SINE (angle, WORLD_TO_VELOCITY (PUMPUP_SPEED)));
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3), EPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
UnlockElement (hPumpUp);
|
UnlockElement (hPumpUp);
|
||||||
@@ -624,10 +624,14 @@ melnorme_postprocess (PELEMENT ElementPtr)
|
|||||||
initialize_confusion (ElementPtr, &Confusion);
|
initialize_confusion (ElementPtr, &Confusion);
|
||||||
if (Confusion)
|
if (Confusion)
|
||||||
{
|
{
|
||||||
PutElement (Confusion);
|
ELEMENTPTR CMissilePtr;
|
||||||
|
LockElement (Confusion, &CMissilePtr);
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), CMissilePtr);
|
||||||
|
|
||||||
|
UnlockElement (Confusion);
|
||||||
|
PutElement (Confusion);
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ mmrnmhrm_postprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* TRANSFORM */
|
/* TRANSFORM */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
DeltaEnergy (ElementPtr,
|
DeltaEnergy (ElementPtr,
|
||||||
-StarShipPtr->RaceDescPtr->characteristics.special_energy_cost);
|
-StarShipPtr->RaceDescPtr->characteristics.special_energy_cost);
|
||||||
|
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ mycon_postprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* GROW_NEW_CREW */
|
/* GROW_NEW_CREW */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
if ((add_crew = REGENERATION_AMOUNT) >
|
if ((add_crew = REGENERATION_AMOUNT) >
|
||||||
StarShipPtr->RaceDescPtr->ship_info.max_crew - ElementPtr->crew_level)
|
StarShipPtr->RaceDescPtr->ship_info.max_crew - ElementPtr->crew_level)
|
||||||
add_crew = StarShipPtr->RaceDescPtr->ship_info.max_crew - ElementPtr->crew_level;
|
add_crew = StarShipPtr->RaceDescPtr->ship_info.max_crew - ElementPtr->crew_level;
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ LeftShip:
|
|||||||
ElementPtr->state_flags |= DISAPPEARING;
|
ElementPtr->state_flags |= DISAPPEARING;
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 4));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 4), ElementPtr);
|
||||||
goto LeftShip;
|
goto LeftShip;
|
||||||
}
|
}
|
||||||
else if (randval < (0x0100 / 2 + 0x0100 / 16))
|
else if (randval < (0x0100 / 2 + 0x0100 / 16))
|
||||||
@@ -432,7 +432,7 @@ LeftShip:
|
|||||||
GetFrameCount (ElementPtr->next.image.farray[0]) - 1);
|
GetFrameCount (ElementPtr->next.image.farray[0]) - 1);
|
||||||
ModifySilhouette (ShipPtr, &s, 0);
|
ModifySilhouette (ShipPtr, &s, 0);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3), ElementPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -779,7 +779,7 @@ marine_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT ElementPtr1, PPOIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), ElementPtr1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ElementPtr0->state_flags &= ~COLLISION;
|
ElementPtr0->state_flags &= ~COLLISION;
|
||||||
@@ -992,7 +992,7 @@ turret_postprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
DeltaCrew (ShipPtr, -1);
|
DeltaCrew (ShipPtr, -1);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), SpaceMarinePtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ PELEMENT ElementPtr;
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1
|
||||||
));
|
), ElementPtr);
|
||||||
|
|
||||||
ElementPtr->life_span = PHOENIX_LIFE;
|
ElementPtr->life_span = PHOENIX_LIFE;
|
||||||
SetPrimType (&(GLOBAL (DisplayArray))[ElementPtr->PrimIndex],
|
SetPrimType (&(GLOBAL (DisplayArray))[ElementPtr->PrimIndex],
|
||||||
@@ -532,7 +532,7 @@ PELEMENT ElementPtr;
|
|||||||
} while (CurSound == LastSound);
|
} while (CurSound == LastSound);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, CurSound
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, CurSound
|
||||||
));
|
), ElementPtr);
|
||||||
LastSound = CurSound;
|
LastSound = CurSound;
|
||||||
|
|
||||||
DeltaEnergy (ElementPtr, SPECIAL_ENERGY_COST);
|
DeltaEnergy (ElementPtr, SPECIAL_ENERGY_COST);
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ spawn_point_defense (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* POINT_DEFENSE_LASER */
|
/* POINT_DEFENSE_LASER */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
PaidFor = TRUE;
|
PaidFor = TRUE;
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ harvest_space_junk (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
GetElementStarShip (ElementPtr, &StarShipPtr);
|
GetElementStarShip (ElementPtr, &StarShipPtr);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
DeltaEnergy (ElementPtr, MAX_ENERGY);
|
DeltaEnergy (ElementPtr, MAX_ENERGY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,6 +166,11 @@ spawn_butt_missile (PELEMENT ShipPtr)
|
|||||||
LockElement (ButtMissile, &ButtPtr);
|
LockElement (ButtMissile, &ButtPtr);
|
||||||
ButtPtr->turn_wait = TRACK_WAIT;
|
ButtPtr->turn_wait = TRACK_WAIT;
|
||||||
SetElementStarShip (ButtPtr, StarShipPtr);
|
SetElementStarShip (ButtPtr, StarShipPtr);
|
||||||
|
|
||||||
|
ProcessSound (SetAbsSoundIndex (
|
||||||
|
/* LAUNCH_BUTT_MISSILE */
|
||||||
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ButtPtr);
|
||||||
|
|
||||||
UnlockElement (ButtMissile);
|
UnlockElement (ButtMissile);
|
||||||
PutElement (ButtMissile);
|
PutElement (ButtMissile);
|
||||||
}
|
}
|
||||||
@@ -262,9 +267,6 @@ spathi_postprocess (PELEMENT ElementPtr)
|
|||||||
&& StarShipPtr->special_counter == 0
|
&& StarShipPtr->special_counter == 0
|
||||||
&& DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST))
|
&& DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST))
|
||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
|
||||||
/* LAUNCH_BUTT_MISSILE */
|
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
|
||||||
spawn_butt_missile (ElementPtr);
|
spawn_butt_missile (ElementPtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ syreen_postprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* SYREEN_SONG */
|
/* SYREEN_SONG */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
spawn_crew (ElementPtr);
|
spawn_crew (ElementPtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ thraddash_preprocess (PELEMENT ElementPtr)
|
|||||||
InsertElement (hTrailElement, GetHeadElement ());
|
InsertElement (hTrailElement, GetHeadElement ());
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ umgah_preprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* ZIP_BACKWARDS */
|
/* ZIP_BACKWARDS */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
facing = FACING_TO_ANGLE (StarShipPtr->ShipFacing) + HALF_CIRCLE;
|
facing = FACING_TO_ANGLE (StarShipPtr->ShipFacing) + HALF_CIRCLE;
|
||||||
DeltaVelocityComponents (&ElementPtr->velocity,
|
DeltaVelocityComponents (&ElementPtr->velocity,
|
||||||
COSINE (facing, WORLD_TO_VELOCITY (JUMP_DIST)),
|
COSINE (facing, WORLD_TO_VELOCITY (JUMP_DIST)),
|
||||||
|
|||||||
@@ -164,15 +164,17 @@ fighter_postprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
LockElement (Laser, &LaserPtr);
|
LockElement (Laser, &LaserPtr);
|
||||||
SetElementStarShip (LaserPtr, StarShipPtr);
|
SetElementStarShip (LaserPtr, StarShipPtr);
|
||||||
|
|
||||||
|
ProcessSound (SetAbsSoundIndex (
|
||||||
|
/* FIGHTER_ZAP */
|
||||||
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), LaserPtr);
|
||||||
|
|
||||||
UnlockElement (Laser);
|
UnlockElement (Laser);
|
||||||
PutElement (Laser);
|
PutElement (Laser);
|
||||||
}
|
}
|
||||||
|
|
||||||
ElementPtr->postprocess_func = 0;
|
ElementPtr->postprocess_func = 0;
|
||||||
ElementPtr->thrust_wait = FIGHTER_WEAPON_WAIT;
|
ElementPtr->thrust_wait = FIGHTER_WEAPON_WAIT;
|
||||||
ProcessSound (SetAbsSoundIndex (
|
|
||||||
/* FIGHTER_ZAP */
|
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -358,7 +360,7 @@ fighter_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT ElementPtr1, PPOI
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* FIGHTERS_RETURN */
|
/* FIGHTERS_RETURN */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 3), ElementPtr1);
|
||||||
DeltaCrew (ElementPtr1, 1);
|
DeltaCrew (ElementPtr1, 1);
|
||||||
ElementPtr0->state_flags |= DISAPPEARING | COLLISION;
|
ElementPtr0->state_flags |= DISAPPEARING | COLLISION;
|
||||||
}
|
}
|
||||||
@@ -513,7 +515,7 @@ urquan_postprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* LAUNCH_FIGHTERS */
|
/* LAUNCH_FIGHTERS */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
spawn_fighters (ElementPtr);
|
spawn_fighters (ElementPtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter = SPECIAL_WAIT;
|
StarShipPtr->special_counter = SPECIAL_WAIT;
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ utwig_preprocess (PELEMENT ElementPtr)
|
|||||||
ElementPtr->life_span - (NORMAL_LIFE + 1));
|
ElementPtr->life_span - (NORMAL_LIFE + 1));
|
||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(StarShipPtr->cur_status_flags & SPECIAL))
|
if (!(StarShipPtr->cur_status_flags & SPECIAL))
|
||||||
@@ -289,7 +289,7 @@ utwig_preprocess (PELEMENT ElementPtr)
|
|||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), ElementPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ limpet_collision (PELEMENT ElementPtr0, PPOINT pPt0, PELEMENT
|
|||||||
GetElementStarShip (ElementPtr0, &StarShipPtr);
|
GetElementStarShip (ElementPtr0, &StarShipPtr);
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* LIMPET_AFFIXES */
|
/* LIMPET_AFFIXES */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 2), ElementPtr1);
|
||||||
s.frame = SetAbsFrameIndex (
|
s.frame = SetAbsFrameIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.weapon[0], (COUNT)TFB_Random ()
|
StarShipPtr->RaceDescPtr->ship_data.weapon[0], (COUNT)TFB_Random ()
|
||||||
);
|
);
|
||||||
@@ -290,7 +290,7 @@ vux_postprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* LAUNCH_LIMPET */
|
/* LAUNCH_LIMPET */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
spawn_limpets (ElementPtr);
|
spawn_limpets (ElementPtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ yehat_postprocess (PELEMENT ElementPtr)
|
|||||||
|
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* YEHAT_SHIELD_ON */
|
/* YEHAT_SHIELD_ON */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST);
|
DeltaEnergy (ElementPtr, -SPECIAL_ENERGY_COST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ zoqfotpik_postprocess (PELEMENT ElementPtr)
|
|||||||
{
|
{
|
||||||
ProcessSound (SetAbsSoundIndex (
|
ProcessSound (SetAbsSoundIndex (
|
||||||
/* STICK_OUT_TONGUE */
|
/* STICK_OUT_TONGUE */
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1));
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1), ElementPtr);
|
||||||
|
|
||||||
StarShipPtr->special_counter =
|
StarShipPtr->special_counter =
|
||||||
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
StarShipPtr->RaceDescPtr->characteristics.special_wait;
|
||||||
|
|||||||
@@ -201,7 +201,8 @@ extern void StopMusic (void);
|
|||||||
extern void ResumeMusic (void);
|
extern void ResumeMusic (void);
|
||||||
extern void PauseMusic (void);
|
extern void PauseMusic (void);
|
||||||
extern void ToggleSoundEffect (void);
|
extern void ToggleSoundEffect (void);
|
||||||
extern void PlaySoundEffect (SOUND S, COUNT Channel, BYTE Priority);
|
extern void PlaySoundEffect (SOUND S, COUNT Channel, SoundPosition Pos,
|
||||||
|
void *PositionalObject, BYTE Priority);
|
||||||
|
|
||||||
extern BOOLEAN CopyProtection (void);
|
extern BOOLEAN CopyProtection (void);
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ new_ship (PELEMENT DeadShipPtr)
|
|||||||
{
|
{
|
||||||
STARSHIPPTR DeadStarShipPtr;
|
STARSHIPPTR DeadStarShipPtr;
|
||||||
|
|
||||||
ProcessSound ((SOUND)~0);
|
ProcessSound ((SOUND)~0, NULL);
|
||||||
|
|
||||||
GetElementStarShip (DeadShipPtr, &DeadStarShipPtr);
|
GetElementStarShip (DeadShipPtr, &DeadStarShipPtr);
|
||||||
if (!(DeadShipPtr->state_flags & PLAYER_SHIP))
|
if (!(DeadShipPtr->state_flags & PLAYER_SHIP))
|
||||||
@@ -288,7 +288,7 @@ ship_death (PELEMENT ShipPtr)
|
|||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (
|
PlaySound (SetAbsSoundIndex (
|
||||||
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1
|
StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1
|
||||||
), GAME_SOUND_PRIORITY + 1);
|
), CalcSoundPosition (ShipPtr), ShipPtr, GAME_SOUND_PRIORITY + 1);
|
||||||
|
|
||||||
DeltaCrew ((ELEMENTPTR)ShipPtr, -(SIZE)ShipPtr->crew_level);
|
DeltaCrew ((ELEMENTPTR)ShipPtr, -(SIZE)ShipPtr->crew_level);
|
||||||
if (VictoriousStarShipPtr == 0)
|
if (VictoriousStarShipPtr == 0)
|
||||||
@@ -299,7 +299,7 @@ ship_death (PELEMENT ShipPtr)
|
|||||||
ShipPtr->preprocess_func = explosion_preprocess;
|
ShipPtr->preprocess_func = explosion_preprocess;
|
||||||
|
|
||||||
PlaySound (SetAbsSoundIndex (GameSounds, SHIP_EXPLODES),
|
PlaySound (SetAbsSoundIndex (GameSounds, SHIP_EXPLODES),
|
||||||
GAME_SOUND_PRIORITY + 1);
|
CalcSoundPosition (ShipPtr), ShipPtr, GAME_SOUND_PRIORITY + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ weapon_collision (PELEMENT
|
|||||||
damage = TARGET_DAMAGED_FOR_1_PT + (damage >> 1);
|
damage = TARGET_DAMAGED_FOR_1_PT + (damage >> 1);
|
||||||
if (damage > TARGET_DAMAGED_FOR_6_PLUS_PT)
|
if (damage > TARGET_DAMAGED_FOR_6_PLUS_PT)
|
||||||
damage = TARGET_DAMAGED_FOR_6_PLUS_PT;
|
damage = TARGET_DAMAGED_FOR_6_PLUS_PT;
|
||||||
ProcessSound (SetAbsSoundIndex (GameSounds, damage));
|
ProcessSound (SetAbsSoundIndex (GameSounds, damage), HitElementPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetPrimType (&DisplayArray[WeaponElementPtr->PrimIndex]) != LINE_PRIM)
|
if (GetPrimType (&DisplayArray[WeaponElementPtr->PrimIndex]) != LINE_PRIM)
|
||||||
|
|||||||
+7
-1
@@ -97,7 +97,8 @@ main (int argc, char *argv[])
|
|||||||
MENU_OPT,
|
MENU_OPT,
|
||||||
FONT_OPT,
|
FONT_OPT,
|
||||||
SCROLL_OPT,
|
SCROLL_OPT,
|
||||||
SOUND_OPT
|
SOUND_OPT,
|
||||||
|
STEREOSFX_OPT
|
||||||
};
|
};
|
||||||
|
|
||||||
int option_index = 0, c;
|
int option_index = 0, c;
|
||||||
@@ -126,6 +127,7 @@ main (int argc, char *argv[])
|
|||||||
{"font", 1, NULL, FONT_OPT},
|
{"font", 1, NULL, FONT_OPT},
|
||||||
{"scroll", 1, NULL, SCROLL_OPT},
|
{"scroll", 1, NULL, SCROLL_OPT},
|
||||||
{"sound", 1, NULL, SOUND_OPT},
|
{"sound", 1, NULL, SOUND_OPT},
|
||||||
|
{"stereosfx", 0, NULL, STEREOSFX_OPT},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -277,6 +279,9 @@ main (int argc, char *argv[])
|
|||||||
snddriver = TFB_SOUNDDRIVER_MIXSDL;
|
snddriver = TFB_SOUNDDRIVER_MIXSDL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case STEREOSFX_OPT:
|
||||||
|
optStereoSFX = TRUE;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf ("\nOption %s not found!\n", long_options[option_index].name);
|
printf ("\nOption %s not found!\n", long_options[option_index].name);
|
||||||
case '?':
|
case '?':
|
||||||
@@ -298,6 +303,7 @@ main (int argc, char *argv[])
|
|||||||
printf(" -q, --audioquality=QUALITY (high, medium or low, default medium)\n");
|
printf(" -q, --audioquality=QUALITY (high, medium or low, default medium)\n");
|
||||||
printf(" -u, --nosubtitles\n");
|
printf(" -u, --nosubtitles\n");
|
||||||
printf(" --sound=DRIVER (openal, mixsdl, none; default mixsdl)\n");
|
printf(" --sound=DRIVER (openal, mixsdl, none; default mixsdl)\n");
|
||||||
|
printf(" --stereosfx (enables positional sound effects, currently only for openal)\n");
|
||||||
printf("The following options can take either '3do' or 'pc' as an option:\n");
|
printf("The following options can take either '3do' or 'pc' as an option:\n");
|
||||||
printf(" -m, --music : Music version (default 3do)\n");
|
printf(" -m, --music : Music version (default 3do)\n");
|
||||||
printf(" --cscan : coarse-scan display, pc=text, 3do=hieroglyphs (default 3do)\n");
|
printf(" --cscan : coarse-scan display, pc=text, 3do=hieroglyphs (default 3do)\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user