ScummVM API documentation
Ultima::Ultima3::SoundEffects Class Reference

#include <sound_effects.h>

Static Public Member Functions

static Common::Array< byte > render (byte effect, byte arg1, byte arg2, bool timed=false)
 
static Common::Array< byte > renderSparkle (const Common::Array< bool > &revealed, bool timed)
 

Static Public Attributes

static constexpr int SAMPLE_RATE = 44100
 
static constexpr byte TITLE_BURST = 0xF3
 

Detailed Description

Recreates the sound effects the original made by switching the PC speaker on and off in timing loops

Member Function Documentation

◆ render()

static Common::Array< byte > Ultima::Ultima3::SoundEffects::render ( byte  effect,
byte  arg1,
byte  arg2,
bool  timed = false 
)
static

Works out the sound of an effect as unsigned 8-bit samples

Parameters
effectThe effect number, from 0xF4 to 0xFD
arg1The first of the values the effect is varied by
arg2The second
timedTrue to make the effects as the Ultima III Upgrade does, which times them by a timer rather than by how long the processor takes
Returns
The samples, or nothing if the effect isn't a sound

◆ renderSparkle()

static Common::Array< byte > Ultima::Ultima3::SoundEffects::renderSparkle ( const Common::Array< bool > &  revealed,
bool  timed 
)
static

Works out the buzz made as a title picture is revealed bit by bit, a pass of it at a time

Parameters
revealedWhether each bit of the pass was drawn rather than left out
timedTrue to make the buzz as the Ultima III Upgrade does
Returns
The samples, which also give how long the pass takes

Member Data Documentation

◆ TITLE_BURST

constexpr byte Ultima::Ultima3::SoundEffects::TITLE_BURST = 0xF3
staticconstexpr

The effect that is the noise at the end of the title screen's pictures being drawn


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