[Scummvm-git-logs] scummvm master -> 4cacd66d0d6bed60e17b8533471680cee45a197b
athrxx
noreply at scummvm.org
Mon Oct 17 21:04:13 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
829572057c SCUMM: minor code style fixes
4cacd66d0d AUDIO: code style fixes
Commit: 829572057cca306887cb1943f5e23b8e23aa7206
https://github.com/scummvm/scummvm/commit/829572057cca306887cb1943f5e23b8e23aa7206
Author: athrxx (athrxx at scummvm.org)
Date: 2022-10-17T23:03:04+02:00
Commit Message:
SCUMM: minor code style fixes
Changed paths:
engines/scumm/players/player_towns.cpp
engines/scumm/verbs.cpp
diff --git a/engines/scumm/players/player_towns.cpp b/engines/scumm/players/player_towns.cpp
index ef09897ed08..64f2c6e79c5 100644
--- a/engines/scumm/players/player_towns.cpp
+++ b/engines/scumm/players/player_towns.cpp
@@ -188,7 +188,7 @@ int Player_Towns::allocatePcmChannel(int sound, int sfxChanRelIndex, uint32 prio
Player_Towns_v1::Player_Towns_v1(ScummEngine *vm, Audio::Mixer *mixer) : Player_Towns(vm, false) {
_soundOverride = nullptr;
- _cdaCurrentSound = _eupCurrentSound = _cdaNumLoops = 0;
+ _cdaCurrentSound = _cdaCurrentSoundTemp = _eupCurrentSound = _cdaNumLoops = 0;
_cdaForceRestart = 0;
_cdaVolLeft = _cdaVolRight = 0;
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 5298ec2132a..d2fa5827f48 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -827,7 +827,7 @@ void ScummEngine_v0::checkExecVerbs() {
_activeVerb = kVerbPush;
}
- if (_mouseAndKeyboardStat > 0 && _mouseAndKeyboardStat < MBS_MAX_KEY) {
+ if (!zone || (_mouseAndKeyboardStat > 0 && _mouseAndKeyboardStat < MBS_MAX_KEY)) {
// keys already checked by input handler
} else if ((_mouseAndKeyboardStat & MBS_MOUSE_MASK) || _activeVerb == kVerbWhatIs) {
// click region: sentence line
Commit: 4cacd66d0d6bed60e17b8533471680cee45a197b
https://github.com/scummvm/scummvm/commit/4cacd66d0d6bed60e17b8533471680cee45a197b
Author: athrxx (athrxx at scummvm.org)
Date: 2022-10-17T23:03:05+02:00
Commit Message:
AUDIO: code style fixes
Changed paths:
audio/softsynth/fmtowns_pc98/sega_audio.cpp
audio/softsynth/fmtowns_pc98/towns_audio.cpp
diff --git a/audio/softsynth/fmtowns_pc98/sega_audio.cpp b/audio/softsynth/fmtowns_pc98/sega_audio.cpp
index 15f05337217..a8d59bddef9 100644
--- a/audio/softsynth/fmtowns_pc98/sega_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/sega_audio.cpp
@@ -355,7 +355,7 @@ void SegaPCMChannel::stopInternal() {
}
SegaPSG::SegaPSG(int samplingRate, int deviceVolume) : _intRate(3579545), _extRate(samplingRate), _deviceVolume(deviceVolume), _numChannels(3), _cr(-1),
- _musicVolume(Audio::Mixer::kMaxMixerVolume), _sfxVolume(Audio::Mixer::kMaxMixerVolume), _sfxChanMask(0), _nfb(0), _nfs(0), _timer(0) {
+ _musicVolume(Audio::Mixer::kMaxMixerVolume), _sfxVolume(Audio::Mixer::kMaxMixerVolume), _sfxChanMask(0), _nfb(0), _nfs(0), _nat(0), _timer(0) {
memset(_attnTable, 0, sizeof(_attnTable));
for (int i = 0; i < 15; ++i)
_attnTable[i] = (32767.0 / (double)(_numChannels + 1)) / pow(2.0, (double)(i << 1) / 6.0);
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.cpp b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
index 9fec2f88bdc..ef5268f9aa0 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.cpp
@@ -1739,14 +1739,14 @@ void TownsAudio_PCMChannel::setNote(uint8 note, TownsAudio_WaveTable *w, bool st
diff /= 12;
s = (r >> diff);
if (bl)
- s = (s * _pcmPhase2[bl]) >> 16;
+ s = (s * _pcmPhase2[bl - 1]) >> 16;
} else if (diff > 0) {
bl = diff % 12;
diff /= 12;
s = (r << diff);
if (bl)
- s += ((s * _pcmPhase1[bl]) >> 16);
+ s += ((s * _pcmPhase1[bl - 1]) >> 16);
} else {
s = r;
@@ -1817,11 +1817,11 @@ void TownsAudio_PCMChannel::envRelease() {
}
const uint16 TownsAudio_PCMChannel::_pcmPhase1[] = {
- 0x879B, 0x0F37, 0x1F58, 0x306E, 0x4288, 0x55B6, 0x6A08, 0x7F8F, 0x965E, 0xAE88, 0xC882, 0xE341
+ 0x0F37, 0x1F58, 0x306E, 0x4288, 0x55B6, 0x6A08, 0x7F8F, 0x965E, 0xAE88, 0xC882, 0xE341
};
const uint16 TownsAudio_PCMChannel::_pcmPhase2[] = {
- 0xFEFE, 0xF1A0, 0xE411, 0xD744, 0xCB2F, 0xBFC7, 0xB504, 0xAAE2, 0xA144, 0x9827, 0x8FAC
+ 0xF1A0, 0xE411, 0xD744, 0xCB2F, 0xBFC7, 0xB504, 0xAAE2, 0xA144, 0x9827, 0x8FAC, 0x879B
};
TownsAudio_WaveTable::TownsAudio_WaveTable() {
More information about the Scummvm-git-logs
mailing list