[Scummvm-cvs-logs] scummvm master -> 6df36e5ecfc3f6d5879b1932ecaf0e450ac296a9

Littleboy Littleboy at users.noreply.github.com
Sat Sep 7 00:06:38 CEST 2013


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:
3591f559ab LASTEXPRESS: Fix uninitialized scalar field (CID1002847)
a496ade059 LASTEXPRESS: Fix unchecked return value in LastExpressEngine::pollEvents() (CID1004167)
041aa50cb5 LASTEXPRESS: Remove unneeded check for loaded sequence (CID1003911)
20745e0b3e LASTEXPRESS: Fix unchecked return value (CID1003850)
9714cce46f LASTEXPRESS: Fix unchecked return value (CID1003854)
a20bf7cb60 LASTEXPRESS: Fix uninitialized scalar field (CID1002849)
6df36e5ecf CREATE_PROJECT: Add extra configuration for compilation with LLVM


Commit: 3591f559ab15820c97818b8a32cf52c3eadc4237
    https://github.com/scummvm/scummvm/commit/3591f559ab15820c97818b8a32cf52c3eadc4237
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T19:51:30-07:00

Commit Message:
LASTEXPRESS: Fix uninitialized scalar field (CID1002847)

Changed paths:
    engines/lastexpress/game/state.h



diff --git a/engines/lastexpress/game/state.h b/engines/lastexpress/game/state.h
index 2c484f6..944f6d4 100644
--- a/engines/lastexpress/game/state.h
+++ b/engines/lastexpress/game/state.h
@@ -502,6 +502,7 @@ public:
 			volume = _defaultVolume;
 
 			//Game data
+			field_0 = 0;
 			time = kTimeCityParis;
 			timeDelta = _defaultTimeDelta;
 			timeTicks = 0;


Commit: a496ade05958afda3466c2dcc057b276152d05a1
    https://github.com/scummvm/scummvm/commit/a496ade05958afda3466c2dcc057b276152d05a1
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T19:51:31-07:00

Commit Message:
LASTEXPRESS: Fix unchecked return value in LastExpressEngine::pollEvents() (CID1004167)

Changed paths:
    engines/lastexpress/lastexpress.cpp



diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index 01d2634..bc1624d 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -165,10 +165,10 @@ Common::Error LastExpressEngine::run() {
 
 void LastExpressEngine::pollEvents() {
 	Common::Event ev;
-	_eventMan->pollEvent(ev);
+	if (!_eventMan->pollEvent(ev))
+		return;
 
 	switch (ev.type) {
-
 	case Common::EVENT_LBUTTONUP:
 		getGameLogic()->getGameState()->getGameFlags()->mouseLeftClick = true;
 		break;


Commit: 041aa50cb5f1fddf2efb6c65b232d051cce8b633
    https://github.com/scummvm/scummvm/commit/041aa50cb5f1fddf2efb6c65b232d051cce8b633
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T19:51:32-07:00

Commit Message:
LASTEXPRESS: Remove unneeded check for loaded sequence (CID1003911)

The sequence loading helper should already check if the sequence is loaded and clean up the instance if not

Changed paths:
    engines/lastexpress/game/scenes.cpp



diff --git a/engines/lastexpress/game/scenes.cpp b/engines/lastexpress/game/scenes.cpp
index a2c7226..82688ff 100644
--- a/engines/lastexpress/game/scenes.cpp
+++ b/engines/lastexpress/game/scenes.cpp
@@ -587,8 +587,8 @@ void SceneManager::updateDoorsAndClock() {
 			Common::String name = Common::String::format("633X%c-%02d.seq", (index - firstIndex) + 65, scene->position);
 			Sequence *sequence = loadSequence1(name, 255);
 
-			// If the sequence doesn't exists, skip
-			if (!sequence || !sequence->isLoaded())
+			// If the sequence doesn't exists or could not be loaded, skip index
+			if (!sequence)
 				continue;
 
 			// Adjust frame data and store in frame list


Commit: 20745e0b3e6a7a433048890c2c2790c3245e802d
    https://github.com/scummvm/scummvm/commit/20745e0b3e6a7a433048890c2c2790c3245e802d
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T19:51:33-07:00

Commit Message:
LASTEXPRESS: Fix unchecked return value (CID1003850)

Changed paths:
    engines/lastexpress/debug.cpp



diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index db3a3e3..73e3423 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -487,7 +487,9 @@ bool Debugger::cmdPlaySeq(int argc, const char **argv) {
 
 					// Handle right-click to interrupt sequence
 					Common::Event ev;
-					_engine->getEventManager()->pollEvent(ev);
+					if (!_engine->getEventManager()->pollEvent(ev))
+						break;
+
 					if (ev.type == Common::EVENT_RBUTTONUP)
 						break;
 


Commit: 9714cce46ff51036913214cb833f5396357529b5
    https://github.com/scummvm/scummvm/commit/9714cce46ff51036913214cb833f5396357529b5
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T19:51:34-07:00

Commit Message:
LASTEXPRESS: Fix unchecked return value (CID1003854)

Changed paths:
    engines/lastexpress/debug.cpp



diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 73e3423..7c83aff 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -598,7 +598,9 @@ bool Debugger::cmdPlaySbe(int argc, const char **argv) {
 
 					// Handle right-click to interrupt sequence
 					Common::Event ev;
-					_engine->getEventManager()->pollEvent(ev);
+					if (!_engine->getEventManager()->pollEvent(ev))
+						break;
+
 					if (ev.type == Common::EVENT_RBUTTONUP)
 						break;
 


Commit: a20bf7cb60bbe34f6eebfc7b613348345660612c
    https://github.com/scummvm/scummvm/commit/a20bf7cb60bbe34f6eebfc7b613348345660612c
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T19:51:35-07:00

Commit Message:
LASTEXPRESS: Fix uninitialized scalar field (CID1002849)

Changed paths:
    engines/lastexpress/data/scene.h



diff --git a/engines/lastexpress/data/scene.h b/engines/lastexpress/data/scene.h
index 69a1417..b99e56a 100644
--- a/engines/lastexpress/data/scene.h
+++ b/engines/lastexpress/data/scene.h
@@ -83,6 +83,7 @@ class Scene;
 class SceneHotspot {
 public:
 	enum Action {
+		kActionNone = 0,
 		kActionInventory = 1,
 		kActionSavePoint = 2,
 		kActionPlaySound = 3,
@@ -152,8 +153,19 @@ public:
 	byte cursor;
 	uint32 next;
 
-	SceneHotspot() {}
+	SceneHotspot() {
+		coordsOffset = 0;
+		scene = kSceneNone;
+		location = 0;
+		action = kActionNone;
+		param1 = 0;
+		param2 = 0;
+		param3 = 0;
+		cursor = 0;
+		next = 0;
+	}
 	~SceneHotspot();
+
 	static SceneHotspot *load(Common::SeekableReadStream *stream);
 
 	bool isInside(const Common::Point &point);


Commit: 6df36e5ecfc3f6d5879b1932ecaf0e450ac296a9
    https://github.com/scummvm/scummvm/commit/6df36e5ecfc3f6d5879b1932ecaf0e450ac296a9
Author: Littleboy (littleboy at scummvm.org)
Date: 2013-09-05T21:19:56-07:00

Commit Message:
CREATE_PROJECT: Add extra configuration for compilation with LLVM

Changed paths:
    .gitignore
    devtools/create_project/msbuild.cpp
    devtools/create_project/msbuild.h
    devtools/create_project/msvc.cpp
    devtools/create_project/msvc.h
    devtools/create_project/visualstudio.cpp
    devtools/create_project/visualstudio.h



diff --git a/.gitignore b/.gitignore
index 99c9296..0fe2120 100644
--- a/.gitignore
+++ b/.gitignore
@@ -168,6 +168,8 @@ ipch/
 [Rr]elease32/
 [Dd]ebug64/
 [Rr]elease64/
+LLVM32/
+LLVM64/
 
 #Ignore Qt Creator project files
 ScummVM.config
diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp
index 60aa35b..44055ab 100644
--- a/devtools/create_project/msbuild.cpp
+++ b/devtools/create_project/msbuild.cpp
@@ -67,10 +67,10 @@ inline void outputConfiguration(std::ostream &project, const std::string &config
 	           "\t\t</ProjectConfiguration>\n";
 }
 
-inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, int version) {
+inline void outputConfigurationType(const BuildSetup &setup, std::ostream &project, const std::string &name, const std::string &config, std::string toolset) {
 	project << "\t<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='" << config << "'\" Label=\"Configuration\">\n"
 	           "\t\t<ConfigurationType>" << ((name == setup.projectName || setup.devTools || setup.tests) ? "Application" : "StaticLibrary") << "</ConfigurationType>\n"
-	           "\t\t<PlatformToolset>v" << version << "0</PlatformToolset>\n"
+	           "\t\t<PlatformToolset>" << toolset << "</PlatformToolset>\n"
 	           "\t</PropertyGroup>\n";
 }
 
@@ -98,6 +98,8 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	outputConfiguration(project, "Debug", "x64");
 	outputConfiguration(project, "Analysis", "Win32");
 	outputConfiguration(project, "Analysis", "x64");
+	outputConfiguration(project, "LLVM", "Win32");
+	outputConfiguration(project, "LLVM", "x64");
 	outputConfiguration(project, "Release", "Win32");
 	outputConfiguration(project, "Release", "x64");
 
@@ -108,18 +110,22 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 	           "\t\t<ProjectGuid>{" << uuid << "}</ProjectGuid>\n"
 	           "\t\t<RootNamespace>" << name << "</RootNamespace>\n"
 	           "\t\t<Keyword>Win32Proj</Keyword>\n"
-			   "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n"
+	           "\t\t<VCTargetsPath Condition=\"'$(VCTargetsPath" << _version << ")' != '' and '$(VSVersion)' == '' and $(VisualStudioVersion) == ''\">$(VCTargetsPath" << _version << ")</VCTargetsPath>\n"
 	           "\t</PropertyGroup>\n";
 
 	// Shared configuration
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n";
 
-	outputConfigurationType(setup, project, name, "Release|Win32", _version);
-	outputConfigurationType(setup, project, name, "Analysis|Win32", _version);
-	outputConfigurationType(setup, project, name, "Debug|Win32", _version);
-	outputConfigurationType(setup, project, name, "Release|x64", _version);
-	outputConfigurationType(setup, project, name, "Analysis|x64", _version);
-	outputConfigurationType(setup, project, name, "Debug|x64", _version);
+	std::string version = "v" + std::to_string(_version) + "0";
+
+	outputConfigurationType(setup, project, name, "Release|Win32", version);
+	outputConfigurationType(setup, project, name, "Analysis|Win32", version);
+	outputConfigurationType(setup, project, name, "LLVM|Win32", "llvm");
+	outputConfigurationType(setup, project, name, "Debug|Win32", version);
+	outputConfigurationType(setup, project, name, "Release|x64", version);
+	outputConfigurationType(setup, project, name, "LLVM|x64", "llvm");
+	outputConfigurationType(setup, project, name, "Analysis|x64", version);
+	outputConfigurationType(setup, project, name, "Debug|x64", version);
 
 	project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n"
 	           "\t<ImportGroup Label=\"ExtensionSettings\">\n"
@@ -127,20 +133,24 @@ void MSBuildProvider::createProjectFile(const std::string &name, const std::stri
 
 	outputProperties(project, "Release|Win32",  setup.projectDescription + "_Release.props");
 	outputProperties(project, "Analysis|Win32", setup.projectDescription + "_Analysis.props");
+	outputProperties(project, "LLVM|Win32",     setup.projectDescription + "_LLVM.props");
 	outputProperties(project, "Debug|Win32",    setup.projectDescription + "_Debug.props");
 	outputProperties(project, "Release|x64",    setup.projectDescription + "_Release64.props");
 	outputProperties(project, "Analysis|x64",   setup.projectDescription + "_Analysis64.props");
+	outputProperties(project, "LLVM|x64",       setup.projectDescription + "_LLVM64.props");
 	outputProperties(project, "Debug|x64",      setup.projectDescription + "_Debug64.props");
 
 	project << "\t<PropertyGroup Label=\"UserMacros\" />\n";
 
 	// Project-specific settings (analysis uses debug properties)
-	outputProjectSettings(project, name, setup, false, true, false);
-	outputProjectSettings(project, name, setup, false, true, true);
-	outputProjectSettings(project, name, setup, true, true, false);
-	outputProjectSettings(project, name, setup, false, false, false);
-	outputProjectSettings(project, name, setup, false, false, true);
-	outputProjectSettings(project, name, setup, true, false, false);
+	outputProjectSettings(project, name, setup, false, true, "Debug");
+	outputProjectSettings(project, name, setup, false, true, "Analysis");
+	outputProjectSettings(project, name, setup, false, true, "LLVM");
+	outputProjectSettings(project, name, setup, true, true, "Release");
+	outputProjectSettings(project, name, setup, false, false, "Debug");
+	outputProjectSettings(project, name, setup, false, false, "Analysis");
+	outputProjectSettings(project, name, setup, false, false, "LLVM");
+	outputProjectSettings(project, name, setup, true, false, "Release");
 
 	// Files
 	std::string modulePath;
@@ -255,9 +265,7 @@ void MSBuildProvider::writeReferences(const BuildSetup &setup, std::ofstream &ou
 	output << "\t</ItemGroup>\n";
 }
 
-void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) {
-	const std::string configuration = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug"));
-
+void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) {
 	// Check for project-specific warnings:
 	std::map<std::string, StringList>::iterator warningsIterator = _projectWarnings.find(name);
 	bool enableLanguageExtensions = find(_enableLanguageExtensions.begin(), _enableLanguageExtensions.end(), name) != _enableLanguageExtensions.end();
@@ -382,13 +390,12 @@ void MSBuildProvider::outputGlobalPropFile(const BuildSetup &setup, std::ofstrea
 	properties.flush();
 }
 
-void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) {
-	const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug"));
+void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) {
 	const std::string outputBitness = (isWin32 ? "32" : "64");
 
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
 
 	properties << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
 	              "<Project DefaultTargets=\"Build\" ToolsVersion=\"" << (_version >= 12 ? _version : 4) << ".0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n"
@@ -396,7 +403,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b
 	              "\t\t<Import Project=\"" << setup.projectDescription << "_Global" << (isWin32 ? "" : "64") << ".props\" />\n"
 	              "\t</ImportGroup>\n"
 	              "\t<PropertyGroup>\n"
-	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << outputType << outputBitness << "</_PropertySheetDisplayName>\n"
+	              "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << configuration << outputBitness << "</_PropertySheetDisplayName>\n"
 	              "\t\t<LinkIncremental>" << (isRelease ? "false" : "true") << "</LinkIncremental>\n"
 	              "\t</PropertyGroup>\n"
 	              "\t<ItemDefinitionGroup>\n"
@@ -410,22 +417,26 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b
 		              "\t\t\t<BufferSecurityCheck>false</BufferSecurityCheck>\n"
 		              "\t\t\t<DebugInformationFormat></DebugInformationFormat>\n"
 		              "\t\t\t<RuntimeLibrary>MultiThreaded</RuntimeLibrary>\n"
-		              "\t\t\t<EnablePREfast>" << (enableAnalysis ? "true" : "false") << "</EnablePREfast>\n"
+		              "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n"
 		              "\t\t</ClCompile>\n"
 		              "\t\t<Link>\n"
 		              "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n"
 		              "\t\t\t<SetChecksum>true</SetChecksum>\n";
 	} else {
 		properties << "\t\t\t<Optimization>Disabled</Optimization>\n"
-		              "\t\t\t<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
+		              "\t\t\t<PreprocessorDefinitions>WIN32;" << (configuration == "LLVM" ? "_CRT_SECURE_NO_WARNINGS;" : "") << "%(PreprocessorDefinitions)</PreprocessorDefinitions>\n"
 		              "\t\t\t<MinimalRebuild>true</MinimalRebuild>\n"
 		              "\t\t\t<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n"
 		              "\t\t\t<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\n"
 		              "\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n"
 		              "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n"
 		              "\t\t\t<DebugInformationFormat>" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n" // For x64 format Edit and continue is not supported, thus we default to Program Database
-		              "\t\t\t<EnablePREfast>" << (enableAnalysis ? "true" : "false") << "</EnablePREfast>\n"
-		              "\t\t</ClCompile>\n"
+		              "\t\t\t<EnablePREfast>" << (configuration == "Analysis" ? "true" : "false") << "</EnablePREfast>\n";
+
+		if (configuration == "LLVM")
+		    properties << "\t\t\t<AdditionalOptions>-Wno-microsoft -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor -Wwrite-strings -Wno-conversion -Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types %(AdditionalOptions)</AdditionalOptions>\n";
+
+		properties << "\t\t</ClCompile>\n"
 		              "\t\t<Link>\n"
 		              "\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n"
 		              "\t\t\t<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>\n"
@@ -481,7 +492,7 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
 			// Deal with duplicated file names
 			if (isDuplicate) {
 				projectFile << "\t\t<ClCompile Include=\"" << (*entry).path << "\">\n"
-				               "\t\t\t<ObjectFileName>$(IntDir)" << (*entry).prefix << "%(Filename).obj</ObjectFileName>\n";
+							   "\t\t\t<ObjectFileName>$(IntDir)" << (*entry).prefix << "%(Filename).obj</ObjectFileName>\n";
 
 				projectFile << "\t\t</ClCompile>\n";
 			} else {
diff --git a/devtools/create_project/msbuild.h b/devtools/create_project/msbuild.h
index fa66677..829657b 100644
--- a/devtools/create_project/msbuild.h
+++ b/devtools/create_project/msbuild.h
@@ -35,7 +35,7 @@ protected:
 	void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir,
 	                       const StringList &includeList, const StringList &excludeList);
 
-	void outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis);
+	void outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration);
 
 	void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation,
 	                            const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix);
@@ -44,7 +44,7 @@ protected:
 
 	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents);
 
-	void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis);
+	void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration);
 
 	const char *getProjectExtension();
 	const char *getPropertiesExtension();
diff --git a/devtools/create_project/msvc.cpp b/devtools/create_project/msvc.cpp
index 2fedadc..cdd2d8a 100644
--- a/devtools/create_project/msvc.cpp
+++ b/devtools/create_project/msvc.cpp
@@ -79,9 +79,11 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 	            "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n"
 	            "\t\tDebug|Win32 = Debug|Win32\n"
 	            "\t\tAnalysis|Win32 = Analysis|Win32\n"
+	            "\t\tLLVM|Win32 = LLVM|Win32\n"
 	            "\t\tRelease|Win32 = Release|Win32\n"
 	            "\t\tDebug|x64 = Debug|x64\n"
 	            "\t\tAnalysis|x64 = Analysis|x64\n"
+	            "\t\tLLVM|x64 = LLVM|x64\n"
 	            "\t\tRelease|x64 = Release|x64\n"
 	            "\tEndGlobalSection\n"
 	            "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n";
@@ -91,12 +93,16 @@ void MSVCProvider::createWorkspace(const BuildSetup &setup) {
 		            "\t\t{" << i->second << "}.Debug|Win32.Build.0 = Debug|Win32\n"
 		            "\t\t{" << i->second << "}.Analysis|Win32.ActiveCfg = Analysis|Win32\n"
 		            "\t\t{" << i->second << "}.Analysis|Win32.Build.0 = Analysis|Win32\n"
+		            "\t\t{" << i->second << "}.LLVM|Win32.ActiveCfg = LLVM|Win32\n"
+		            "\t\t{" << i->second << "}.LLVM|Win32.Build.0 = LLVM|Win32\n"
 		            "\t\t{" << i->second << "}.Release|Win32.ActiveCfg = Release|Win32\n"
 		            "\t\t{" << i->second << "}.Release|Win32.Build.0 = Release|Win32\n"
 		            "\t\t{" << i->second << "}.Debug|x64.ActiveCfg = Debug|x64\n"
 		            "\t\t{" << i->second << "}.Debug|x64.Build.0 = Debug|x64\n"
 		            "\t\t{" << i->second << "}.Analysis|x64.ActiveCfg = Analysis|x64\n"
 		            "\t\t{" << i->second << "}.Analysis|x64.Build.0 = Analysis|x64\n"
+		            "\t\t{" << i->second << "}.LLVM|x64.ActiveCfg = LLVM|x64\n"
+		            "\t\t{" << i->second << "}.LLVM|x64.Build.0 = LLVM|x64\n"
 		            "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n"
 		            "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n";
 	}
@@ -114,12 +120,14 @@ void MSVCProvider::createOtherBuildFiles(const BuildSetup &setup) {
 
 	// Create the configuration property files (for Debug and Release with 32 and 64bits versions)
 	// Note: we use the debug properties for the analysis configuration
-	createBuildProp(setup, true, false, false);
-	createBuildProp(setup, true, true, false);
-	createBuildProp(setup, false, false, false);
-	createBuildProp(setup, false, false, true);
-	createBuildProp(setup, false, true, false);
-	createBuildProp(setup, false, true, true);
+	createBuildProp(setup, true, false, "Release");
+	createBuildProp(setup, true, true, "Release");
+	createBuildProp(setup, false, false, "Debug");
+	createBuildProp(setup, false, true, "Debug");
+	createBuildProp(setup, false, false, "Analysis");
+	createBuildProp(setup, false, true, "Analysis");
+	createBuildProp(setup, false, false, "LLVM");
+	createBuildProp(setup, false, true, "LLVM");
 }
 
 void MSVCProvider::createGlobalProp(const BuildSetup &setup) {
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index b9b93fe..3a3eb98 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -70,7 +70,7 @@ protected:
 	 * @param isWin32         Bitness of property file
 	 * @param enableAnalysis  PREfast support
 	 */
-	virtual void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) = 0;
+	virtual void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) = 0;
 
 	/**
 	 * Get the file extension for property files
diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp
index 23225d3..ac3c30b 100644
--- a/devtools/create_project/visualstudio.cpp
+++ b/devtools/create_project/visualstudio.cpp
@@ -92,6 +92,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		// Win32
 		outputConfiguration(project, setup, libraries, "Debug", "Win32", "", true);
 		outputConfiguration(project, setup, libraries, "Analysis", "Win32", "", true);
+		outputConfiguration(project, setup, libraries, "LLVM", "Win32", "", true);
 		outputConfiguration(project, setup, libraries, "Release", "Win32", "", true);
 
 		// x64
@@ -100,6 +101,7 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		// libraries list created for IA-32. If that changes in the future, we need to adjust this part!
 		outputConfiguration(project, setup, libraries, "Debug", "x64", "64", false);
 		outputConfiguration(project, setup, libraries, "Analysis", "x64", "64", false);
+		outputConfiguration(project, setup, libraries, "LLVM", "Win32", "64", false);
 		outputConfiguration(project, setup, libraries, "Release", "x64", "64", false);
 
 	} else {
@@ -119,9 +121,11 @@ void VisualStudioProvider::createProjectFile(const std::string &name, const std:
 		// Win32
 		outputConfiguration(setup, project, toolConfig, "Debug", "Win32", "");
 		outputConfiguration(setup, project, toolConfig, "Analysis", "Win32", "");
+		 outputConfiguration(setup, project, toolConfig, "LLVM", "Win32", "");
 		outputConfiguration(setup, project, toolConfig, "Release", "Win32", "");
 		outputConfiguration(setup, project, toolConfig, "Debug", "x64", "64");
 		outputConfiguration(setup, project, toolConfig, "Analysis", "x64", "64");
+		outputConfiguration(setup, project, toolConfig, "LLVM", "x64", "64");
 		outputConfiguration(setup, project, toolConfig, "Release", "x64", "64");
 	}
 
@@ -265,19 +269,18 @@ void VisualStudioProvider::outputGlobalPropFile(const BuildSetup &setup, std::of
 	properties.flush();
 }
 
-void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) {
-	const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug"));
+void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration) {
 	const std::string outputBitness = (isWin32 ? "32" : "64");
 
-	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
+	std::ofstream properties((setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str());
 	if (!properties)
-		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
+		error("Could not open \"" + setup.outputDir + '/' + setup.projectDescription + "_" + configuration + (isWin32 ? "" : "64") + getPropertiesExtension() + "\" for writing");
 
 	properties << "<?xml version=\"1.0\" encoding=\"Windows-1252\"?>\n"
 	              "<VisualStudioPropertySheet\n"
 	              "\tProjectType=\"Visual C++\"\n"
 	              "\tVersion=\"8.00\"\n"
-	              "\tName=\"" << setup.projectDescription << "_" << outputType << outputBitness << "\"\n"
+	              "\tName=\"" << setup.projectDescription << "_" << configuration << outputBitness << "\"\n"
 	              "\tInheritedPropertySheets=\".\\" << setup.projectDescription << "_Global" << (isWin32 ? "" : "64") << ".vsprops\"\n"
 	              "\t>\n"
 	              "\t<Tool\n"
@@ -291,7 +294,7 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
 		              "\t\tBufferSecurityCheck=\"false\"\n"
 		              "\t\tDebugInformationFormat=\"0\"\n"
 		              "\t\tRuntimeLibrary=\"0\"\n"
-		              "\t\tAdditionalOption=\"" << (enableAnalysis ? "/analyze" : "") << "\"\n"
+		              "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
 		              "\t/>\n"
 		              "\t<Tool\n"
 		              "\t\tName=\"VCLinkerTool\"\n"
@@ -307,7 +310,7 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea
 		              "\t\tEnableFunctionLevelLinking=\"true\"\n"
 		              "\t\tWarnAsError=\"false\"\n"
 		              "\t\tDebugInformationFormat=\"" << (isWin32 ? "4" : "3") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3"
-		              "\t\tAdditionalOption=\"" << (enableAnalysis ? "/analyze" : "") << "\"\n"
+		              "\t\tAdditionalOption=\"" << (configuration == "Analysis" ? "/analyze" : "") << "\"\n"
 		              "\t/>\n"
 		              "\t<Tool\n"
 		              "\t\tName=\"VCLinkerTool\"\n"
@@ -354,9 +357,9 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
 					            << indentString << "\t<FileConfiguration Name=\"Debug|Win32\">\n"
 					            << toolLine
 					            << indentString << "\t</FileConfiguration>\n"
-								<< indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n"
-								<< toolLine
-								<< indentString << "\t</FileConfiguration>\n"
+					            << indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n"
+					            << toolLine
+					            << indentString << "\t</FileConfiguration>\n"
 					            << indentString << "\t<FileConfiguration Name=\"Release|Win32\">\n"
 					            << toolLine
 					            << indentString << "\t</FileConfiguration>\n"
@@ -369,18 +372,18 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
 						            << indentString << "\t<FileConfiguration Name=\"Debug|Win32\">\n"
 						            << toolLine
 						            << indentString << "\t</FileConfiguration>\n"
-									<< indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n"
-									<< toolLine
-									<< indentString << "\t</FileConfiguration>\n"
+						            << indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n"
+						            << toolLine
+						            << indentString << "\t</FileConfiguration>\n"
 						            << indentString << "\t<FileConfiguration Name=\"Release|Win32\">\n"
 						            << toolLine
 						            << indentString << "\t</FileConfiguration>\n"
-									<< indentString << "\t<FileConfiguration Name=\"Debug|x64\">\n"
-									<< toolLine
-									<< indentString << "\t</FileConfiguration>\n"
-									<< indentString << "\t<FileConfiguration Name=\"Analysis|x64\">\n"
-									<< toolLine
-									<< indentString << "\t</FileConfiguration>\n"
+						            << indentString << "\t<FileConfiguration Name=\"Debug|x64\">\n"
+						            << toolLine
+						            << indentString << "\t</FileConfiguration>\n"
+						            << indentString << "\t<FileConfiguration Name=\"Analysis|x64\">\n"
+						            << toolLine
+						            << indentString << "\t</FileConfiguration>\n"
 						            << indentString << "\t<FileConfiguration Name=\"Release|x64\">\n"
 						            << toolLine
 						            << indentString << "\t</FileConfiguration>\n"
diff --git a/devtools/create_project/visualstudio.h b/devtools/create_project/visualstudio.h
index 8455501..7eb66c4 100644
--- a/devtools/create_project/visualstudio.h
+++ b/devtools/create_project/visualstudio.h
@@ -42,7 +42,7 @@ protected:
 
 	void outputGlobalPropFile(const BuildSetup &setup, std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix, bool runBuildEvents);
 
-	void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis);
+	void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, std::string configuration);
 
 	const char *getProjectExtension();
 	const char *getPropertiesExtension();






More information about the Scummvm-git-logs mailing list