Add reverse engineered sound code

This commit is contained in:
nukeykt 2019-09-19 01:11:06 +09:00 committed by Christoph Oelckers
parent 67f370f17c
commit 6f0163af45
5 changed files with 802 additions and 128 deletions

View file

@ -1861,7 +1861,7 @@ int app_main(int argc, char const* const* argv)
SetupInput();
InitView();
myloadconfig();
LoadStaticSounds();
LoadFX();
setCDaudiovolume(gMusicVolume);
seq_LoadSequences();
InitStatus();

View file

@ -176,6 +176,8 @@ extern short bSlipMode;
extern short nItemTextIndex;
extern const char *gString[];
extern short bNoSound;
extern char g_modDir[BMAX_PATH];
enum {
kPalNormal = 0,

View file

@ -111,6 +111,7 @@ extern int laststatusx;
extern int laststatusy;
void seq_LoadSequences();
int seq_GetFrameSound(int val, int edx);
void seq_MoveSequence(short nSprite, short nSeq, short bx);
int seq_GetSeqPicnum2(short nSeq, short nFrame);
int seq_GetSeqPicnum(short nSeq, short edx, short ebx);

File diff suppressed because it is too large Load diff

View file

@ -2,8 +2,10 @@
#ifndef __sound_h__
#define __sound_h__
#define kMaxSoundFiles 80
#define kMaxSounds 200
#define kMaxSoundFiles 80
#define kMaxSounds 200
#define kMaxSoundNameLen 8
#define kMaxActiveSounds 8
enum {
kSound0 = 0,
@ -88,25 +90,26 @@ extern short nCreepyTimer;
extern short StaticSound[];
int UpdateSounds();
void UpdateSounds();
void InitFX();
void UnInitFX();
void FadeSong();
int LocalSoundPlaying();
int sound_load_file(char *fileName);
void LoadStaticSounds();
void LoadFX();
void StopAllSounds();
void SetLocalChan(int nChannel);
int GetLocalSound();
void UpdateLocalSound();
void StopLocalSound();
void PlayLocalSound(short nSound, int val);
void PlayLocalSound(short nSound, short val);
void BendAmbientSound();
void CheckAmbience(short nSector);
void D3PlayFX(int nSound, int nVal);
short PlayFX2(unsigned short nSound, short nSprite);
short PlayFXAtXYZ(unsigned short ax, int x, int y, int z, int nSector);
short D3PlayFX(unsigned short nSound, short nVal);
void StopSpriteSound(short nSprite);
void StartSwirlies();