[Scummvm-cvs-logs] scummvm master -> 8f2a0eb662d50f441621de58278828ef6fb427d1

sev- sev at scummvm.org
Fri Jun 17 12:10:20 CEST 2016


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:
4dc60b525d TINSEL: Fix class initialization
b404524599 TONY: Complete class initializations
8f2a0eb662 TONY: Safer string manipulation


Commit: 4dc60b525d4d7f36ce161e705a2752cd4ac142b4
    https://github.com/scummvm/scummvm/commit/4dc60b525d4d7f36ce161e705a2752cd4ac142b4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-06-17T12:10:11+02:00

Commit Message:
TINSEL: Fix class initialization

Changed paths:
    engines/tinsel/music.cpp
    engines/tinsel/tinsel.cpp



diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index 32d5abb..dc7ca67 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -401,7 +401,7 @@ MidiMusicPlayer::MidiMusicPlayer(TinselEngine *vm) {
 	if (milesAudioEnabled) {
 		// Discworld 1 (DOS) uses Miles Audio 3
 		// use our own Miles Audio drivers
-		// 
+		//
 		// It seems that there are multiple versions of Discworld 1
 		//
 		// Version 1:
@@ -639,10 +639,14 @@ PCMMusicPlayer::PCMMusicPlayer() {
 	_dimmed = false;
 	_dimmedTinsel = false;
 	_dimIteration = 0;
+	_dimmedVolume = 0;
+	_dimPosition = 0;
 
 	_fadeOutVolume = 0;
 	_fadeOutIteration = 0;
 
+	_hScript = _hSegment = 0;
+
 	_end = true;
 
 	_vm->_mixer->playStream(Audio::Mixer::kMusicSoundType,
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 1b733a0..44e8149 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -823,6 +823,9 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc)
 		_console(0), _sound(0), _midiMusic(0), _pcmMusic(0), _bmv(0) {
 	_vm = this;
 
+	_gameId = 0;
+	_driver = NULL;
+
 	_config = new Config(this);
 
 	// Register debug flags


Commit: b40452459942ba900e34a3858d5bd33ba33b1c6c
    https://github.com/scummvm/scummvm/commit/b40452459942ba900e34a3858d5bd33ba33b1c6c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-06-17T12:10:11+02:00

Commit Message:
TONY: Complete class initializations

Changed paths:
    engines/tony/font.cpp
    engines/tony/game.cpp
    engines/tony/gfxcore.h
    engines/tony/mpal/mpalutils.cpp
    engines/tony/sound.cpp
    engines/tony/tony.cpp



diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 850aff1..fb40bf5 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -921,6 +921,12 @@ RMDialogChoice::RMDialogChoice() {
 
 	_curAdded = 0;
 	_bShow = false;
+
+	_curSelection = 0;
+	_numChoices = 0;
+
+	_drawedStrings = NULL;
+	_ptDrawStrings = NULL;
 }
 
 RMDialogChoice::~RMDialogChoice() {
diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index 0a2c623..dbb8ebc 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -319,6 +319,11 @@ RMOptionScreen::RMOptionScreen() {
 	_fadeTime = 0;
 	_nEditPos = 0;
 	_nLastState = MENUGAME;
+
+	_bExit = false;
+	_bLoadMenuOnly = false;
+	_bNoLoadSave = false;
+	_bAlterGfx = false;
 }
 
 RMOptionScreen::~RMOptionScreen() {
diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h
index c908150..1a0738e 100644
--- a/engines/tony/gfxcore.h
+++ b/engines/tony/gfxcore.h
@@ -442,6 +442,7 @@ private:
 		OTList();
 		OTList(RMGfxPrimitive *pr) {
 			_prim = pr;
+			_next = NULL;
 		}
 	};
 
diff --git a/engines/tony/mpal/mpalutils.cpp b/engines/tony/mpal/mpalutils.cpp
index 84c8a68..d52e733 100644
--- a/engines/tony/mpal/mpalutils.cpp
+++ b/engines/tony/mpal/mpalutils.cpp
@@ -37,6 +37,8 @@ namespace MPAL {
  * @param resId					MPAL resource to open
  */
 RMRes::RMRes(uint32 resID) {
+	_buf = NULL;
+
 	_h = g_vm->_resUpdate.queryResource(resID);
 	if (_h == NULL)
 		_h = mpalQueryResource(resID);
diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp
index aa86750..fed51da 100644
--- a/engines/tony/sound.cpp
+++ b/engines/tony/sound.cpp
@@ -161,6 +161,7 @@ FPSfx::FPSfx(bool soundOn) {
 	_loopStream = 0;
 	_rewindableStream = 0;
 	_paused = false;
+	_loop = 0;
 
 	g_vm->_activeSfx.push_back(this);
 }
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index d8fa45c..c51f449 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -83,6 +83,8 @@ TonyEngine::TonyEngine(OSystem *syst, const TonyGameDescription *gameDesc) : Eng
 	_bTimeFreezed = false;
 	_nTimeFreezed = 0;
 	_vdbCodec = FPCODEC_UNKNOWN;
+
+	memset(_funcList, 0, sizeof(_funcList));
 }
 
 TonyEngine::~TonyEngine() {


Commit: 8f2a0eb662d50f441621de58278828ef6fb427d1
    https://github.com/scummvm/scummvm/commit/8f2a0eb662d50f441621de58278828ef6fb427d1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-06-17T12:10:11+02:00

Commit Message:
TONY: Safer string manipulation

Changed paths:
    engines/tony/game.cpp



diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp
index dbb8ebc..7b9cb4c 100644
--- a/engines/tony/game.cpp
+++ b/engines/tony/game.cpp
@@ -1150,7 +1150,7 @@ void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) {
 							// Turn on edit mode
 							_bEditSaveName = true;
 							_nEditPos = _ctx->i;
-							strcpy(_editName, _curThumbName[_ctx->i].c_str());
+							Common::strlcpy(_editName, _curThumbName[_ctx->i].c_str(), sizeof(_editName));
 							_ctx->bRefresh = true;
 						}
 






More information about the Scummvm-git-logs mailing list