فهرست منبع

Fixing bad commit.
Reverting files to previous versions.

Kieran Cunney 13 سال پیش
والد
کامیت
562b07e5b1

+ 4 - 7
gameplay-encoder/gameplay-encoder.vcxproj

@@ -146,24 +146,21 @@
       </PrecompiledHeader>
       <WarningLevel>Level4</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;USE_FBX;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>../external-deps/freetype2/include;../external-deps/collada-dom/include;../external-deps/collada-dom/include/1.4;../external-deps/libpng/include;../external-deps/zlib/include;C:\Program Files\Autodesk\FBX\FbxSdk\2012.2\include</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../external-deps/freetype2/include;../external-deps/collada-dom/include;../external-deps/collada-dom/include/1.4;../external-deps/libpng/include;../external-deps/zlib/include</AdditionalIncludeDirectories>
       <DisableLanguageExtensions>
       </DisableLanguageExtensions>
-      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>../external-deps/freetype2/lib/win32;../external-deps/collada-dom/lib/win32;../external-deps/libpng/lib/win32;../external-deps/zlib/lib/win32;C:\Program Files\Autodesk\FBX\FbxSdk\2012.2\lib\vs2010\x86</AdditionalLibraryDirectories>
-      <AdditionalDependencies>freetype245.lib;libcollada14dom22-d.lib;libpng14.lib;zlib.lib;fbxsdk-2012.2-mdd.lib;wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>../external-deps/freetype2/lib/win32;../external-deps/collada-dom/lib/win32;../external-deps/libpng/lib/win32;../external-deps/zlib/lib/win32</AdditionalLibraryDirectories>
+      <AdditionalDependencies>freetype245.lib;libcollada14dom22-d.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>MSVCRT</IgnoreSpecificDefaultLibraries>
-      <AdditionalOptions> %(AdditionalOptions)</AdditionalOptions>
     </Link>
     <PostBuildEvent>
       <Command>copy /Y "$(ProjectDir)..\external-deps\collada-dom\lib\win32\*.dll" "$(TargetDir)"
 copy /Y "$(ProjectDir)..\external-deps\zlib\lib\win32\*.dll" "$(TargetDir)"
-copy /Y "C:\Program Files\Autodesk\FBX\FbxSdk\2012.2\lib\vs2010\x86\fbxsdk-2012.2d.dll" "$(TargetDir)"
 </Command>
     </PostBuildEvent>
   </ItemDefinitionGroup>

+ 2 - 1
gameplay-encoder/gameplay-encoder.vcxproj.user

@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerCommandArguments>-groupAnimations HIKCharacterNode_boy_Reference movements "../gameplay-samples/sample03-character/res/scene.fbx"</LocalDebuggerCommandArguments>
+    <LocalDebuggerCommandArguments>
+    </LocalDebuggerCommandArguments>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <LocalDebuggerEnvironment>PATH=%PATH%;../external-deps/zlib/lib/win32;../external-deps/libpng/lib/win32</LocalDebuggerEnvironment>
   </PropertyGroup>

+ 15 - 59
gameplay-encoder/src/FBXSceneEncoder.cpp

@@ -248,7 +248,7 @@ void FBXSceneEncoder::loadScene(KFbxScene* fbxScene)
 
     // Find the ambient light of the scene
     KFbxColor ambientColor = fbxScene->GetGlobalSettings().GetAmbientColor();
-	scene->setAmbientColor((float)ambientColor.mRed, (float)ambientColor.mGreen, (float)ambientColor.mBlue);
+    scene->setAmbientColor((float)ambientColor.mRed, (float)ambientColor.mGreen, (float)ambientColor.mBlue);
 
 	// Assign the first camera node (if there is one) in the scene as the active camera
 	// This ensures that if there's a camera in the scene that it is assigned as the 
@@ -651,64 +651,20 @@ void FBXSceneEncoder::loadLight(KFbxNode* fbxNode, Node* node)
     
     switch (fbxLight->LightType.Get())
     {
-	case KFbxLight::ePOINT:
-	{
-		KFbxLight::EDecayType decayType = fbxLight->DecayType.Get();
-		switch (decayType)
-		{
-		case KFbxLight::eNONE:
-			// No decay.
-			light->setAmbientLight();
-			break;
-		case KFbxLight::eLINEAR:
-			light->setPointLight();
-			light->setLinearAttenuation((float)fbxLight->DecayStart.Get());
-			break;
-		case KFbxLight::eQUADRATIC:
-			light->setPointLight();
-			light->setQuadraticAttenuation((float)fbxLight->DecayStart.Get());
-			break;
-		case KFbxLight::eCUBIC:
-		default:
-			// Not supported..
-			break;
-		}
-		break;
-	}
-	case KFbxLight::eDIRECTIONAL:
-	{
-		light->setDirectionalLight();
-		break;
-	}
-	case KFbxLight::eSPOT:
-	{
-		light->setSpotLight();
-        
-		KFbxLight::EDecayType decayType = fbxLight->DecayType.Get();
-		switch (decayType)
-		{
-		case KFbxLight::eNONE:
-			// No decay.
-			break;
-		case KFbxLight::eLINEAR:
-			light->setLinearAttenuation((float)fbxLight->DecayStart.Get());
-			break;
-		case KFbxLight::eQUADRATIC:
-			light->setQuadraticAttenuation((float)fbxLight->DecayStart.Get());
-			break;
-		case KFbxLight::eCUBIC:
-			// Not supported..
-			break;
-		}
-
-		light->setFalloffAngle(MATH_DEG_TO_RAD((float)fbxLight->ConeAngle.Get()) * 2.0f); // fall off angle
-		break;
-	}
-	default:
-	{
-		warning("Unknown light type in node.");
-		return;
-	}
+    case KFbxLight::ePOINT:
+        light->setPointLight();
+        // TODO: range
+        break;
+    case KFbxLight::eDIRECTIONAL:
+        light->setDirectionalLight();
+        break;
+    case KFbxLight::eSPOT:
+        light->setSpotLight();
+        // TODO: range and angles
+        break;
+    default:
+        warning("Unknown light type in node.");
+        return;
     }
 
     _gamePlayFile.addLight(light);