[Scummvm-git-logs] scummvm master -> 30b2242aa82ed1f1fce85c24b1f26b917ee95824
elasota
noreply at scummvm.org
Mon Oct 31 05:13:13 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
206818c68f MTROPOLIS: Use a better default size for the debug inspector.
bfa17baa01 MTROPOLIS: Remove some spammy log messages.
30b2242aa8 MTROPOLIS: Add support for sound media cues.
Commit: 206818c68fdeb3b16c71e207805d82ac991af3f7
https://github.com/scummvm/scummvm/commit/206818c68fdeb3b16c71e207805d82ac991af3f7
Author: elasota (ejlasota at gmail.com)
Date: 2022-10-31T01:11:39-04:00
Commit Message:
MTROPOLIS: Use a better default size for the debug inspector.
Changed paths:
engines/mtropolis/debug.cpp
diff --git a/engines/mtropolis/debug.cpp b/engines/mtropolis/debug.cpp
index 6d668e2f9b5..edcf4585b73 100644
--- a/engines/mtropolis/debug.cpp
+++ b/engines/mtropolis/debug.cpp
@@ -1513,10 +1513,10 @@ void Debugger::openToolWindow(DebuggerTool tool) {
windowRef.reset(new DebugSceneTreeWindow(this, WindowParameters(_runtime, 32, 32, 250, 120, _runtime->getRenderPixelFormat())));
break;
case kDebuggerToolInspector:
- windowRef.reset(new DebugInspectorWindow(this, WindowParameters(_runtime, 32, 32, 100, 320, _runtime->getRenderPixelFormat())));
+ windowRef.reset(new DebugInspectorWindow(this, WindowParameters(_runtime, 32, 32, 320, 200, _runtime->getRenderPixelFormat())));
break;
case kDebuggerToolStepThrough:
- windowRef.reset(new DebugStepThroughWindow(this, WindowParameters(_runtime, 32, 32, 100, 320, _runtime->getRenderPixelFormat())));
+ windowRef.reset(new DebugStepThroughWindow(this, WindowParameters(_runtime, 32, 32, 200, 100, _runtime->getRenderPixelFormat())));
break;
default:
assert(false);
Commit: bfa17baa01fde11bc7332f9506d9f3901ac4f6b8
https://github.com/scummvm/scummvm/commit/bfa17baa01fde11bc7332f9506d9f3901ac4f6b8
Author: elasota (ejlasota at gmail.com)
Date: 2022-10-31T01:12:01-04:00
Commit Message:
MTROPOLIS: Remove some spammy log messages.
Changed paths:
engines/mtropolis/data.cpp
engines/mtropolis/runtime.cpp
diff --git a/engines/mtropolis/data.cpp b/engines/mtropolis/data.cpp
index f26b738b2fa..83f0158856a 100644
--- a/engines/mtropolis/data.cpp
+++ b/engines/mtropolis/data.cpp
@@ -2319,8 +2319,6 @@ DataReadErrorCode loadDataObject(const PlugInModifierRegistry ®istry, DataRea
return kDataReadErrorReadFailed;
}
- debug(4, "Loading data object type 0x%x", static_cast<int>(type));
-
DataObject *dataObject = nullptr;
switch (type) {
case DataObjectTypes::kProjectLabelMap:
diff --git a/engines/mtropolis/runtime.cpp b/engines/mtropolis/runtime.cpp
index 581ed2662e3..89c9c4d63c6 100644
--- a/engines/mtropolis/runtime.cpp
+++ b/engines/mtropolis/runtime.cpp
@@ -6863,8 +6863,6 @@ void Project::loadBootStream(size_t streamIndex, const Hacks &hacks) {
while (stream.pos() != streamDesc.size) {
uint64 streamPos = stream.pos();
- debug(3, "Loading boot object from %x (abs %x)", static_cast<int>(streamPos), static_cast<int>(streamDesc.pos + streamPos));
-
Common::SharedPtr<Data::DataObject> dataObject;
Data::loadDataObject(plugInDataLoaderRegistry, reader, dataObject);
Commit: 30b2242aa82ed1f1fce85c24b1f26b917ee95824
https://github.com/scummvm/scummvm/commit/30b2242aa82ed1f1fce85c24b1f26b917ee95824
Author: elasota (ejlasota at gmail.com)
Date: 2022-10-31T01:12:36-04:00
Commit Message:
MTROPOLIS: Add support for sound media cues.
Changed paths:
engines/mtropolis/elements.cpp
engines/mtropolis/elements.h
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 20adaba13c1..277853a1ebe 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -2166,14 +2166,14 @@ void SoundElement::playMedia(Runtime *runtime, Project *project) {
uint64 oldTimeRelative = _cueCheckTime - _startTime + _startTimestamp;
uint64 newTimeRelative = newTime - _startTime + _startTimestamp;
- _cueCheckTime = newTime;
-
if (_subtitlePlayer)
_subtitlePlayer->update(oldTimeRelative, newTimeRelative);
- // TODO: Check cue points and queue them here
- }
+ for (MediaCueState *mediaCue : _mediaCues)
+ mediaCue->checkTimestampChange(runtime, oldTimeRelative * _metadata->sampleRate / 1000u, newTimeRelative * _metadata->sampleRate / 1000u, true, true);
+ _cueCheckTime = newTime;
+ }
if (!_loop && newTime >= _finishTime) {
// Don't throw out the handle - It can still be playing but we just treat it like it's not.
@@ -2196,6 +2196,19 @@ void SoundElement::playMedia(Runtime *runtime, Project *project) {
}
}
+bool SoundElement::resolveMediaMarkerLabel(const Label &label, int32 &outResolution) const {
+ if (_metadata) {
+ for (const AudioMetadata::CuePoint &cuePoint : _metadata->cuePoints) {
+ if (cuePoint.cuePointID == label.id) {
+ outResolution = cuePoint.position;
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
void SoundElement::stopPlayer() {
_player.reset();
if (_subtitlePlayer)
diff --git a/engines/mtropolis/elements.h b/engines/mtropolis/elements.h
index c91ccf851de..0a7245bc765 100644
--- a/engines/mtropolis/elements.h
+++ b/engines/mtropolis/elements.h
@@ -379,6 +379,8 @@ public:
void playMedia(Runtime *runtime, Project *project) override;
+ bool resolveMediaMarkerLabel(const Label &label, int32 &outResolution) const override;
+
#ifdef MTROPOLIS_DEBUG_ENABLE
const char *debugGetTypeName() const override { return "Sound Element"; }
SupportStatus debugGetSupportStatus() const override { return kSupportStatusDone; }
More information about the Scummvm-git-logs
mailing list