[Scummvm-git-logs] scummvm master -> b029d377ab10aa598ba1ec9098e4b3da0b0f685c
fracturehill
76959842+fracturehill at users.noreply.github.com
Thu Mar 25 17:54:39 UTC 2021
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2f77d27bf6 NANCY: Translation fixes
89fd430243 NANCY: Fix wrong sound channel id checks
0656e2473c NANCY: Initialize local variables
cd7f9be183 NANCY: Add video load checks
700f60042e NANCY: Fix memory leak
b175c5fd10 NANCY: Initialize class members
b029d377ab NANCY: Fix credits transparency
Commit: 2f77d27bf6804658af77f238f860aff41c497d8c
https://github.com/scummvm/scummvm/commit/2f77d27bf6804658af77f238f860aff41c497d8c
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:50+02:00
Commit Message:
NANCY: Translation fixes
Unmarked the string inside telephone.cpp as being translatable since it's an in-game string, and removed the file from POTFILES. Also added a comment explaining one of the strings inside cheat.cpp.
Changed paths:
engines/nancy/POTFILES
engines/nancy/action/telephone.cpp
engines/nancy/cheat.cpp
diff --git a/engines/nancy/POTFILES b/engines/nancy/POTFILES
index 67ccfca338..5870c5a4dd 100644
--- a/engines/nancy/POTFILES
+++ b/engines/nancy/POTFILES
@@ -1,3 +1,2 @@
-engines/nancy/action/telephone.cpp
engines/nancy/cheat.cpp
engines/nancy/input.cpp
diff --git a/engines/nancy/action/telephone.cpp b/engines/nancy/action/telephone.cpp
index f3c08e866f..118a68d662 100644
--- a/engines/nancy/action/telephone.cpp
+++ b/engines/nancy/action/telephone.cpp
@@ -33,8 +33,6 @@
#include "engines/nancy/ui/textbox.h"
-#include "common/translation.h"
-
namespace Nancy {
namespace Action {
@@ -141,7 +139,7 @@ void Telephone::execute() {
// Long phone numbers start with 1
if (_calledNumber.size() >= 11 || (_calledNumber.size() >= 7 && (_calledNumber[0] != 1))) {
NancySceneState.getTextbox().clear();
- NancySceneState.getTextbox().addTextLine(_("ringing...<n><e>")); // Hardcoded in the original engine
+ NancySceneState.getTextbox().addTextLine("ringing...<n><e>"); // Hardcoded in the original engine
g_nancy->_sound->loadSound(_ringSound);
g_nancy->_sound->playSound(_ringSound);
_callState = kRinging;
diff --git a/engines/nancy/cheat.cpp b/engines/nancy/cheat.cpp
index 55a2de550d..a053e4b440 100644
--- a/engines/nancy/cheat.cpp
+++ b/engines/nancy/cheat.cpp
@@ -62,6 +62,8 @@ CheatDialog::CheatDialog() : GUI::Dialog(20, 20, 600, 440) {
_frame = new GUI::EditTextWidget(_tabs, 35, 100, 45, 20, _(Common::U32String::itoa(scene.frameID, buf, 10)), _(""), kInputFrameNr, kInputFrameNr);
new GUI::StaticTextWidget(_tabs, 85, 100, 150, 20, _("Frame Number"), Graphics::kTextAlignLeft);
_offset = new GUI::EditTextWidget(_tabs, 35, 125, 45, 20, _(Common::U32String::itoa(scene.verticalOffset, buf, 10)), _(""), kInputScroll, kInputScroll);
+
+ // I18N: The Y position (a.k.a vertical scroll) of the background
new GUI::StaticTextWidget(_tabs, 85, 125, 150, 20, _("Background Top (Y)"), Graphics::kTextAlignLeft);
new GUI::StaticTextWidget(_tabs, 30, 160, 150, 20, _("Hints Remaining"), Graphics::kTextAlignLeft);
Commit: 89fd430243692643737bc83bddf85b541add02c0
https://github.com/scummvm/scummvm/commit/89fd430243692643737bc83bddf85b541add02c0
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:50+02:00
Commit Message:
NANCY: Fix wrong sound channel id checks
Fixed an incorrect check for maximum channelID inside SoundManager.
Changed paths:
engines/nancy/sound.cpp
diff --git a/engines/nancy/sound.cpp b/engines/nancy/sound.cpp
index 7c67c513b1..44156fe35c 100644
--- a/engines/nancy/sound.cpp
+++ b/engines/nancy/sound.cpp
@@ -246,7 +246,7 @@ void SoundManager::loadSound(const SoundDescription &description) {
}
void SoundManager::playSound(uint16 channelID) {
- if (channelID > 32 || _channels[channelID].stream == 0)
+ if (channelID > 31 || _channels[channelID].stream == 0)
return;
_channels[channelID].stream->seek(0);
@@ -266,7 +266,7 @@ void SoundManager::playSound(const SoundDescription &description) {
}
void SoundManager::pauseSound(uint16 channelID, bool pause) {
- if (channelID > 32)
+ if (channelID > 31)
return;
if (isSoundPlaying(channelID)) {
@@ -281,7 +281,7 @@ void SoundManager::pauseSound(const SoundDescription &description, bool pause) {
}
bool SoundManager::isSoundPlaying(uint16 channelID) const {
- if (channelID > 32)
+ if (channelID > 31)
return false;
return _mixer->isSoundHandleActive(_channels[channelID].handle);
@@ -296,7 +296,7 @@ bool SoundManager::isSoundPlaying(const SoundDescription &description) const {
}
void SoundManager::stopSound(uint16 channelID) {
- if (channelID > 32)
+ if (channelID > 31)
return;
if (isSoundPlaying(channelID)) {
@@ -315,7 +315,7 @@ void SoundManager::stopSound(const SoundDescription &description) {
// Returns whether the exception was skipped
void SoundManager::stopAllSounds() {
- for (uint i = 0; i < 32; ++i) {
+ for (uint i = 0; i < 31; ++i) {
stopSound(i);
}
}
@@ -330,7 +330,7 @@ void SoundManager::stopAndUnloadSpecificSounds() {
void SoundManager::initSoundChannels() {
// Channel types are hardcoded in the original engine
- for (uint i = 0; i < 32; ++i) {
+ for (uint i = 0; i < 31; ++i) {
_channels[i].type = channelSoundTypes[i];
}
}
Commit: 0656e2473c93201e2feae871179d6ed1da8b580c
https://github.com/scummvm/scummvm/commit/0656e2473c93201e2feae871179d6ed1da8b580c
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:51+02:00
Commit Message:
NANCY: Initialize local variables
Initialize local variables in a couple of functions to silence warnings.
Changed paths:
engines/nancy/action/recordtypes.cpp
engines/nancy/sound.cpp
diff --git a/engines/nancy/action/recordtypes.cpp b/engines/nancy/action/recordtypes.cpp
index 0aa369bcbb..09efb5e12c 100644
--- a/engines/nancy/action/recordtypes.cpp
+++ b/engines/nancy/action/recordtypes.cpp
@@ -582,7 +582,7 @@ void HintSystem::selectHint() {
}
void HintSystem::getHint(uint hint, uint difficulty) {
- uint fileOffset;
+ uint fileOffset = 0;
if (_characterID < 3) {
fileOffset = nancy1HintOffsets[_characterID];
}
diff --git a/engines/nancy/sound.cpp b/engines/nancy/sound.cpp
index 44156fe35c..22b190efe4 100644
--- a/engines/nancy/sound.cpp
+++ b/engines/nancy/sound.cpp
@@ -164,9 +164,9 @@ Audio::SeekableAudioStream *SoundManager::makeHISStream(Common::SeekableReadStre
stream->read(buf, 22);
buf[21] = 0;
- uint16 numChannels, bitsPerSample;
- uint32 samplesPerSec, size;
- SoundType type;
+ uint16 numChannels = 0, bitsPerSample = 0;
+ uint32 samplesPerSec = 0, size = 0;
+ SoundType type = kSoundTypeRaw;
if (Common::String(buf) == "Her Interactive Sound") {
// Early HIS file
Commit: cd7f9be183fa80814e6b3f0fc024f80fee7957e0
https://github.com/scummvm/scummvm/commit/cd7f9be183fa80814e6b3f0fc024f80fee7957e0
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:51+02:00
Commit Message:
NANCY: Add video load checks
Added checks after calling loadFile() on a video decoder.
Changed paths:
engines/nancy/action/primaryvideo.cpp
engines/nancy/action/secondarymovie.cpp
engines/nancy/action/secondaryvideo.cpp
engines/nancy/ui/viewport.cpp
diff --git a/engines/nancy/action/primaryvideo.cpp b/engines/nancy/action/primaryvideo.cpp
index c9e947c3be..c301944303 100644
--- a/engines/nancy/action/primaryvideo.cpp
+++ b/engines/nancy/action/primaryvideo.cpp
@@ -119,7 +119,10 @@ PlayPrimaryVideoChan0::~PlayPrimaryVideoChan0() {
}
void PlayPrimaryVideoChan0::init() {
- _decoder.loadFile(_videoName + ".avf");
+ if (!_decoder.loadFile(_videoName + ".avf")) {
+ error("Couldn't load video file %s", _videoName.c_str());
+ }
+
_drawSurface.create(_src.width(), _src.height(), _decoder.getPixelFormat());
RenderObject::init();
diff --git a/engines/nancy/action/secondarymovie.cpp b/engines/nancy/action/secondarymovie.cpp
index c1e2b3f545..c00d1825b5 100644
--- a/engines/nancy/action/secondarymovie.cpp
+++ b/engines/nancy/action/secondarymovie.cpp
@@ -71,7 +71,9 @@ void PlaySecondaryMovie::init() {
_decoder.close();
}
- _decoder.loadFile(_videoName + ".avf");
+ if (!_decoder.loadFile(_videoName + ".avf")) {
+ error("Couldn't load video file %s", _videoName.c_str());
+ }
_drawSurface.create(_decoder.getWidth(), _decoder.getHeight(), g_nancy->_graphicsManager->getInputPixelFormat());
_screenPosition = _drawSurface.getBounds();
diff --git a/engines/nancy/action/secondaryvideo.cpp b/engines/nancy/action/secondaryvideo.cpp
index c8bd4b4b4f..a2050523ff 100644
--- a/engines/nancy/action/secondaryvideo.cpp
+++ b/engines/nancy/action/secondaryvideo.cpp
@@ -45,7 +45,10 @@ void PlaySecondaryVideo::init() {
_decoder.close();
}
- _decoder.loadFile(_filename + ".avf");
+ if (!_decoder.loadFile(_filename + ".avf")) {
+ error("Couldn't load video file %s", _filename.c_str());
+ }
+
// Every secondary video frame (in nancy1) plays exactly 12ms slower than what its metadata says.
// I'm still not sure how/why that happens so for now I'm using this hack to fix the timings
_decoder.addFrameTime(12);
diff --git a/engines/nancy/ui/viewport.cpp b/engines/nancy/ui/viewport.cpp
index 9a3d143edf..a673744575 100644
--- a/engines/nancy/ui/viewport.cpp
+++ b/engines/nancy/ui/viewport.cpp
@@ -184,7 +184,10 @@ void Viewport::loadVideo(const Common::String &filename, uint frameNr, uint vert
if (_decoder.isVideoLoaded()) {
_decoder.close();
}
- _decoder.loadFile(filename + ".avf");
+
+ if (!_decoder.loadFile(filename + ".avf")) {
+ error("Couldn't load video file %s", filename.c_str());
+ }
_videoFormat = format;
Commit: 700f60042e5b1d5c04ce4734f220825a677a8e2c
https://github.com/scummvm/scummvm/commit/700f60042e5b1d5c04ce4734f220825a677a8e2c
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:51+02:00
Commit Message:
NANCY: Fix memory leak
The CursorManager now gets deleted in NancyEngine's destructor, fixing a memory leak.
Changed paths:
engines/nancy/nancy.cpp
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index 74e1e76d70..b549cdb8aa 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -90,6 +90,7 @@ NancyEngine::~NancyEngine() {
delete _randomSource;
delete _graphicsManager;
+ delete _cursorManager;
delete _input;
delete _sound;
}
Commit: b175c5fd10f1c24bf38b1c2e0d45a3d8733a0040
https://github.com/scummvm/scummvm/commit/b175c5fd10f1c24bf38b1c2e0d45a3d8733a0040
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:53+02:00
Commit Message:
NANCY: Initialize class members
Class members that get properly initialized after the constructor now also get default values during construction to silence warnings. Also fixed a couple of broken entries in response.cpp that were uncovered by these changes.
Changed paths:
engines/nancy/action/leverpuzzle.h
engines/nancy/action/orderingpuzzle.h
engines/nancy/action/passwordpuzzle.h
engines/nancy/action/primaryvideo.h
engines/nancy/action/responses.cpp
engines/nancy/action/rotatinglockpuzzle.h
engines/nancy/action/secondarymovie.h
engines/nancy/action/sliderpuzzle.h
engines/nancy/action/staticbitmapanim.h
engines/nancy/commontypes.h
engines/nancy/input.h
engines/nancy/nancy.cpp
engines/nancy/nancy.h
engines/nancy/resource.cpp
engines/nancy/state/credits.h
engines/nancy/state/scene.h
engines/nancy/ui/inventorybox.h
engines/nancy/ui/textbox.h
engines/nancy/ui/viewport.h
diff --git a/engines/nancy/action/leverpuzzle.h b/engines/nancy/action/leverpuzzle.h
index 2de2a9c15b..e19b568f5b 100644
--- a/engines/nancy/action/leverpuzzle.h
+++ b/engines/nancy/action/leverpuzzle.h
@@ -57,7 +57,7 @@ public:
SoundDescription _noMoveSound; // 0x122
SceneChangeDescription _solveExitScene; // 0x144
EventFlagDescription _flagOnSolve; // 0x14E
- uint16 _solveSoundDelay; // 0x151
+ uint16 _solveSoundDelay = 0; // 0x151
SoundDescription _solveSound; // 0x153
SceneChangeDescription _exitScene; // 0x175
EventFlagDescription _flagOnExit; // 0x17F
diff --git a/engines/nancy/action/orderingpuzzle.h b/engines/nancy/action/orderingpuzzle.h
index 1330a7347a..9931bcb135 100644
--- a/engines/nancy/action/orderingpuzzle.h
+++ b/engines/nancy/action/orderingpuzzle.h
@@ -53,12 +53,12 @@ public:
Common::String _imageName; // 0x00
Common::Array<Common::Rect> _srcRects; // 0xC, 15
Common::Array<Common::Rect> _destRects; // 0xFC, 15
- uint16 _sequenceLength; // 0x1EC;
+ uint16 _sequenceLength = 0; // 0x1EC;
Common::Array<byte> _correctSequence; // 0x1EE, 15 bytes
Nancy::SoundDescription _clickSound; // 0x1FD, kNormal
SceneChangeDescription _solveExitScene; // 0x21F
EventFlagDescription _flagOnSolve; // 0x229
- uint16 _solveSoundDelay; // 0x22C
+ uint16 _solveSoundDelay = 0; // 0x22C
Nancy::SoundDescription _solveSound; // 0x22E
SceneChangeDescription _exitScene; // 0x250
EventFlagDescription _flagOnExit; // 0x25A
diff --git a/engines/nancy/action/passwordpuzzle.h b/engines/nancy/action/passwordpuzzle.h
index 7a18836485..884715ee91 100644
--- a/engines/nancy/action/passwordpuzzle.h
+++ b/engines/nancy/action/passwordpuzzle.h
@@ -38,11 +38,7 @@ namespace Action {
class PasswordPuzzle : public ActionRecord, public RenderObject {
public:
enum SolveState { kNotSolved, kFailed, kSolved };
- PasswordPuzzle(RenderObject &redrawFrom) :
- RenderObject(redrawFrom),
- _passwordFieldIsActive(false),
- _playerHasHitReturn(false),
- _solveState(kNotSolved) {}
+ PasswordPuzzle(RenderObject &redrawFrom) : RenderObject(redrawFrom) {}
virtual ~PasswordPuzzle() {}
virtual void init() override;
@@ -52,7 +48,7 @@ public:
virtual void handleInput(NancyInput &input) override;
virtual void onPause(bool pause) override;
- uint16 _fontID; // 0x00
+ uint16 _fontID = 0; // 0x00
Time _cursorBlinkTime; // 0x2
Common::Rect _nameBounds; // 0x4
Common::Rect _passwordBounds; // 0x14
@@ -72,9 +68,9 @@ public:
Common::String _playerNameInput;
Common::String _playerPasswordInput;
Time _nextBlinkTime;
- bool _passwordFieldIsActive;
- bool _playerHasHitReturn;
- SolveState _solveState;
+ bool _passwordFieldIsActive = false;
+ bool _playerHasHitReturn = false;
+ SolveState _solveState = kNotSolved;
protected:
virtual Common::String getRecordTypeName() const override { return "PasswordPuzzle"; }
diff --git a/engines/nancy/action/primaryvideo.h b/engines/nancy/action/primaryvideo.h
index 66030a1e63..f83ea14ca9 100644
--- a/engines/nancy/action/primaryvideo.h
+++ b/engines/nancy/action/primaryvideo.h
@@ -96,10 +96,10 @@ public:
SoundDescription _sound; // 0x619
SoundDescription _responseGenericSound; // 0x63B
- byte _conditionalResponseCharacterID; // 0x65E
- byte _goodbyeResponseCharacterID; // 0x65F
- NancyFlag _isDialogueExitScene; // 0x660
- NancyFlag _doNotPop; // 0x661
+ byte _conditionalResponseCharacterID = 0; // 0x65E
+ byte _goodbyeResponseCharacterID = 0; // 0x65F
+ NancyFlag _isDialogueExitScene = NancyFlag::kFalse; // 0x660
+ NancyFlag _doNotPop = NancyFlag::kFalse; // 0x661
SceneChangeDescription _sceneChange; // 0x662
Common::Array<ResponseStruct> _responses; // 0x69E
diff --git a/engines/nancy/action/responses.cpp b/engines/nancy/action/responses.cpp
index c93de16a00..f6caedae69 100644
--- a/engines/nancy/action/responses.cpp
+++ b/engines/nancy/action/responses.cpp
@@ -850,7 +850,9 @@ static const HintDesc nancy1Hints[] {
{ 0x4A, kTrue },
EMPTY_DESC
},
- EMPTY_DESC
+ {
+ EMPTY_DESC
+ }
},
{
@@ -860,7 +862,9 @@ static const HintDesc nancy1Hints[] {
{ 0x5B, kFalse },
EMPTY_DESC
},
- EMPTY_DESC
+ {
+ EMPTY_DESC
+ }
},
{
diff --git a/engines/nancy/action/rotatinglockpuzzle.h b/engines/nancy/action/rotatinglockpuzzle.h
index cc943a8046..21d4e07d97 100644
--- a/engines/nancy/action/rotatinglockpuzzle.h
+++ b/engines/nancy/action/rotatinglockpuzzle.h
@@ -59,7 +59,7 @@ public:
Nancy::SoundDescription _clickSound; // 0x234, kNormal
SceneChangeDescription _solveExitScene; // 0x256
EventFlagDescription _flagOnSolve; // 0x260
- uint16 _solveSoundDelay; // 0x263
+ uint16 _solveSoundDelay = 0; // 0x263
Nancy::SoundDescription _solveSound; // 0x265
SceneChangeDescription _exitScene; // 0x287
EventFlagDescription _flagOnExit; // 0x291
diff --git a/engines/nancy/action/secondarymovie.h b/engines/nancy/action/secondarymovie.h
index d5c00df5d2..01070cc9dd 100644
--- a/engines/nancy/action/secondarymovie.h
+++ b/engines/nancy/action/secondarymovie.h
@@ -42,10 +42,7 @@ public:
EventFlagDescription flagDesc;
};
- PlaySecondaryMovie(RenderObject &redrawFrom) :
- RenderObject(redrawFrom),
- _curViewportFrame(-1),
- _isFinished(false) {}
+ PlaySecondaryMovie(RenderObject &redrawFrom) : RenderObject(redrawFrom) {}
virtual ~PlaySecondaryMovie();
virtual void init() override;
@@ -57,11 +54,11 @@ public:
Common::String _videoName; // 0x00
- uint16 _unknown; // 0x1C
- NancyFlag _hideMouse; // 0x1E
- NancyFlag _isReverse; // 0x20
- uint16 _firstFrame; // 0x22
- uint16 _lastFrame; // 0x24
+ uint16 _unknown = 0; // 0x1C
+ NancyFlag _hideMouse = NancyFlag::kFalse; // 0x1E
+ NancyFlag _isReverse = NancyFlag::kFalse; // 0x20
+ uint16 _firstFrame = 0; // 0x22
+ uint16 _lastFrame = 0; // 0x24
FlagAtFrame _frameFlags[15]; // 0x26
MultiEventFlagDescription _triggerFlags; // 0x80
@@ -77,8 +74,8 @@ protected:
virtual bool isViewportRelative() const override { return true; }
AVFDecoder _decoder;
- int _curViewportFrame;
- bool _isFinished;
+ int _curViewportFrame = -1;
+ bool _isFinished = false;
};
} // End of namespace Action
diff --git a/engines/nancy/action/sliderpuzzle.h b/engines/nancy/action/sliderpuzzle.h
index b01338e2bf..e6219d64dc 100644
--- a/engines/nancy/action/sliderpuzzle.h
+++ b/engines/nancy/action/sliderpuzzle.h
@@ -55,8 +55,8 @@ public:
virtual void onPause(bool pause) override;
Common::String _imageName; // 0x00
- uint16 _width; // 0xA
- uint16 _height; // 0xC
+ uint16 _width = 0; // 0xA
+ uint16 _height = 0; // 0xC
Common::Array<Common::Array<Common::Rect>> _srcRects; // 0x0E, size 0x240
Common::Array<Common::Array<Common::Rect>> _destRects; // 0x24E, size 0x240
Common::Array<Common::Array<int16>> _correctTileOrder; // 0x48E, size 0x48
diff --git a/engines/nancy/action/staticbitmapanim.h b/engines/nancy/action/staticbitmapanim.h
index dbfbad0d2b..607e430d1a 100644
--- a/engines/nancy/action/staticbitmapanim.h
+++ b/engines/nancy/action/staticbitmapanim.h
@@ -51,15 +51,15 @@ public:
Common::String _imageName;
- NancyFlag _isTransparent; // 0xC
- NancyFlag _doNotChangeScene; // 0xE
- NancyFlag _isReverse; // 0x10
- NancyFlag _isLooping; // 0x12
- uint16 _firstFrame; // 0x14
- uint16 _loopFirstFrame; // 0x16
- uint16 _loopLastFrame; // 0x18
+ NancyFlag _isTransparent = NancyFlag::kFalse; // 0xC
+ NancyFlag _doNotChangeScene = NancyFlag::kFalse; // 0xE
+ NancyFlag _isReverse = NancyFlag::kFalse; // 0x10
+ NancyFlag _isLooping = NancyFlag::kFalse; // 0x12
+ uint16 _firstFrame = 0; // 0x14
+ uint16 _loopFirstFrame = 0; // 0x16
+ uint16 _loopLastFrame = 0; // 0x18
Time _frameTime;
- uint16 _zOrder; // 0x1C
+ uint16 _zOrder = 0; // 0x1C
EventFlagDescription _interruptCondition; // 0x1E
SceneChangeDescription _sceneChange;
MultiEventFlagDescription _triggerFlags; // 0x2A
diff --git a/engines/nancy/commontypes.h b/engines/nancy/commontypes.h
index 4d9924f536..cd788a2688 100644
--- a/engines/nancy/commontypes.h
+++ b/engines/nancy/commontypes.h
@@ -80,7 +80,7 @@ struct MultiEventFlagDescription {
};
struct SecondaryVideoDescription {
- int16 frameID;
+ int16 frameID = -1;
Common::Rect srcRect;
Common::Rect destRect;
// 2 unknown/empty rects
@@ -93,9 +93,9 @@ struct SoundDescription {
enum Type { kNormal, kMenu, kDIGI, kScene };
Common::String name;
- uint16 channelID;
- uint16 numLoops;
- uint16 volume;
+ uint16 channelID = 0;
+ uint16 numLoops = 0;
+ uint16 volume = 0;
void read(Common::SeekableReadStream &stream, Type type);
};
diff --git a/engines/nancy/input.h b/engines/nancy/input.h
index cf8aa18db5..7dcf655725 100644
--- a/engines/nancy/input.h
+++ b/engines/nancy/input.h
@@ -94,7 +94,8 @@ enum NancyAction {
public:
InputManager() :
_inputs(0),
- _mouseEnabled(true) {}
+ _mouseEnabled(true),
+ _inputBeginState(nullptr) {}
void processEvents();
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index b549cdb8aa..1b3b65b97c 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -81,6 +81,12 @@ NancyEngine::NancyEngine(OSystem *syst, const NancyGameDescription *gd) : Engine
_cursorManager = new CursorManager();
_launchConsole = false;
+
+ _resource = nullptr;
+ _firstSceneID = 0;
+ _startTimeHours = 0;
+ _overrideMovementTimeDeltas = false;
+ _cheatTypeIsEventFlag = false;
}
NancyEngine::~NancyEngine() {
diff --git a/engines/nancy/nancy.h b/engines/nancy/nancy.h
index 31ed891bed..e2b93cf822 100644
--- a/engines/nancy/nancy.h
+++ b/engines/nancy/nancy.h
@@ -184,8 +184,6 @@ private:
NancyConsole *_console;
const NancyGameDescription *_gameDescription;
- GameType _gameType;
- Common::Platform _platform;
Common::HashMap<Common::String, Common::SeekableReadStream *> _bootChunks;
};
diff --git a/engines/nancy/resource.cpp b/engines/nancy/resource.cpp
index a303af92f1..bfd9bbb49c 100644
--- a/engines/nancy/resource.cpp
+++ b/engines/nancy/resource.cpp
@@ -55,7 +55,7 @@ static void readCifInfo20(Common::File &f, ResourceManager::CifInfo &info, uint3
class CifFile {
public:
- CifFile(const Common::String &name, Common::File *f) : _name(name), _f(f) { };
+ CifFile(const Common::String &name, Common::File *f) : _name(name), _f(f), _dataOffset(0) { };
virtual ~CifFile();
bool initialize();
diff --git a/engines/nancy/state/credits.h b/engines/nancy/state/credits.h
index 1811a7603c..f414388de3 100644
--- a/engines/nancy/state/credits.h
+++ b/engines/nancy/state/credits.h
@@ -44,7 +44,7 @@ namespace State {
class Credits : public State, public Common::Singleton<Credits> {
public:
enum State { kInit, kRun };
- Credits() : _state(kInit), _background(), _text(_background) {}
+ Credits() : _state(kInit), _background(), _text(_background), _pixelsToScroll(0) {}
// State API
virtual void process() override;
diff --git a/engines/nancy/state/scene.h b/engines/nancy/state/scene.h
index 5f18ef7c2c..1ca543ff97 100644
--- a/engines/nancy/state/scene.h
+++ b/engines/nancy/state/scene.h
@@ -117,7 +117,8 @@ public:
_inventoryBox(_frame),
_menuButton(_frame),
_helpButton(_frame),
- _actionManager() {}
+ _actionManager(),
+ _difficulty(0) {}
// State API
virtual void process() override;
diff --git a/engines/nancy/ui/inventorybox.h b/engines/nancy/ui/inventorybox.h
index ee84c0c497..e3fd9c9bab 100644
--- a/engines/nancy/ui/inventorybox.h
+++ b/engines/nancy/ui/inventorybox.h
@@ -59,7 +59,8 @@ public:
RenderObject(redrawFrom),
_scrollbar(redrawFrom, this),
_shades(*this, this),
- _scrollbarPos(0) {}
+ _scrollbarPos(0),
+ _shadesFrameTime(0) {}
virtual ~InventoryBox() { _fullInventorySurface.free(); _iconsSurface.free(); }
diff --git a/engines/nancy/ui/textbox.h b/engines/nancy/ui/textbox.h
index 61ce0e7239..47837d0c48 100644
--- a/engines/nancy/ui/textbox.h
+++ b/engines/nancy/ui/textbox.h
@@ -49,7 +49,8 @@ public:
_borderWidth(0),
_needsTextRedraw(false),
_scrollbar(redrawFrom, this),
- _scrollbarPos(0) {}
+ _scrollbarPos(0),
+ _numLines(0) {}
virtual ~Textbox() { _fullSurface.free(); }
diff --git a/engines/nancy/ui/viewport.h b/engines/nancy/ui/viewport.h
index e8b5c71ad1..d0661f45b0 100644
--- a/engines/nancy/ui/viewport.h
+++ b/engines/nancy/ui/viewport.h
@@ -43,7 +43,10 @@ public:
Viewport() :
RenderObject(),
_movementLastFrame(0),
- _edgesMask(0) {}
+ _edgesMask(0),
+ _currentFrame(0),
+ _videoFormat(0) {}
+
virtual ~Viewport() { _decoder.close(); _fullFrame.free(); }
virtual void init() override;
Commit: b029d377ab10aa598ba1ec9098e4b3da0b0f685c
https://github.com/scummvm/scummvm/commit/b029d377ab10aa598ba1ec9098e4b3da0b0f685c
Author: fracturehill (strahy at outlook.com)
Date: 2021-03-25T19:52:53+02:00
Commit Message:
NANCY: Fix credits transparency
Fixed an issue where the credits text's background was bright green instead of transparent.
Changed paths:
engines/nancy/state/credits.cpp
diff --git a/engines/nancy/state/credits.cpp b/engines/nancy/state/credits.cpp
index 3974e52803..41a81454e0 100644
--- a/engines/nancy/state/credits.cpp
+++ b/engines/nancy/state/credits.cpp
@@ -71,8 +71,8 @@ void Credits::init() {
Common::Rect src = _text._screenPosition;
src.moveTo(Common::Point());
+ _fullTextSurface.setTransparentColor(g_nancy->_graphicsManager->getTransColor());
_text._drawSurface.create(_fullTextSurface, src);
- _text.setTransparent(true);
_text.init();
g_nancy->_sound->loadSound(_sound);
More information about the Scummvm-git-logs
mailing list