Commit 324d645a authored by Gerhard Stein's avatar Gerhard Stein

Small sound improvements

parent cc87eb20
......@@ -478,7 +478,7 @@ void CPlayerBase::guideToTarget(const Vector2D<int> &speed)
const int MAX_WALKSOUNDTIMER = 30;
const int MAX_WALKSOUNDTIMER = 27;
void CPlayerBase::playWalkSound()
{
......
......@@ -1737,6 +1737,8 @@ void CPlayerLevel::processSliding()
void CPlayerLevel::processEnterDoor()
{
playWalkSound();
if( getActionStatus(A_KEEN_STAND) )
dontdraw = true;
......
......@@ -45,7 +45,7 @@ bool CAudioResources::readISFintoWaveForm( CSoundSlot &soundslot,
// TODO: Bad instrument. Please tell that also...
return false;
}
OPLEmulator.AlSetFXInst(AL_Sound.inst);
OPLEmulator.AlSetFXInst(AL_Sound.inst);
const SDL_AudioSpec &audioSpec = gSound.getAudioSpec();
......
......@@ -28,6 +28,7 @@ COPLEmulator::~COPLEmulator()
shutdown();
}
void COPLEmulator::AlSetFXInst(Instrument &inst)
{
byte c,m;
......@@ -53,13 +54,20 @@ void COPLEmulator::AlSetFXInst(Instrument &inst)
// This will setup the sound for Adlib Sound or Music
void COPLEmulator::StartOPLforAdlibSound()
{
Chip__WriteReg(4,0x60); // Reset T1 & T2
Chip__WriteReg(4,0x80); // Reset IRQ
Chip__WriteReg(2,0xff); // Set timer 1
Chip__WriteReg(4,0x21); // Start timer 1
Chip__WriteReg(4,0x60);
Chip__WriteReg(4,0x80);
for (int i = 1; i <= 0xf5; i++) // Zero all the registers
{
Chip__WriteReg( i, 0 );
}
Chip__WriteReg( 1, 0x20); // Set WSE=1
// alOut(8, 0); // Set CSM=0 & SEL=0
Chip__WriteReg( 8, 0); // Set CSM=0 & SEL=0
Chip__WriteReg( alEffects, 0);
AlSetFXInst(m_alZeroInst);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment