diff options
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/agi.cpp | 2 | ||||
-rw-r--r-- | engines/agi/detection.cpp | 2 | ||||
-rw-r--r-- | engines/agi/sound.cpp | 2 | ||||
-rw-r--r-- | engines/agi/sound_2gs.cpp | 12 | ||||
-rw-r--r-- | engines/agi/sound_2gs.h | 4 | ||||
-rw-r--r-- | engines/agi/sound_midi.cpp | 10 | ||||
-rw-r--r-- | engines/agi/sound_pcjr.h | 4 | ||||
-rw-r--r-- | engines/agi/sound_sarien.cpp | 4 |
8 files changed, 20 insertions, 20 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 811a58f45d..0eefbab04d 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -188,7 +188,7 @@ void AgiEngine::processEvents() { case Common::KEYCODE_KP5: if (_predictiveDialogRunning) key = event.kbd.ascii; - else + else key = KEY_STATIONARY; break; case Common::KEYCODE_PLUS: diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 21ff5deb2c..a0736d0cc3 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -473,7 +473,7 @@ bool AgiBase::canLoadGameStateCurrently() { bool AgiBase::canSaveGameStateCurrently() { if (getGameID() == GID_BC) // Technically in Black Cauldron we may save anytime return true; - + return (!(getGameType() == GType_PreAGI) && getflag(fMenusWork) && !_noSaveLoadAllowed && _game.inputEnabled); } diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp index aa338db0f2..f2d7af32da 100644 --- a/engines/agi/sound.cpp +++ b/engines/agi/sound.cpp @@ -144,7 +144,7 @@ void SoundMgr::stopSound() { // not be any harm doing it, so do it anyway. if (_endflag != -1) _vm->setflag(_endflag, true); - + _endflag = -1; } diff --git a/engines/agi/sound_2gs.cpp b/engines/agi/sound_2gs.cpp index 3c8a3dfc8d..38e256aa4b 100644 --- a/engines/agi/sound_2gs.cpp +++ b/engines/agi/sound_2gs.cpp @@ -167,12 +167,12 @@ uint SoundGen2GS::generateOutput() { g->seg++; } } - + // TODO: Advance vibrato here. The Apple IIGS uses a LFO with // triangle wave to modulate the frequency of both oscillators. // In Apple IIGS the vibrato and the envelope are updated at the // same time, so the vibrato speed depends on ENVELOPE_COEF. - + // Advance oscillators int s0 = 0; int s1 = 0; @@ -202,12 +202,12 @@ uint SoundGen2GS::generateOutput() { } } } - + // Take envelope and MIDI volume information into account. // Also amplify. s0 *= vol * g->vel / 127 * 80 / 256; s1 *= vol * g->vel / 127 * 80 / 256; - + // Select output channel. if (g->osc[0].chn) outl += s0; @@ -375,7 +375,7 @@ void SoundGen2GS::midiNoteOn(int channel, int note, int velocity) { IIgsGenerator* g = allocateGenerator(); g->ins = _channels[channel].getInstrument(); const IIgsInstrumentHeader* i = g->ins; - + // Pass information from the MIDI channel to the generator. Take // velocity into account, although simplistically. velocity *= 5 / 3; @@ -385,7 +385,7 @@ void SoundGen2GS::midiNoteOn(int channel, int note, int velocity) { g->key = note; g->vel = velocity * _channels[channel].getVolume() / 127; g->chn = channel; - + // Instruments can define different samples to be used based on // what the key is. Find the correct samples for our key. int wa = 0; diff --git a/engines/agi/sound_2gs.h b/engines/agi/sound_2gs.h index 1a225300ae..9123e18415 100644 --- a/engines/agi/sound_2gs.h +++ b/engines/agi/sound_2gs.h @@ -33,7 +33,7 @@ namespace Agi { // Apple IIGS to halt the corresponding oscillator immediately. We preprocess // the sample data by converting it to signed values and the instruments by // detecting prematurely stopping samples beforehand. -// +// // Note: None of the tested SIERRASTANDARD files have zeroes in them. So in // practice there is no need to check for them. However, they still do exist // in the sample resources. @@ -263,7 +263,7 @@ private: uint _ticks; ///< MIDI ticks (60Hz) int16 *_out; ///< Output buffer uint _outSize; ///< Output buffer size - + static const int kSfxMidiChannel = 15; ///< MIDI channel used for playing sample resources }; diff --git a/engines/agi/sound_midi.cpp b/engines/agi/sound_midi.cpp index d2c99171e2..0cbaa4af86 100644 --- a/engines/agi/sound_midi.cpp +++ b/engines/agi/sound_midi.cpp @@ -33,7 +33,7 @@ // Timing is not perfect, yet. It plays correct, when I use the // Gravis-Midiplayer, but the songs are too fast when I use playmidi on // Linux. -// +// // Original program developed by Jens. Christian Restemeier // @@ -114,7 +114,7 @@ void SoundGenMIDI::endOfTrack() { void SoundGenMIDI::play(int resnum) { MIDISound *track; - + stop(); _isGM = true; @@ -153,7 +153,7 @@ unsigned char instr[] = {50, 51, 19}; static void writeDelta(Common::MemoryWriteStreamDynamic *st, int32 delta) { int32 i; - i = delta >> 21; if (i > 0) st->writeByte((i & 127) | 128); + i = delta >> 21; if (i > 0) st->writeByte((i & 127) | 128); i = delta >> 14; if (i > 0) st->writeByte((i & 127) | 128); i = delta >> 7; if (i > 0) st->writeByte((i & 127) | 128); st->writeByte(delta & 127); @@ -196,7 +196,7 @@ static uint32 convertSND2MIDI(byte *snddata, byte **data) { int note; /* I don't know, what frequency equals midi note 0 ... */ /* This moves the song 4 octaves down: */ - fr = (log10(111860.0 / (double)freq) / ll) - 48; + fr = (log10(111860.0 / (double)freq) / ll) - 48; note = (int)floor(fr + 0.5); if (note < 0) note = 0; if (note > 127) note = 127; @@ -222,7 +222,7 @@ static uint32 convertSND2MIDI(byte *snddata, byte **data) { st.writeByte(0); st.writeByte(0); } - } + } writeDelta(&st, 0); st.writeByte(0xff); st.writeByte(0x2f); diff --git a/engines/agi/sound_pcjr.h b/engines/agi/sound_pcjr.h index f50fd0aa82..4317e86516 100644 --- a/engines/agi/sound_pcjr.h +++ b/engines/agi/sound_pcjr.h @@ -45,9 +45,9 @@ struct SndGenChan { uint16 dissolveCount; byte attenuation; byte attenuationCopy; - + GenType genType; - + // for the sample mixer int freqCount; }; diff --git a/engines/agi/sound_sarien.cpp b/engines/agi/sound_sarien.cpp index fc9a57791c..9ea8569b81 100644 --- a/engines/agi/sound_sarien.cpp +++ b/engines/agi/sound_sarien.cpp @@ -105,7 +105,7 @@ SoundGenSarien::~SoundGenSarien() { int SoundGenSarien::readBuffer(int16 *buffer, const int numSamples) { fillAudio(buffer, numSamples / 2); - + return numSamples; } @@ -124,7 +124,7 @@ void SoundGenSarien::play(int resnum) { for (int i = 0; i < NUM_CHANNELS; i++) { _chn[i].type = type; _chn[i].flags = AGI_SOUND_LOOP; - + if (_env) { _chn[i].flags |= AGI_SOUND_ENVELOPE; _chn[i].adsr = AGI_SOUND_ENV_ATTACK; |