AGOS: fix some warnings

(only the obvious ones, where nothing can be broken by the fix)
This commit is contained in:
athrxx 2022-09-02 15:30:49 +02:00
parent 5ac8561a63
commit d5331c3c2c
2 changed files with 6 additions and 6 deletions

View File

@ -401,18 +401,18 @@ uint8 MidiDriver_Accolade_AdLib::calculateUnscaledVolume(uint8 channel, uint8 so
}
// Note velocity and the volume adjustment are added, clipped to normal
// velocity range and divided by 2 to get an OPL volume value.
uint8 volume = CLIP(velocity + volumeAdjustment, 0, 0x7F);
uint8 vol = CLIP(velocity + volumeAdjustment, 0, 0x7F);
if (!_newVersion) {
// The Elvira 1 version raises the volume a bit and clips the highest
// values.
volume += 0x18;
if (volume > 0x78)
volume = 0x78;
vol += 0x18;
if (vol > 0x78)
vol = 0x78;
}
// Invert the volume.
return 0x3F - (volume >> 1);
return 0x3F - (vol >> 1);
}
void MidiDriver_Accolade_AdLib::writePanning(uint8 oplChannel, OplInstrumentRhythmType rhythmType) {

View File

@ -259,7 +259,7 @@ void SfxParser_Accolade::processOpCode(SfxSlot *sfxSlot, byte opCode) {
noteOff(sfxSlot);
int8 note;
note = sfxSlot->readScript(false) & 0xFF;
assert(note >= 0 && note <= 0x7F);
assert(note >= 0);
sfxSlot->currentNoteFraction = note << 8;
noteOn(sfxSlot);
break;