ScummVM API documentation
MADS::Dragonsphere::ASound2 Class Reference

#include <asound_dragonsphere.h>

Inheritance diagram for MADS::Dragonsphere::ASound2:
MADS::Dragonsphere::ASound MADS::SoundDriver

Public Member Functions

 ASound2 (Audio::Mixer *mixer)
 
int command (int commandId, int param) override
 
- Public Member Functions inherited from MADS::Dragonsphere::ASound
 ASound (Audio::Mixer *mixer, const Common::Path &filename, int dataOffset, int dataSize)
 
virtual int stop () override
 
int poll () override
 
void noise () override
 
void playSound (int offset)
 
void setVolume (int volume) override
 
- Public Member Functions inherited from MADS::SoundDriver
 SoundDriver (Audio::Mixer *mixer, const Common::Path &filename, int dataOffset, int dataSize)
 

Additional Inherited Members

- Static Public Member Functions inherited from MADS::Dragonsphere::ASound
static void validate (bool isDemo)
 
- Protected Types inherited from MADS::Dragonsphere::ASound
typedef void(ASound::* CallbackFunction) ()
 
- Protected Member Functions inherited from MADS::Dragonsphere::ASound
int isMusicChannelsActive ()
 
int isAnyChannelActive ()
 
void scheduleCallback (CallbackFunction fn)
 
void resetCallbackTimer (uint16 period)
 
void resetCallbackTimerEx (uint16 counter, uint16 period)
 
void setMusicIndex (uint16 idx)
 
uint16 getMusicIndex () const
 
void setScriptVar (int idx, uint8 val)
 
void write (uint8 reg, uint8 value)
 
uint16 getRandomNumber ()
 
void adlib_channelOn (uint8 portIndex)
 
void signalSoundPlaying ()
 
void pollAllChannels ()
 
void pollActiveChannel ()
 
bool isSoundActive (byte *ptr) const
 
void findFreeChannel (byte *soundData)
 
void findFreeChannelFull (byte *soundData)
 
byte * loadData (int offset)
 
int command0 ()
 
int command1 ()
 
int command2 ()
 
int command3 ()
 
int command4 ()
 
int command5 ()
 
int command6 ()
 
int command7 ()
 
int command8 ()
 
virtual void callFunction (uint16 offset)
 
int command18 ()
 
- Protected Member Functions inherited from MADS::SoundDriver
Common::MemoryReadStream getDataStream (int offset) const
 
- Protected Attributes inherited from MADS::Dragonsphere::ASound
AdlibChannel _channel0
 
AdlibChannel _channel1
 
AdlibChannel _channel2
 
AdlibChannel _channel3
 
AdlibChannel _channel4
 
AdlibChannel _channel5
 
AdlibChannel _channel6
 
AdlibChannel _channel7
 
AdlibChannel _channel8
 
AdlibChannel_channels [9]
 
uint8 _adlibPorts [0x100] = { 0 }
 
Common::Array< AdlibSample_samples
 
- Protected Attributes inherited from MADS::SoundDriver
Audio::Mixer_mixer
 
Common::Array< byte > _soundData
 
Common::Mutex _driverMutex
 

Detailed Description

ASound2 (asound.dr2, _dataOffset = 0x1FA0, _dataSize = 0x2950)

Dispatch table layout (five tables collapsed to flat [76]): off_11A14: commands 0–8 (base=0, max=8) off_11A26: commands 16–19 (base=0x10, max=0x13; slot 19 = no-op) off_11A2E: commands 24–31 (base=0x18, max=0x1F; slot at cmd32 unreachable) funcs_11C87: commands 32–36 (base=0x20, max=0x24; slot 36 = no-op) off_11A4A: commands 64–75 (base=0x40, max=0x4B; slots 73–75 = no-ops)

command16 sets _musicIndex = 0x10 for command18 re-entry. commands 32–35: _musicIndex saved by dispatcher for command18 re-entry.

Member Function Documentation

◆ command()

int MADS::Dragonsphere::ASound2::command ( int  commandId,
int  param 
)
overridevirtual

Execute a player command. Most commands represent sounds to play, but some low number commands also provide control operations.

Parameters
commandIdPlayer ommand to execute.
paramOptional parameter used by a few commands

Implements MADS::SoundDriver.


The documentation for this class was generated from the following file: