[Scummvm-git-logs] scummvm master -> 2d3b4619a43a0c036c9c961d32dca50fc709eb81
sev-
noreply at scummvm.org
Mon Aug 22 10:13:12 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2d3b4619a4 MTROPOLIS: Fix warnings about unused variables
Commit: 2d3b4619a43a0c036c9c961d32dca50fc709eb81
https://github.com/scummvm/scummvm/commit/2d3b4619a43a0c036c9c961d32dca50fc709eb81
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-08-22T12:11:47+02:00
Commit Message:
MTROPOLIS: Fix warnings about unused variables
Changed paths:
engines/mtropolis/elements.cpp
engines/mtropolis/elements.h
engines/mtropolis/miniscript.cpp
engines/mtropolis/miniscript.h
engines/mtropolis/modifiers.cpp
engines/mtropolis/modifiers.h
engines/mtropolis/plugin/standard.cpp
engines/mtropolis/plugin/standard.h
engines/mtropolis/runtime.cpp
engines/mtropolis/vthread.cpp
engines/mtropolis/vthread.h
diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index 50257d9ce6d..cd50528933d 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -423,8 +423,8 @@ MovieResizeFilter::~MovieResizeFilter() {
}
MovieElement::MovieElement()
- : _cacheBitmap(false), _alternate(false), _playEveryFrame(false), _reversed(false), _haveFiredAtLastCel(false),
- _haveFiredAtFirstCel(false), _shouldPlayIfNotPaused(true), _needsReset(true), _currentPlayState(kMediaStateStopped),
+ : _cacheBitmap(false), _alternate(false), _playEveryFrame(false), _reversed(false), /* _haveFiredAtLastCel(false), */
+ /* _haveFiredAtFirstCel(false), */_shouldPlayIfNotPaused(true), _needsReset(true), _currentPlayState(kMediaStateStopped),
_assetID(0), _maxTimestamp(0), _timeScale(0), _currentTimestamp(0), _volume(100),
_displayFrame(nullptr), _runtime(nullptr) {
}
@@ -1598,7 +1598,7 @@ MiniscriptInstructionOutcome MToonElement::scriptSetRate(MiniscriptThread *threa
TextLabelElement::TextLabelElement()
- : _cacheBitmap(false), _needsRender(false), _isBitmap(false), _assetID(0),
+ : _cacheBitmap(false), _needsRender(false), /*_isBitmap(false), */_assetID(0),
_macFontID(0), _size(12), _alignment(kTextAlignmentLeft), _runtime(nullptr) {
}
@@ -1693,7 +1693,7 @@ void TextLabelElement::activate() {
TextAsset *textAsset = static_cast<TextAsset *>(asset.get());
- if (textAsset->isBitmap()) {
+ if (textAsset->isBitmap()) {
_renderedText = textAsset->getBitmapSurface();
_needsRender = false;
} else {
@@ -1940,7 +1940,7 @@ MiniscriptInstructionOutcome TextLabelElement::scriptSetLine(MiniscriptThread *t
_needsRender = true;
_contentsDirty = true;
_macFormattingSpans.clear();
-
+
return kMiniscriptInstructionOutcomeContinue;
}
@@ -2152,7 +2152,7 @@ void SoundElement::playMedia(Runtime *runtime, Project *project) {
// TODO: Check cue points and queue them here
}
-
+
if (!_loop && newTime >= _finishTime) {
// Don't throw out the handle - It can still be playing but we just treat it like it's not.
// If it has anything left, then we let it finish and avoid clipping the sound, but we need
diff --git a/engines/mtropolis/elements.h b/engines/mtropolis/elements.h
index a024f56fa0c..e184c24494f 100644
--- a/engines/mtropolis/elements.h
+++ b/engines/mtropolis/elements.h
@@ -147,8 +147,8 @@ private:
bool _alternate;
bool _playEveryFrame;
bool _reversed;
- bool _haveFiredAtLastCel;
- bool _haveFiredAtFirstCel;
+ //bool _haveFiredAtLastCel;
+ //bool _haveFiredAtFirstCel;
bool _shouldPlayIfNotPaused;
bool _needsReset; // If true, then the video position was reset by a seek or stop and decoding must be restarted even if the target state is the same as the play state.
MediaState _currentPlayState;
@@ -340,7 +340,7 @@ private:
bool _cacheBitmap;
bool _needsRender;
- bool _isBitmap;
+ //bool _isBitmap;
uint32 _assetID;
Common::String _text;
diff --git a/engines/mtropolis/miniscript.cpp b/engines/mtropolis/miniscript.cpp
index 9de742715cb..efd424f1ad8 100644
--- a/engines/mtropolis/miniscript.cpp
+++ b/engines/mtropolis/miniscript.cpp
@@ -1564,7 +1564,7 @@ MiniscriptInstructionOutcome GetChild::readRValueAttribIndexed(MiniscriptThread
}
PushValue::PushValue(DataType dataType, const void *value, bool isLValue)
- : _dataType(dataType), _isLValue(isLValue) {
+ : _dataType(dataType)/*, _isLValue(isLValue) */ {
switch (dataType) {
case DataType::kDataTypeBool:
diff --git a/engines/mtropolis/miniscript.h b/engines/mtropolis/miniscript.h
index ccdc3d24177..9d3e0cfe2c6 100644
--- a/engines/mtropolis/miniscript.h
+++ b/engines/mtropolis/miniscript.h
@@ -345,7 +345,7 @@ namespace MiniscriptInstructions {
DataType _dataType;
ValueUnion _value;
- bool _isLValue;
+ //bool _isLValue;
};
class PushGlobal : public MiniscriptInstruction {
diff --git a/engines/mtropolis/modifiers.cpp b/engines/mtropolis/modifiers.cpp
index 95696154184..096b5b74d2a 100644
--- a/engines/mtropolis/modifiers.cpp
+++ b/engines/mtropolis/modifiers.cpp
@@ -1375,7 +1375,7 @@ bool BoundaryDetectionMessengerModifier::load(ModifierLoaderContext &context, co
_exitTriggerMode = ((data.messageFlagsHigh & Data::BoundaryDetectionMessengerModifier::kDetectExiting) != 0) ? kExitTriggerExiting : kExitTriggerOnceExited;
_detectionMode = ((data.messageFlagsHigh & Data::BoundaryDetectionMessengerModifier::kWhileDetected) != 0) ? kContinuous : kOnFirstDetection;
-
+
_detectTopEdge = ((data.messageFlagsHigh & Data::BoundaryDetectionMessengerModifier::kDetectTopEdge) != 0);
_detectBottomEdge = ((data.messageFlagsHigh & Data::BoundaryDetectionMessengerModifier::kDetectBottomEdge) != 0);
_detectLeftEdge = ((data.messageFlagsHigh & Data::BoundaryDetectionMessengerModifier::kDetectLeftEdge) != 0);
@@ -2064,7 +2064,7 @@ Modifier *CompoundVariableModifier::findChildByName(const Common::String &name)
CompoundVariableModifier::SaveLoad::ChildSaveLoad::ChildSaveLoad() : modifier(nullptr) {
}
-CompoundVariableModifier::SaveLoad::SaveLoad(CompoundVariableModifier *modifier) : _modifier(modifier) {
+CompoundVariableModifier::SaveLoad::SaveLoad(CompoundVariableModifier *modifier) /* : _modifier(modifier) */ {
for (const Common::SharedPtr<Modifier> &child : modifier->_children) {
Common::SharedPtr<ModifierSaveLoad> childSL = child->getSaveLoad();
if (childSL) {
diff --git a/engines/mtropolis/modifiers.h b/engines/mtropolis/modifiers.h
index 77d129354bf..2a78972ad72 100644
--- a/engines/mtropolis/modifiers.h
+++ b/engines/mtropolis/modifiers.h
@@ -788,7 +788,7 @@ private:
Common::Array<ChildSaveLoad> _childrenSaveLoad;
- CompoundVariableModifier *_modifier;
+ //CompoundVariableModifier *_modifier;
};
Common::SharedPtr<Modifier> shallowClone() const override;
diff --git a/engines/mtropolis/plugin/standard.cpp b/engines/mtropolis/plugin/standard.cpp
index afd0c08fa08..d4cffa20591 100644
--- a/engines/mtropolis/plugin/standard.cpp
+++ b/engines/mtropolis/plugin/standard.cpp
@@ -180,7 +180,7 @@ private:
uint8 _channel;
uint8 _note;
uint8 _volume;
- uint8 _program;
+ //uint8 _program;
bool _initialized;
};
@@ -301,7 +301,7 @@ void MidiFilePlayerImpl::onTimer() {
}
MidiNotePlayerImpl::MidiNotePlayerImpl(const Common::SharedPtr<MidiCombinerSource> &outputDriver, uint32 timerRate)
- : _timerRate(timerRate), _durationRemaining(0), _outputDriver(outputDriver), _channel(0), _note(0), _program(0), _initialized(false), _volume(100) {
+ : _timerRate(timerRate), _durationRemaining(0), _outputDriver(outputDriver), _channel(0), _note(0), /* _program(0), */_initialized(false), _volume(100) {
}
MidiNotePlayerImpl::~MidiNotePlayerImpl() {
@@ -2317,8 +2317,8 @@ bool ObjectReferenceVariableModifier::SaveLoad::loadInternal(Common::ReadStream
}
-MidiModifier::MidiModifier() : _mode(kModeFile), _volume(100), _mutedTracks(0), _singleNoteChannel(0), _singleNoteNote(0),
- _plugIn(nullptr), _filePlayer(nullptr), _notePlayer(nullptr), _runtime(nullptr) {
+MidiModifier::MidiModifier() : _mode(kModeFile), _volume(100), _mutedTracks(0), /* _singleNoteChannel(0), _singleNoteNote(0), */
+ _plugIn(nullptr), _filePlayer(nullptr), _notePlayer(nullptr) /*, _runtime(nullptr) */ {
memset(&this->_modeSpecific, 0, sizeof(this->_modeSpecific));
}
@@ -2555,7 +2555,7 @@ MiniscriptInstructionOutcome MidiModifier::scriptSetNoteDuration(MiniscriptThrea
DynamicValue converted;
if (!value.convertToType(DynamicValueTypes::kFloat, converted))
return kMiniscriptInstructionOutcomeFailed;
- asDouble = converted.getFloat();
+ asDouble = converted.getFloat();
}
if (_mode == kModeSingleNote) {
diff --git a/engines/mtropolis/plugin/standard.h b/engines/mtropolis/plugin/standard.h
index e79bfb1f86b..ebbaf1cd061 100644
--- a/engines/mtropolis/plugin/standard.h
+++ b/engines/mtropolis/plugin/standard.h
@@ -310,14 +310,14 @@ private:
Common::SharedPtr<Data::Standard::MidiModifier::EmbeddedFile> _embeddedFile;
uint16 _mutedTracks;
- uint8 _singleNoteChannel;
- uint8 _singleNoteNote;
+ //uint8 _singleNoteChannel;
+ //uint8 _singleNoteNote;
StandardPlugIn *_plugIn;
MidiFilePlayer *_filePlayer;
MidiNotePlayer *_notePlayer;
- Runtime *_runtime;
+ //Runtime *_runtime;
};
class ListVariableModifier : public VariableModifier {
diff --git a/engines/mtropolis/runtime.cpp b/engines/mtropolis/runtime.cpp
index 1a739f2baee..f6b88fe2566 100644
--- a/engines/mtropolis/runtime.cpp
+++ b/engines/mtropolis/runtime.cpp
@@ -3876,7 +3876,7 @@ Runtime::Runtime(OSystem *system, Audio::Mixer *mixer, ISaveUIProvider *saveProv
for (int i = 0; i < Actions::kMouseButtonCount; i++)
_mouseFocusFlags[i] = false;
-
+
_worldManagerInterface.reset(new WorldManagerInterface());
_worldManagerInterface->setSelfReference(_worldManagerInterface);
@@ -4061,7 +4061,7 @@ bool Runtime::runFrame() {
// This has to be in this specific spot: Queued messages that occur from scene transitions are normally discharged
// after the "Scene Started" event, but before scene transition.
- //
+ //
// Obsidian depends on this behavior in several scripts, most notably setting up conditional ambience correctly.
// For example, in Inspiration chapter, on exiting the plane into the statue:
// Shared scene fires Parent Enabled which triggers "GEN_SND_Start_Ambience on PE" which sends GEN_SND_Start_Ambience
@@ -4254,7 +4254,7 @@ void Runtime::drawFrame() {
Common::sort(sortedBuckets, sortedBuckets + numWindows, WindowSortingBucket::sortPredicate);
}
-
+
for (size_t i = 0; i < numWindows; i++) {
const Window &window = *sortedBuckets[i].window;
const Graphics::ManagedSurface &surface = *window.getSurface();
@@ -4265,9 +4265,9 @@ void Runtime::drawFrame() {
int32 destBottom = destTop + surface.h;
int32 srcLeft = 0;
- int32 srcRight = surface.w;
+ //int32 srcRight = surface.w;
int32 srcTop = 0;
- int32 srcBottom = surface.h;
+ //int32 srcBottom = surface.h;
// Clip to drawable area
if (destLeft < 0) {
@@ -4285,13 +4285,13 @@ void Runtime::drawFrame() {
if (destRight > width) {
int rightAdjust = width - destRight;
destRight += rightAdjust;
- srcRight += rightAdjust;
+ //srcRight += rightAdjust;
}
if (destBottom > height) {
int bottomAdjust = height - destBottom;
destBottom += bottomAdjust;
- srcBottom += bottomAdjust;
+ //srcBottom += bottomAdjust;
}
if (destLeft >= destRight || destTop >= destBottom || destLeft >= width || destTop >= height || destRight <= 0 || destBottom <= 0)
@@ -4303,7 +4303,7 @@ void Runtime::drawFrame() {
_system->updateScreen();
Common::SharedPtr<CursorGraphic> cursor;
-
+
Common::SharedPtr<Window> focusWindow = _mouseFocusWindow.lock();
if (!focusWindow)
@@ -4543,7 +4543,7 @@ void Runtime::executeHighLevelSceneTransition(const HighLevelSceneTransition &tr
_sceneStack[0] = sharedSceneEntry;
}
-
+
bool sceneAlreadyInStack = false;
for (size_t i = _sceneStack.size() - 1; i > 0; i--) {
Common::SharedPtr<Structural> stackedScene = _sceneStack[i].scene;
@@ -6081,7 +6081,7 @@ VThread& Runtime::getVThread() const {
void Runtime::debugSetEnabled(bool enabled) {
if (enabled) {
- if (!_debugger)
+ if (!_debugger)
_debugger.reset(new Debugger(this));
} else {
_debugger.reset();
diff --git a/engines/mtropolis/vthread.cpp b/engines/mtropolis/vthread.cpp
index 33b80308122..517cb5f47b7 100644
--- a/engines/mtropolis/vthread.cpp
+++ b/engines/mtropolis/vthread.cpp
@@ -38,7 +38,7 @@ void VThreadTaskData::debugInspect(IDebugInspectionReport *report) const {
}
#endif
-VThread::VThread() : _faultID(nullptr), _stackUnalignedBase(nullptr), _stackAlignedBase(nullptr), _size(0), _alignment(1), _used(0) {
+VThread::VThread() : _faultID(nullptr), _stackUnalignedBase(nullptr), _stackAlignedBase(nullptr), /* _size(0), */_alignment(1), _used(0) {
}
VThread::~VThread() {
diff --git a/engines/mtropolis/vthread.h b/engines/mtropolis/vthread.h
index 915c5367f57..b9a536c677f 100644
--- a/engines/mtropolis/vthread.h
+++ b/engines/mtropolis/vthread.h
@@ -152,7 +152,7 @@ private:
void *_stackUnalignedBase;
void *_stackAlignedBase;
- size_t _size;
+ //size_t _size;
size_t _alignment;
size_t _used;
VThreadFaultIdentifier *_faultID;
@@ -268,7 +268,7 @@ TData *VThread::pushFaultHandler(const char *name, VThreadState (*func)(const TD
template<typename TClass, typename TData>
TData *VThread::pushTaskWithFaultHandler(const VThreadFaultIdentifier *faultID, const char *name, TClass *obj, VThreadState (TClass::*method)(const TData &data)) {
- typedef VThreadMethodData<TClass, TData> FrameData_t;
+ typedef VThreadMethodData<TClass, TData> FrameData_t;
const size_t frameAlignment = alignof(VThreadStackFrame);
const size_t dataAlignment = alignof(FrameData_t);
More information about the Scummvm-git-logs
mailing list