mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-02 06:37:58 +03:00
vars: pull Mn*
This commit is contained in:
parent
3eea612403
commit
f5d33c2a1e
3 changed files with 7 additions and 26 deletions
|
@ -36,14 +36,17 @@ typedef enum SAMPLE_FLAG {
|
||||||
VOLUME_WIBBLE = 1 << 14,
|
VOLUME_WIBBLE = 1 << 14,
|
||||||
} SAMPLE_FLAG;
|
} SAMPLE_FLAG;
|
||||||
|
|
||||||
|
static MN_SFX_PLAY_INFO SFXPlaying[MAX_PLAYING_FX];
|
||||||
|
static int32_t MnSoundMasterVolumeDefault = 32;
|
||||||
|
static int16_t MnAmbientLookup[MAX_AMBIENT_FX];
|
||||||
|
static int32_t MnAmbientLookupIdx;
|
||||||
|
|
||||||
void mn_reset_sound_effects()
|
void mn_reset_sound_effects()
|
||||||
{
|
{
|
||||||
if (!SoundIsActive) {
|
if (!SoundIsActive) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MnSoundMasterVolume = MnSoundMasterVolumeDefault;
|
MnSoundMasterVolume = MnSoundMasterVolumeDefault;
|
||||||
MnSoundMasterFadeOn = 0;
|
|
||||||
MnSoundFadeCounter = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < MAX_PLAYING_FX; i++) {
|
for (int i = 0; i < MAX_PLAYING_FX; i++) {
|
||||||
mn_clear_fx_slot(&SFXPlaying[i]);
|
mn_clear_fx_slot(&SFXPlaying[i]);
|
||||||
|
@ -313,19 +316,6 @@ void mn_update_sound_effects()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MnSoundsPlaying = 0;
|
|
||||||
|
|
||||||
if (MnSoundMasterFadeOn) {
|
|
||||||
if (MnSoundFadeCounter == MnSoundFadeRate) {
|
|
||||||
MnSoundFadeCounter = 0;
|
|
||||||
if (MnSoundMasterVolume > 0) {
|
|
||||||
MnSoundMasterVolume--;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
MnSoundFadeCounter++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < MAX_PLAYING_FX; i++) {
|
for (int i = 0; i < MAX_PLAYING_FX; i++) {
|
||||||
MN_SFX_PLAY_INFO *slot = &SFXPlaying[i];
|
MN_SFX_PLAY_INFO *slot = &SFXPlaying[i];
|
||||||
if (slot->mn_flags & MN_FX_USED) {
|
if (slot->mn_flags & MN_FX_USED) {
|
||||||
|
@ -334,7 +324,6 @@ void mn_update_sound_effects()
|
||||||
&& slot->handle != SOUND_INVALID_HANDLE) {
|
&& slot->handle != SOUND_INVALID_HANDLE) {
|
||||||
S_SoundSetPanAndVolume(
|
S_SoundSetPanAndVolume(
|
||||||
slot->handle, slot->pan, slot->volume);
|
slot->handle, slot->pan, slot->volume);
|
||||||
MnSoundsPlaying++;
|
|
||||||
} else {
|
} else {
|
||||||
if (slot->handle != SOUND_INVALID_HANDLE) {
|
if (slot->handle != SOUND_INVALID_HANDLE) {
|
||||||
S_SoundStopSample(slot->handle);
|
S_SoundStopSample(slot->handle);
|
||||||
|
@ -348,7 +337,6 @@ void mn_update_sound_effects()
|
||||||
&& slot->handle != SOUND_INVALID_HANDLE) {
|
&& slot->handle != SOUND_INVALID_HANDLE) {
|
||||||
S_SoundSetPanAndVolume(
|
S_SoundSetPanAndVolume(
|
||||||
slot->handle, slot->pan, slot->volume);
|
slot->handle, slot->pan, slot->volume);
|
||||||
MnSoundsPlaying++;
|
|
||||||
} else {
|
} else {
|
||||||
if (slot->handle != SOUND_INVALID_HANDLE) {
|
if (slot->handle != SOUND_INVALID_HANDLE) {
|
||||||
S_SoundStopSample(slot->handle);
|
S_SoundStopSample(slot->handle);
|
||||||
|
|
|
@ -36,6 +36,7 @@ void (*EffectRoutines[])(ITEM_INFO *item) = {
|
||||||
};
|
};
|
||||||
|
|
||||||
bool SoundIsActive = true;
|
bool SoundIsActive = true;
|
||||||
|
int32_t MnSoundMasterVolume;
|
||||||
|
|
||||||
int32_t NoInputCount = 0;
|
int32_t NoInputCount = 0;
|
||||||
int32_t IDelay;
|
int32_t IDelay;
|
||||||
|
|
|
@ -92,15 +92,7 @@ extern bool SoundIsActive;
|
||||||
#define CDLoop VAR_U_(0x0045B94C, int32_t)
|
#define CDLoop VAR_U_(0x0045B94C, int32_t)
|
||||||
#define CDNumTracks VAR_U_(0x0045B964, int32_t)
|
#define CDNumTracks VAR_U_(0x0045B964, int32_t)
|
||||||
#define CDFlags ARRAY_(0x00462C20, int16_t, [MAX_CD_TRACKS])
|
#define CDFlags ARRAY_(0x00462C20, int16_t, [MAX_CD_TRACKS])
|
||||||
#define MnSoundMasterVolume VAR_U_(0x0045668C, int32_t)
|
extern int32_t MnSoundMasterVolume;
|
||||||
#define MnSoundMasterVolumeDefault VAR_U_(0x00456690, int32_t)
|
|
||||||
#define SFXPlaying ARRAY_(0x0045E980, MN_SFX_PLAY_INFO, [MAX_PLAYING_FX])
|
|
||||||
#define MnAmbientLookup ARRAY_(0x0045A200, int16_t, [MAX_AMBIENT_FX])
|
|
||||||
#define MnSoundMasterFadeOn VAR_U_(0x0045A21C, int32_t)
|
|
||||||
#define MnSoundFadeCounter VAR_U_(0x0045A220, int32_t)
|
|
||||||
#define MnSoundFadeRate VAR_I_(0x00456694, int32_t, 10)
|
|
||||||
#define MnSoundsPlaying VAR_U_(0x0045A218, int32_t)
|
|
||||||
#define MnAmbientLookupIdx VAR_U_(0x0045A224, int32_t)
|
|
||||||
|
|
||||||
#define CompassStatus VAR_U_(0x0045A0A4, int16_t)
|
#define CompassStatus VAR_U_(0x0045A0A4, int16_t)
|
||||||
#define CompassSpeed VAR_U_(0x0045A0A8, int16_t)
|
#define CompassSpeed VAR_U_(0x0045A0A8, int16_t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue