diff options
| author | Strangerke | 2016-05-24 07:24:30 +0200 | 
|---|---|---|
| committer | Strangerke | 2016-05-24 07:46:19 +0200 | 
| commit | a923745973bfe7d0f1fba8184add7ec9c320c5e5 (patch) | |
| tree | 8a9a29772266b9a2e7d620310b21e9239d842b08 | |
| parent | 4cac7d15112da7c25cda1ca45cc8ee95eed0716e (diff) | |
| download | scummvm-rg350-a923745973bfe7d0f1fba8184add7ec9c320c5e5.tar.gz scummvm-rg350-a923745973bfe7d0f1fba8184add7ec9c320c5e5.tar.bz2 scummvm-rg350-a923745973bfe7d0f1fba8184add7ec9c320c5e5.zip | |
GNAP: Fix some uninitialized variables
| -rw-r--r-- | engines/gnap/gamesys.cpp | 10 | ||||
| -rw-r--r-- | engines/gnap/resource.h | 3 | 
2 files changed, 11 insertions, 2 deletions
| diff --git a/engines/gnap/gamesys.cpp b/engines/gnap/gamesys.cpp index 4b18fd14a3..8fcf1dca58 100644 --- a/engines/gnap/gamesys.cpp +++ b/engines/gnap/gamesys.cpp @@ -58,9 +58,17 @@ GameSys::GameSys(GnapEngine *vm) : _vm(vm) {  	_frontSurface = nullptr;  	for (int i = 0; i < kMaxAnimations; ++i) {  		_animations[i]._sequenceId = -1; -		_animations[i]._id = 0; +		_animations[i]._id = -1;  		_animations[i]._status = 0;  	} +	_removeSequenceItems->_sequenceId = -1; +	_removeSequenceItems->_id = -1; +	_removeSequenceItems->_forceFrameReset = false; +	_removeSpriteDrawItems->_id = -1; +	_removeSpriteDrawItems->_surface = nullptr; + +	_grabSpriteSurface1 = _grabSpriteSurface2 = nullptr; +  	_screenRect = Common::Rect(0, 0, 800, 600);  } diff --git a/engines/gnap/resource.h b/engines/gnap/resource.h index 29bd31c88f..f4a3669eda 100644 --- a/engines/gnap/resource.h +++ b/engines/gnap/resource.h @@ -59,7 +59,8 @@ struct SequenceAnimation {  	int16 _framesCount;  	int16 _maxTotalDuration;  	SequenceFrame *frames; -	SequenceAnimation() : frames(nullptr) {} + +	SequenceAnimation() : frames(nullptr), _additionalDelay(0), _framesCount(0), _maxTotalDuration(0) {}  	~SequenceAnimation() { delete[] frames; }  	void loadFromStream(Common::MemoryReadStream &stream);  }; | 
