[Scummvm-cvs-logs] scummvm master -> 9375c7b2255e9bd322b9e5e8f99c64a6d8edab1a

bluegr bluegr at gmail.com
Sun May 22 15:30:00 CEST 2016


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e17d1a1482 CREATE_PROJECT: Whitespace fixes
ba930cf65e SAGA: Remove curly brackets from some 1-line if statements
e080c4bf21 SCUMM: Fix warnings thrown by MSVC
7f145232dd SCUMM: Fix compilation with MSVC
b966286b17 SWORD25: Fix signed/unsigned warning
9375c7b225 UPDATES: Fix signed/unsigned warning


Commit: e17d1a1482b0f2a5eafafe225d1a2fd0507a9f69
    https://github.com/scummvm/scummvm/commit/e17d1a1482b0f2a5eafafe225d1a2fd0507a9f69
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-05-22T16:28:40+03:00

Commit Message:
CREATE_PROJECT: Whitespace fixes

Changed paths:
    devtools/create_project/create_project.cpp



diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 0242af1..de5936b 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -938,17 +938,17 @@ TokenList tokenize(const std::string &input, char separator) {
 namespace {
 const Feature s_features[] = {
 	// Libraries
-	{      "libz",        "USE_ZLIB", "zlib",             true, "zlib (compression) support" },
-	{       "mad",         "USE_MAD", "libmad",           true, "libmad (MP3) support" },
+	{      "libz",        "USE_ZLIB", "zlib",             true,  "zlib (compression) support" },
+	{       "mad",         "USE_MAD", "libmad",           true,  "libmad (MP3) support" },
 	{    "vorbis",      "USE_VORBIS", "libvorbisfile_static libvorbis_static libogg_static", true, "Ogg Vorbis support" },
 	{      "flac",        "USE_FLAC", "libFLAC_static win_utf8_io_static",   true, "FLAC support" },
-	{       "png",         "USE_PNG", "libpng16",         true, "libpng support" },
+	{       "png",         "USE_PNG", "libpng16",         true,  "libpng support" },
 	{      "faad",        "USE_FAAD", "libfaad",          false, "AAC support" },
 	{     "mpeg2",       "USE_MPEG2", "libmpeg2",         false, "MPEG-2 support" },
-	{    "theora",   "USE_THEORADEC", "libtheora_static", true, "Theora decoding support" },
-	{  "freetype",   "USE_FREETYPE2", "freetype",         true, "FreeType support" },
-	{      "jpeg",        "USE_JPEG", "jpeg-static",      true, "libjpeg support" },
-	{"fluidsynth",  "USE_FLUIDSYNTH", "libfluidsynth",    true, "FluidSynth support" },
+	{    "theora",   "USE_THEORADEC", "libtheora_static", true,  "Theora decoding support" },
+	{  "freetype",   "USE_FREETYPE2", "freetype",         true,  "FreeType support" },
+	{      "jpeg",        "USE_JPEG", "jpeg-static",      true,  "libjpeg support" },
+	{"fluidsynth",  "USE_FLUIDSYNTH", "libfluidsynth",    true,  "FluidSynth support" },
 
 	// Feature flags
 	{            "bink",             "USE_BINK",         "", true,  "Bink video support" },


Commit: ba930cf65eaa0f2ed1b13174d0903f9b5906cb80
    https://github.com/scummvm/scummvm/commit/ba930cf65eaa0f2ed1b13174d0903f9b5906cb80
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-05-22T16:28:41+03:00

Commit Message:
SAGA: Remove curly brackets from some 1-line if statements

Changed paths:
    engines/saga/scene.cpp



diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index efd4c37..5cb4b55 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -969,9 +969,8 @@ void Scene::processSceneResources(SceneResourceDataArray &resourceList) {
 		case SAGA_OBJECT:
 			break;
 		case SAGA_BG_IMAGE: // Scene background resource
-			if (_bg.loaded) {
+			if (_bg.loaded)
 				error("Scene::processSceneResources() Multiple background resources encountered");
-			}
 
 			debug(3, "Loading background resource.");
 
@@ -987,9 +986,9 @@ void Scene::processSceneResources(SceneResourceDataArray &resourceList) {
 			memcpy(_bg.pal, palPointer, sizeof(_bg.pal));
 			break;
 		case SAGA_BG_MASK: // Scene background mask resource
-			if (_bgMask.loaded) {
+			if (_bgMask.loaded)
 				error("Scene::ProcessSceneResources(): Duplicate background mask resource encountered");
-			}
+
 			debug(3, "Loading BACKGROUND MASK resource.");
 			_vm->decodeBGImage(resourceData, _bgMask.buffer, &_bgMask.w, &_bgMask.h, true);
 			_bgMask.loaded = true;
@@ -1014,47 +1013,38 @@ void Scene::processSceneResources(SceneResourceDataArray &resourceList) {
 			_actionMap->load(resourceData);
 			break;
 		case SAGA_ISO_IMAGES:
-			if (!(_sceneDescription.flags & kSceneFlagISO)) {
+			if (!(_sceneDescription.flags & kSceneFlagISO))
 				error("Scene::ProcessSceneResources(): not Iso mode");
-			}
 
 			debug(3, "Loading isometric images resource.");
 
 			_vm->_isoMap->loadImages(resourceData);
 			break;
 		case SAGA_ISO_MAP:
-			if (!(_sceneDescription.flags & kSceneFlagISO)) {
+			if (!(_sceneDescription.flags & kSceneFlagISO))
 				error("Scene::ProcessSceneResources(): not Iso mode");
-			}
 
 			debug(3, "Loading isometric map resource.");
-
 			_vm->_isoMap->loadMap(resourceData);
 			break;
 		case SAGA_ISO_PLATFORMS:
-			if (!(_sceneDescription.flags & kSceneFlagISO)) {
+			if (!(_sceneDescription.flags & kSceneFlagISO))
 				error("Scene::ProcessSceneResources(): not Iso mode");
-			}
 
 			debug(3, "Loading isometric platforms resource.");
-
 			_vm->_isoMap->loadPlatforms(resourceData);
 			break;
 		case SAGA_ISO_METATILES:
-			if (!(_sceneDescription.flags & kSceneFlagISO)) {
+			if (!(_sceneDescription.flags & kSceneFlagISO))
 				error("Scene::ProcessSceneResources(): not Iso mode");
-			}
 
 			debug(3, "Loading isometric metatiles resource.");
-
 			_vm->_isoMap->loadMetaTiles(resourceData);
 			break;
 		case SAGA_ANIM:
 			{
 				uint16 animId = resource->resourceType - 14;
-
 				debug(3, "Loading animation resource animId=%i", animId);
-
 				_vm->_anim->load(animId, resourceData);
 			}
 			break;
@@ -1063,9 +1053,8 @@ void Scene::processSceneResources(SceneResourceDataArray &resourceList) {
 			loadSceneEntryList(resourceData);
 			break;
 		case SAGA_ISO_MULTI:
-			if (!(_sceneDescription.flags & kSceneFlagISO)) {
+			if (!(_sceneDescription.flags & kSceneFlagISO))
 				error("Scene::ProcessSceneResources(): not Iso mode");
-			}
 
 			debug(3, "Loading isometric multi resource.");
 


Commit: e080c4bf21a69d3e4472edd080a422c1f7780498
    https://github.com/scummvm/scummvm/commit/e080c4bf21a69d3e4472edd080a422c1f7780498
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-05-22T16:28:41+03:00

Commit Message:
SCUMM: Fix warnings thrown by MSVC

Changed paths:
    engines/scumm/he/moonbase/ai_main.cpp
    engines/scumm/he/moonbase/ai_node.h
    engines/scumm/he/moonbase/ai_tree.cpp



diff --git a/engines/scumm/he/moonbase/ai_main.cpp b/engines/scumm/he/moonbase/ai_main.cpp
index 501aab5..1a191a1 100644
--- a/engines/scumm/he/moonbase/ai_main.cpp
+++ b/engines/scumm/he/moonbase/ai_main.cpp
@@ -726,7 +726,7 @@ int masterControlProgram(const int paramCount, const int *params) {
 		// Here to scope tempLaunchAction
 		int *tempLaunchAction = NULL;
 
-		int errCod;
+		int errCod = 0;
 
 		_acquireTarget++;
 
diff --git a/engines/scumm/he/moonbase/ai_node.h b/engines/scumm/he/moonbase/ai_node.h
index 454b98e..0a60dee 100644
--- a/engines/scumm/he/moonbase/ai_node.h
+++ b/engines/scumm/he/moonbase/ai_node.h
@@ -28,7 +28,7 @@
 namespace Scumm {
 
 const float SUCCESS = -1;
-const float FAILURE = 1e20;
+const float FAILURE = 1e20f;
 
 class IContainedObject {
 private:
diff --git a/engines/scumm/he/moonbase/ai_tree.cpp b/engines/scumm/he/moonbase/ai_tree.cpp
index 2335d56..efbf3e3 100644
--- a/engines/scumm/he/moonbase/ai_tree.cpp
+++ b/engines/scumm/he/moonbase/ai_tree.cpp
@@ -80,7 +80,7 @@ Tree::~Tree() {
 	while (pNodeItr != NULL) {
 		// If any children are left, move to one of them
 		if (!(pNodeItr->getChildren().empty())) {
-			int size = (pNodeItr->getChildren()).size();
+			//int size = (pNodeItr->getChildren()).size();
 			pNodeItr = pNodeItr->popChild();
 		} else {
 			// Delete this node, and move up to the parent for further processing
@@ -157,11 +157,10 @@ Node *Tree::aStarSearch_singlePassInit() {
 
 Node *Tree::aStarSearch_singlePass(Node **currentNode) {
 	currentNode = NULL;
-	float currentT;
-
 	Node *retNode = NULL;
 
 #if 0
+	float currentT;
 	static int maxTime = 0;
 
 	if (currentChildIndex == 1) {


Commit: 7f145232dda5d6237aba06e7ac64ed1e9a4c6527
    https://github.com/scummvm/scummvm/commit/7f145232dda5d6237aba06e7ac64ed1e9a4c6527
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-05-22T16:28:41+03:00

Commit Message:
SCUMM: Fix compilation with MSVC

Changed paths:
    engines/scumm/he/moonbase/ai_targetacquisition.cpp



diff --git a/engines/scumm/he/moonbase/ai_targetacquisition.cpp b/engines/scumm/he/moonbase/ai_targetacquisition.cpp
index 6fbd983..fb74d8a 100644
--- a/engines/scumm/he/moonbase/ai_targetacquisition.cpp
+++ b/engines/scumm/he/moonbase/ai_targetacquisition.cpp
@@ -472,7 +472,7 @@ int Defender::calculateDefenseUnitPosition(int targetX, int targetY, int index)
 					}
 				}
 
-				if ((_vm->_rnd.getRandomNumber((int)pow(3, shieldCount + 1) - 1) == 0) && (getPlayerEnergy() > 6))
+				if ((_vm->_rnd.getRandomNumber((int)pow(3.0f, shieldCount + 1) - 1) == 0) && (getPlayerEnergy() > 6))
 					setUnit(ITEM_SHIELD);
 				else
 					setUnit(ITEM_ANTIAIR);


Commit: b966286b176f6b329e0658080a682b51f2c5c554
    https://github.com/scummvm/scummvm/commit/b966286b176f6b329e0658080a682b51f2c5c554
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-05-22T16:28:42+03:00

Commit Message:
SWORD25: Fix signed/unsigned warning

Changed paths:
    engines/sword25/package/packagemanager.cpp



diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index 457dda6..87bedcc 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -82,7 +82,7 @@ Common::String PackageManager::ensureSpeechLang(const Common::String &fileName)
 		return fileName;
 
 	Common::String newFileName = "/speech/en";
-	int fileIdx = 9;
+	uint fileIdx = 9;
 	while (fileIdx < fileName.size() && fileName[fileIdx] != '/')
 		++fileIdx;
 	if (fileIdx < fileName.size())


Commit: 9375c7b2255e9bd322b9e5e8f99c64a6d8edab1a
    https://github.com/scummvm/scummvm/commit/9375c7b2255e9bd322b9e5e8f99c64a6d8edab1a
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-05-22T16:28:42+03:00

Commit Message:
UPDATES: Fix signed/unsigned warning

Changed paths:
    gui/updates-dialog.cpp



diff --git a/gui/updates-dialog.cpp b/gui/updates-dialog.cpp
index 960b3f3..b82ecc0 100644
--- a/gui/updates-dialog.cpp
+++ b/gui/updates-dialog.cpp
@@ -76,13 +76,13 @@ UpdatesDialog::UpdatesDialog() : Dialog(30, 20, 260, 124) {
 	_y = (screenH - _h) / 2;
 
 	// Each line is represented by one static text item.
-	int y = 10;
-	for (int i = 0; i < lines.size(); i++) {
+	uint y = 10;
+	for (uint i = 0; i < lines.size(); i++) {
 		new StaticTextWidget(this, 10, y, maxlineWidth, kLineHeight,
 								lines[i], Graphics::kTextAlignCenter);
 		y += kLineHeight;
 	}
-	for (int i = 0; i < lines2.size(); i++) {
+	for (uint i = 0; i < lines2.size(); i++) {
 		new StaticTextWidget(this, 10, y, maxlineWidth2, kLineHeight,
 								lines2[i], Graphics::kTextAlignCenter, 0, ThemeEngine::kFontStyleTooltip);
 		y += kLineHeight;






More information about the Scummvm-git-logs mailing list