[Scummvm-git-logs] scummvm master -> 62ba4c2b0d63a577fe31b62d7bfc872f4c2740f5
elasota
noreply at scummvm.org
Thu Jul 21 23:35:38 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:
b8dfa65677 MTROPOLIS: Fix bad math in MIDI volume scale
62ba4c2b0d MTROPOLIS: Remove break-at-start option
Commit: b8dfa656778207c3d44b30bdd4bfc2c8ddb66718
https://github.com/scummvm/scummvm/commit/b8dfa656778207c3d44b30bdd4bfc2c8ddb66718
Author: elasota (ejlasota at gmail.com)
Date: 2022-07-21T19:35:05-04:00
Commit Message:
MTROPOLIS: Fix bad math in MIDI volume scale
Changed paths:
engines/mtropolis/plugin/standard.cpp
diff --git a/engines/mtropolis/plugin/standard.cpp b/engines/mtropolis/plugin/standard.cpp
index dfa596d724e..3ea37271646 100644
--- a/engines/mtropolis/plugin/standard.cpp
+++ b/engines/mtropolis/plugin/standard.cpp
@@ -1264,14 +1264,16 @@ void MidiCombinerDynamic::syncSourceHRController(uint outputChannel, OutputChann
if (hrController == MidiDriver_BASE::MIDI_CONTROLLER_VOLUME) {
// GM volume to gain control is 40*log10(V/127)
- // This means linearScale is (volume/0x38f0)^4
- double linearScale = static_cast<double>(effectiveValue);
+ // This means linearScale is (volume/0x3f80)^4
+ const double maxVolScale = 0x3f80;
+
+ double linearScale = static_cast<double>(effectiveValue) / maxVolScale;
linearScale *= linearScale;
linearScale *= linearScale;
linearScale *= static_cast<double>(srcState._masterVolume) * (1.0 / 255.0);
- double gmScale = sqrt(sqrt(linearScale)) * 0x38f0;
+ double gmScale = sqrt(sqrt(linearScale)) * maxVolScale;
if (gmScale > static_cast<double>(0x3fff))
gmScale = 0x3fff;
Commit: 62ba4c2b0d63a577fe31b62d7bfc872f4c2740f5
https://github.com/scummvm/scummvm/commit/62ba4c2b0d63a577fe31b62d7bfc872f4c2740f5
Author: elasota (ejlasota at gmail.com)
Date: 2022-07-21T19:35:05-04:00
Commit Message:
MTROPOLIS: Remove break-at-start option
Changed paths:
engines/mtropolis/detection.cpp
engines/mtropolis/detection_tables.h
diff --git a/engines/mtropolis/detection.cpp b/engines/mtropolis/detection.cpp
index e91f2673e0f..97b0b964f6c 100644
--- a/engines/mtropolis/detection.cpp
+++ b/engines/mtropolis/detection.cpp
@@ -92,17 +92,6 @@ static const ADExtraGuiOptionsMap optionsList[] = {
0
}
},
- {
- GAMEOPTION_LAUNCH_BREAK,
- {
- _s("Start debugging immediately"),
- _s("Halts progress and stops at the debugger immediately"),
- "mtropolis_pause_at_start",
- false,
- 0,
- 0
- }
- },
AD_EXTRA_GUI_OPTIONS_TERMINATOR
};
@@ -118,7 +107,7 @@ static const char *directoryGlobs[] = {
class MTropolisMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
MTropolisMetaEngineDetection() : AdvancedMetaEngineDetection(MTropolis::gameDescriptions, sizeof(MTropolis::MTropolisGameDescription), mTropolisGames, MTropolis::optionsList) {
- _guiOptions = GUIO4(GAMEOPTION_DYNAMIC_MIDI, GAMEOPTION_LAUNCH_DEBUG, GAMEOPTION_LAUNCH_BREAK, GAMEOPTION_ENABLE_SHORT_TRANSITIONS);
+ _guiOptions = GUIO3(GAMEOPTION_DYNAMIC_MIDI, GAMEOPTION_LAUNCH_DEBUG, GAMEOPTION_ENABLE_SHORT_TRANSITIONS);
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
}
diff --git a/engines/mtropolis/detection_tables.h b/engines/mtropolis/detection_tables.h
index c92897ee35b..4d6c7b640e5 100644
--- a/engines/mtropolis/detection_tables.h
+++ b/engines/mtropolis/detection_tables.h
@@ -29,7 +29,7 @@
#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
#define GAMEOPTION_DYNAMIC_MIDI GUIO_GAMEOPTIONS2
#define GAMEOPTION_LAUNCH_DEBUG GUIO_GAMEOPTIONS3
-#define GAMEOPTION_LAUNCH_BREAK GUIO_GAMEOPTIONS4
+//#define GAMEOPTION_LAUNCH_BREAK GUIO_GAMEOPTIONS4 // Disabled due to not being functional
#define GAMEOPTION_AUTO_SAVE_AT_CHECKPOINTS GUIO_GAMEOPTIONS5
#define GAMEOPTION_ENABLE_SHORT_TRANSITIONS GUIO_GAMEOPTIONS6
More information about the Scummvm-git-logs
mailing list