2019-11-20 16:21:32 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
|
|
|
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
|
|
|
This file is part of PCExhumed.
|
|
|
|
PCExhumed is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
2019-08-26 03:59:14 +00:00
|
|
|
|
|
|
|
#ifndef __sound_h__
|
|
|
|
#define __sound_h__
|
|
|
|
|
2020-04-12 06:09:38 +00:00
|
|
|
#include "raze_sound.h"
|
2020-02-23 19:40:45 +00:00
|
|
|
|
2019-11-22 23:11:37 +00:00
|
|
|
BEGIN_PS_NS
|
|
|
|
|
|
|
|
|
2019-09-18 16:11:06 +00:00
|
|
|
#define kMaxSoundFiles 80
|
|
|
|
#define kMaxSounds 200
|
|
|
|
#define kMaxSoundNameLen 8
|
|
|
|
#define kMaxActiveSounds 8
|
2019-08-26 03:59:14 +00:00
|
|
|
|
2019-11-03 17:32:02 +00:00
|
|
|
#define kCreepyCount 150
|
|
|
|
|
2019-11-24 20:32:07 +00:00
|
|
|
#define MUSIC_ID (-65536)
|
|
|
|
|
2019-08-26 03:59:14 +00:00
|
|
|
enum {
|
2019-08-31 07:47:15 +00:00
|
|
|
kSound0 = 0,
|
|
|
|
kSound1,
|
|
|
|
kSound2,
|
|
|
|
kSound3,
|
|
|
|
kSound4,
|
|
|
|
kSound5,
|
|
|
|
kSound6,
|
|
|
|
kSound7,
|
|
|
|
kSound8,
|
|
|
|
kSound9,
|
2020-02-04 21:45:10 +00:00
|
|
|
kSoundItemSpecial,
|
2019-08-31 07:47:15 +00:00
|
|
|
kSound11,
|
|
|
|
kSoundTorchOn,
|
|
|
|
kSound13,
|
|
|
|
kSound14,
|
|
|
|
kSound15,
|
|
|
|
kSound16,
|
|
|
|
kSound17,
|
|
|
|
kSound18,
|
|
|
|
kSound19,
|
|
|
|
kSound20,
|
|
|
|
kSound21,
|
|
|
|
kSound22,
|
|
|
|
kSound23,
|
|
|
|
kSound24,
|
|
|
|
kSound25,
|
|
|
|
kSound26,
|
|
|
|
kSound27,
|
2020-02-04 21:45:10 +00:00
|
|
|
kSoundJonLaugh2,
|
2019-08-31 07:47:15 +00:00
|
|
|
kSound29,
|
|
|
|
kSound30,
|
|
|
|
kSound31,
|
|
|
|
kSound32,
|
|
|
|
kSound33,
|
|
|
|
kSound34,
|
|
|
|
kSound35,
|
|
|
|
kSound36,
|
|
|
|
kSound38 = 38,
|
|
|
|
kSound39,
|
|
|
|
kSound40,
|
|
|
|
kSound41,
|
2019-11-15 08:04:28 +00:00
|
|
|
kSound42,
|
|
|
|
kSound43,
|
2019-08-31 07:47:15 +00:00
|
|
|
kSound47 = 47,
|
|
|
|
kSound48 = 48,
|
|
|
|
kSoundQTail = 50,
|
|
|
|
kSound52 = 52,
|
|
|
|
kSoundTauntStart = 53,
|
|
|
|
kSoundJonFDie = 60,
|
|
|
|
kSound61,
|
|
|
|
kSound62,
|
|
|
|
kSound63,
|
|
|
|
kSound64,
|
|
|
|
kSound65,
|
|
|
|
kSound66,
|
2020-02-04 21:45:10 +00:00
|
|
|
kSoundMana1,
|
|
|
|
kSoundMana2,
|
|
|
|
kSoundAmmoPickup,
|
2019-08-31 07:47:15 +00:00
|
|
|
kSound70,
|
|
|
|
kSound71,
|
|
|
|
kSound72,
|
|
|
|
kSoundAlarm,
|
|
|
|
kSound74,
|
|
|
|
kSound75,
|
|
|
|
kSound76,
|
|
|
|
kSound77,
|
|
|
|
kSound78,
|
|
|
|
kSound79,
|
2019-08-26 03:59:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern short gMusicVolume;
|
|
|
|
extern short gFXVolume;
|
|
|
|
|
|
|
|
extern short nStopSound;
|
|
|
|
extern short nStoneSound;
|
|
|
|
extern short nSwitchSound;
|
|
|
|
extern short nLocalEyeSect;
|
|
|
|
extern short nElevSound;
|
|
|
|
extern short nCreepyTimer;
|
|
|
|
|
|
|
|
extern short StaticSound[];
|
|
|
|
|
|
|
|
|
2019-09-18 16:11:06 +00:00
|
|
|
void UpdateSounds();
|
2019-11-03 17:32:02 +00:00
|
|
|
void UpdateCreepySounds();
|
2019-08-26 03:59:14 +00:00
|
|
|
|
|
|
|
void InitFX();
|
|
|
|
void FadeSong();
|
2019-12-26 17:29:10 +00:00
|
|
|
int fadecdaudio();
|
2019-08-26 03:59:14 +00:00
|
|
|
int LocalSoundPlaying();
|
2019-09-18 16:11:06 +00:00
|
|
|
void LoadFX();
|
2019-08-26 03:59:14 +00:00
|
|
|
void StopAllSounds();
|
|
|
|
void StopLocalSound();
|
2020-02-23 19:40:45 +00:00
|
|
|
void PlayLocalSound(short nSound, short val, bool unattached = false, EChanFlags cflags = CHANF_NONE);
|
2019-09-19 13:38:28 +00:00
|
|
|
int LoadSound(const char* sound);
|
2019-08-26 03:59:14 +00:00
|
|
|
|
|
|
|
void BendAmbientSound();
|
|
|
|
void CheckAmbience(short nSector);
|
|
|
|
|
2020-02-23 19:40:45 +00:00
|
|
|
void PlayFX2(unsigned short nSound, short nSprite);
|
|
|
|
void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector);
|
|
|
|
inline void D3PlayFX(unsigned short nSound, short nVal)
|
|
|
|
{
|
|
|
|
PlayFX2(nSound, nVal);
|
|
|
|
}
|
2019-08-26 03:59:14 +00:00
|
|
|
void StopSpriteSound(short nSprite);
|
|
|
|
|
|
|
|
void StartSwirlies();
|
|
|
|
void UpdateSwirlies();
|
|
|
|
|
2019-09-21 15:47:55 +00:00
|
|
|
void PlayTitleSound(void);
|
|
|
|
void PlayGameOverSound(void);
|
|
|
|
|
|
|
|
void SoundBigEntrance(void);
|
|
|
|
|
2019-11-22 23:11:37 +00:00
|
|
|
END_PS_NS
|
|
|
|
|
2019-08-26 03:59:14 +00:00
|
|
|
#endif
|