ソースを参照

All projects now compile with Clang
- With exceptions for some Windows headers
- And exceptions for files that crash the compiler (shouldn't happen on non-Windows platforms)

BearishSun 9 年 前
コミット
44ce003668
34 ファイル変更480 行追加411 行削除
  1. 67 1
      Documentation/Manuals/Native/renderer.md
  2. 7 0
      Source/BansheeEngine/Include/BsRendererMaterial.h
  3. 1 1
      Source/BansheeSL/Include/BsLexerFX.h
  4. 2 2
      Source/BansheeSL/Include/BsParserFX.h
  5. 172 172
      Source/BansheeSL/Source/BsLexerFX.c
  6. 167 167
      Source/BansheeSL/Source/BsParserFX.c
  7. 2 1
      Source/SBansheeEditor/Source/BsGUIGameObjectField.cpp
  8. 9 5
      Source/SBansheeEditor/Source/BsGUIResourceField.cpp
  9. 1 1
      Source/SBansheeEditor/Source/BsGUITextureField.cpp
  10. 9 0
      Source/SBansheeEditor/Source/BsScriptBuildManager.cpp
  11. 3 3
      Source/SBansheeEditor/Source/BsScriptDragDropManager.cpp
  12. 4 4
      Source/SBansheeEditor/Source/BsScriptDropDownWindow.cpp
  13. 2 1
      Source/SBansheeEditor/Source/BsScriptEditorUtility.cpp
  14. 4 3
      Source/SBansheeEditor/Source/BsScriptEditorWindow.cpp
  15. 1 1
      Source/SBansheeEditor/Source/BsScriptGUIResourceField.cpp
  16. 1 1
      Source/SBansheeEditor/Source/BsScriptGUISceneTreeView.cpp
  17. 1 1
      Source/SBansheeEditor/Source/BsScriptGUISliderField.cpp
  18. 1 7
      Source/SBansheeEditor/Source/BsScriptGUITextField.cpp
  19. 1 8
      Source/SBansheeEditor/Source/BsScriptGUITextureField.cpp
  20. 1 7
      Source/SBansheeEditor/Source/BsScriptGUIToggleField.cpp
  21. 1 1
      Source/SBansheeEditor/Source/BsScriptGUIVector2Field.cpp
  22. 1 1
      Source/SBansheeEditor/Source/BsScriptGUIVector3Field.cpp
  23. 1 1
      Source/SBansheeEditor/Source/BsScriptGUIVector4Field.cpp
  24. 2 2
      Source/SBansheeEditor/Source/BsScriptHandleDrawing.cpp
  25. 1 2
      Source/SBansheeEditor/Source/BsScriptHandleSliderDisc.cpp
  26. 1 2
      Source/SBansheeEditor/Source/BsScriptHandleSliderLine.cpp
  27. 1 2
      Source/SBansheeEditor/Source/BsScriptHandleSliderPlane.cpp
  28. 4 4
      Source/SBansheeEditor/Source/BsScriptImportOptions.cpp
  29. 3 3
      Source/SBansheeEditor/Source/BsScriptModalWindow.cpp
  30. 2 2
      Source/SBansheeEditor/Source/BsScriptOSDropTarget.cpp
  31. 1 0
      Source/SBansheeEditor/Source/BsScriptPlatformInfo.cpp
  32. 1 1
      Source/SBansheeEditor/Source/BsScriptSceneHandles.cpp
  33. 1 1
      Source/SBansheeEditor/Source/BsScriptSceneSelection.cpp
  34. 4 3
      Source/SBansheeEditor/Source/BsToolbarItemManager.cpp

+ 67 - 1
Documentation/Manuals/Native/renderer.md

@@ -139,11 +139,77 @@ const Vector<RenderQueueElement>& sortedElements = queue->getSortedElements();
 ~~~~~~~~~~~~~
 
 ### Renderer material {#renderer_b_a_b}
+Often the renderer needs to use special shaders for various effects (e.g. post-processing effects like FXAA). Unlike shaders and materials used by users, these shaders are built-in into the engine. Since we know they'll always be there we make make it easier for the renderer to load and use them by implementing the @ref BansheeEngine::RendererMaterial "RendererMaterial" interface:
+~~~~~~~~~~~~~{.cpp}
+// Set up a post-processing material
+class DownsampleMat : public RendererMaterial<DownsampleMat>
+{
+	// Required macro pointing to the shader file
+	RMAT_DEF("Downsample.bsl");
+
+public:
+	DownsampleMat()
+	{
+		// Retrieve material parameters, and perform other set-up
+		mInputTexture = mMaterial->getParamTexture("gInputTex");
+		mInvTexSize = mMaterial->getParamTexture("gInvTexSize");
+	}
+
+	// Set up parameters and render a full screen quad using the material
+	void execute(const SPtr<TextureCore>& input)
+	{
+		// Actually assign parameters before rendering
+		mInputTexture.set(input);
+		
+		const RenderTextureProperties& rtProps = target->getProperties();
+		Vector2 invTextureSize(1.0f / rtProps.getWidth(), 1.0f / rtProps.getHeight());
+
+		mParams.gInvTexSize.set(invTextureSize);
+		
+		... set up the render target ...
+		... render using the material ...
+	}
+private:
+	MaterialParamVec2Core mInvTexSize;
+	MaterialParamTextureCore mInputTexture;
+};
+
+// Method defined in RMAT_DEF
+void DirectionalLightMat::_initDefines(ShaderDefines& defines)
+{
+	// Set up optional defines to control shader compilation
+	defines.set("ENABLE_HIGH_QUALITY", 1);
+}
+
+~~~~~~~~~~~~~
+
+Renderer material implementation starts by deriving from @ref BansheeEngine::RendererMaterial<T> "RendererMaterial<T>". This is followed by a declaration of the @ref RMAT_DEF macro, which contains a path to the shader file. The shader file should be located in "Data/Raw/Engine/Shaders/" folder.
+
+You must also implement `_initDefines` method, which allows you to modify the compilation environment. It can be empty if not required, but it is useful if your shader has different settings in the form of \#ifdef blocks, in which case different renderer materials can reference the same file, but different options depending on what is set on this method. Be aware that all built-in shaders are pre-processed by the @ref BansheeEngine::BuiltinResources "BuiltinResources" manager. If you are changing define options you should delete the "Data/Engine/Timestamp.asset" file, which will force the manager to rebuild all shaders (and actually apply the new defines).
+
+Once these methods/macros are implemented, you can then instantiate your renderer material and access the @ref BansheeEngine::Material "Material" using the `mMaterial` field. Normally your material will have some parameters, which you'll want to retrieve in the constructor, and then set before rendering. 
+
+@see materials
+@see renderTargets
+@see renderAPI
 
 ### Parameter blocks {#renderer_b_a_c}
 
 ### Renderer semantics {#renderer_b_a_d}
 
+		auto& texParams = mMaterial->getShader()->getTextureParams();
+		for (auto& entry : texParams)
+		{
+			if (entry.second.rendererSemantic == RPS_GBufferA)
+				mGBufferA = mMaterial->getParamTexture(entry.second.name);
+			else if (entry.second.rendererSemantic == RPS_GBufferB)
+				mGBufferB = mMaterial->getParamTexture(entry.second.name);
+			else if (entry.second.rendererSemantic == RPS_GBufferDepth)
+				mGBufferDepth = mMaterial->getParamTexture(entry.second.name);
+		}
+
 ### RendererUtility {#renderer_b_a_e}
 
-### Renderer options {#renderer_b_a_f}
+### RenderTargetPool {#renderer_b_a_f}
+
+### Renderer options {#renderer_b_a_g}

+ 7 - 0
Source/BansheeEngine/Include/BsRendererMaterial.h

@@ -7,6 +7,11 @@
 #include "BsRendererMaterialManager.h"
 #include "BsShaderDefines.h"
 
+/** @addtogroup Renderer-Engine-Internal
+ *  @{
+ */
+
+/** References the shader path in RendererMaterial implementation */
 #define RMAT_DEF(path)														\
 	public:																	\
 	static void _initMetaData()												\
@@ -16,6 +21,8 @@
 	};																		\
 	static void _initDefines(ShaderDefines& defines);
 
+/** @} */
+
 namespace BansheeEngine
 {
 	/** @addtogroup Renderer-Engine-Internal

+ 1 - 1
Source/BansheeSL/Include/BsLexerFX.h

@@ -349,7 +349,7 @@ extern int yylex \
 #undef YY_DECL
 #endif
 
-#line 390 "../../../Source/BansheeSL/BsLexerFX.l"
+#line 390 "..\\..\\Source\\BansheeSL\\BsLexerFX.l"
 
 
 #line 356 "BsLexerFX.h"

+ 2 - 2
Source/BansheeSL/Include/BsParserFX.h

@@ -41,7 +41,7 @@ extern int yydebug;
 #endif
 /* "%code requires" blocks.  */
 /* Line 2579 of glr.c  */
-#line 9 "../../../Source/BansheeSL/BsParserFX.y"
+#line 9 "..\\..\\Source\\BansheeSL\\BsParserFX.y"
 
 #include "BsMMAlloc.h"
 #include "BsASTFX.h"
@@ -226,7 +226,7 @@ typedef struct YYLTYPE {
 typedef union YYSTYPE
 {
 /* Line 2579 of glr.c  */
-#line 73 "../../../Source/BansheeSL/BsParserFX.y"
+#line 73 "..\\..\\Source\\BansheeSL\\BsParserFX.y"
 
 	int intValue;
 	float floatValue;

ファイルの差分が大きいため隠しています
+ 172 - 172
Source/BansheeSL/Source/BsLexerFX.c


ファイルの差分が大きいため隠しています
+ 167 - 167
Source/BansheeSL/Source/BsParserFX.c


+ 2 - 1
Source/SBansheeEditor/Source/BsGUIGameObjectField.cpp

@@ -25,7 +25,8 @@ namespace BansheeEngine
 
 	GUIGameObjectField::GUIGameObjectField(const PrivatelyConstruct& dummy, const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth,
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
-		:GUIElementContainer(dimensions, style), mLabel(nullptr), mClearButton(nullptr), mDropButton(nullptr), mInstanceId(0), mType(type), mNamespace(typeNamespace)
+		: GUIElementContainer(dimensions, style), mLabel(nullptr), mDropButton(nullptr), mClearButton(nullptr), mType(type)
+		, mNamespace(typeNamespace), mInstanceId(0)
 	{
 		mLayout = GUILayoutX::create();
 		_registerChildElement(mLayout);

+ 9 - 5
Source/SBansheeEditor/Source/BsGUIResourceField.cpp

@@ -23,20 +23,24 @@ namespace BansheeEngine
 {
 	const UINT32 GUIResourceField::DEFAULT_LABEL_WIDTH = 100;
 
-	GUIResourceField::GUIResourceField(const PrivatelyConstruct& dummy, const String& typeNamespace, const String& type, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& style, const GUIDimensions& dimensions, bool withLabel)
-		:GUIElementContainer(dimensions, style), mLabel(nullptr), mClearButton(nullptr), mDropButton(nullptr), mType(type), mNamespace(typeNamespace)
+	GUIResourceField::GUIResourceField(const PrivatelyConstruct& dummy, const String& typeNamespace, const String& type
+		, const GUIContent& labelContent, UINT32 labelWidth, const String& style, const GUIDimensions& dimensions
+		, bool withLabel)
+		: GUIElementContainer(dimensions, style), mLabel(nullptr), mDropButton(nullptr), mClearButton(nullptr)
+		, mNamespace(typeNamespace), mType(type)
 	{
 		mLayout = GUILayoutX::create();
 		_registerChildElement(mLayout);
 
 		if (withLabel)
 		{
-			mLabel = GUILabel::create(labelContent, GUIOptions(GUIOption::fixedWidth(labelWidth)), getSubStyleName(BuiltinEditorResources::ObjectFieldLabelStyleName));
+			mLabel = GUILabel::create(labelContent, GUIOptions(GUIOption::fixedWidth(labelWidth)), 
+				getSubStyleName(BuiltinEditorResources::ObjectFieldLabelStyleName));
 			mLayout->addElement(mLabel);
 		}
 
-		mDropButton = GUIDropButton::create((UINT32)DragAndDropType::Resources, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(BuiltinEditorResources::ObjectFieldDropBtnStyleName));
+		mDropButton = GUIDropButton::create((UINT32)DragAndDropType::Resources, GUIOptions(GUIOption::flexibleWidth()), 
+			getSubStyleName(BuiltinEditorResources::ObjectFieldDropBtnStyleName));
 		mClearButton = GUIButton::create(HString(L""), getSubStyleName(BuiltinEditorResources::ObjectFieldClearBtnStyleName));
 		mClearButton->onClick.connect(std::bind(&GUIResourceField::onClearButtonClicked, this));
 

+ 1 - 1
Source/SBansheeEditor/Source/BsGUITextureField.cpp

@@ -24,7 +24,7 @@ namespace BansheeEngine
 
 	GUITextureField::GUITextureField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
-		:GUIElementContainer(dimensions, style), mLabel(nullptr), mClearButton(nullptr), mDropButton(nullptr)
+		:GUIElementContainer(dimensions, style), mLabel(nullptr), mDropButton(nullptr), mClearButton(nullptr)
 	{
 		mLayout = GUILayoutX::create();
 		_registerChildElement(mLayout);

+ 9 - 0
Source/SBansheeEditor/Source/BsScriptBuildManager.cpp

@@ -156,6 +156,8 @@ namespace BansheeEngine
 			case ScriptBuildFolder::Data:
 				nativeFolderType = BuildFolder::Data;
 				break;
+			default:
+				break;
 			}
 
 			path = BuildManager::instance().getBuildFolder(nativeFolderType, platform);
@@ -216,6 +218,8 @@ namespace BansheeEngine
 			}
 		}
 			break;
+		default:
+			break;
 		}
 
 		IconUtility::updateIconExe(executablePath, icons);
@@ -387,6 +391,9 @@ namespace BansheeEngine
 			if (icon != nullptr)
 				gResources().save(icon, destIconFile, true);
 		}
+			break;
+		default:
+			break;
 		};
 
 		// Save manifest
@@ -431,6 +438,8 @@ namespace BansheeEngine
 				gameSettings->titleBarText = winPlatformInfo->titlebarText;
 			}
 				break;
+			default:
+				break;
 			}
 		}
 

+ 3 - 3
Source/SBansheeEditor/Source/BsScriptDragDropManager.cpp

@@ -127,7 +127,7 @@ namespace BansheeEngine
 				sceneObjects[i] = scriptSO->getNativeSceneObject();
 		}
 
-		ScriptSceneObjectDragDropData* nativeInstance = new (bs_alloc<ScriptSceneObjectDragDropData>()) ScriptSceneObjectDragDropData(managedInstance, sceneObjects);
+		new (bs_alloc<ScriptSceneObjectDragDropData>()) ScriptSceneObjectDragDropData(managedInstance, sceneObjects);
 	}
 
 	MonoArray* ScriptSceneObjectDragDropData::internal_GetObjects(ScriptSceneObjectDragDropData* instance)
@@ -185,7 +185,7 @@ namespace BansheeEngine
 			paths[i] = MonoUtil::monoToWString(monoPath);
 		}
 
-		ScriptResourceDragDropData* nativeInstance = new (bs_alloc<ScriptResourceDragDropData>()) ScriptResourceDragDropData(managedInstance, paths);
+		new (bs_alloc<ScriptResourceDragDropData>()) ScriptResourceDragDropData(managedInstance, paths);
 	}
 
 	MonoArray* ScriptResourceDragDropData::internal_GetPaths(ScriptResourceDragDropData* instance)
@@ -208,7 +208,7 @@ namespace BansheeEngine
 	}
 
 	ScriptDragDropManager::ScriptDragDropManager()
-		:mDroppedFrameIdx(0), mIsDropInProgress(false), mDropType(ScriptDragDropType::None)
+		:mIsDropInProgress(false), mDroppedFrameIdx(0), mDropType(ScriptDragDropType::None)
 	{
 		mDragEndedConn = DragAndDropManager::instance().onDragEnded.connect(std::bind(&ScriptDragDropManager::onMouseDragEnded, this, _1, _2));
 	}

+ 4 - 4
Source/SBansheeEditor/Source/BsScriptDropDownWindow.cpp

@@ -14,7 +14,7 @@
 #include "BsEditorWidgetContainer.h"
 #include "BsCGUIWidget.h"
 #include "BsDropDownWindowManager.h"
-#include <BsScriptObjectManager.h>
+#include "BsScriptObjectManager.h"
 
 using namespace std::placeholders;
 
@@ -122,9 +122,9 @@ namespace BansheeEngine
 
 	ManagedDropDownWindow::ManagedDropDownWindow(const SPtr<RenderWindow>& parent, const SPtr<Camera>& camera,
 		const Vector2I& position, MonoObject* managedInstance, UINT32 width, UINT32 height)
-		:DropDownWindow(parent, camera, position, width, height), mUpdateThunk(nullptr), mManagedInstance(managedInstance),
-		mOnInitializeThunk(nullptr), mOnDestroyThunk(nullptr), mGCHandle(0), mScriptParent(nullptr), 
-		mContentsPanel(nullptr), mIsInitialized(false)
+		: DropDownWindow(parent, camera, position, width, height), mOnInitializeThunk(nullptr), mOnDestroyThunk(nullptr)
+		, mUpdateThunk(nullptr), mIsInitialized(false), mManagedInstance(managedInstance), mGCHandle(0)
+		, mScriptParent(nullptr), mContentsPanel(nullptr)
 	{
 		mGCHandle = mono_gchandle_new(mManagedInstance, false);
 

+ 2 - 1
Source/SBansheeEditor/Source/BsScriptEditorUtility.cpp

@@ -62,7 +62,8 @@ namespace BansheeEngine
 			return emptyArray.getInternal();
 		}
 
-		Vector<ResourceDependency> dependencies = Utility::findResourceDependencies(srcResource->getGenericHandle(), recursive);
+		HResource srcHandle = srcResource->getGenericHandle();
+		Vector<ResourceDependency> dependencies = Utility::findResourceDependencies(srcHandle, recursive);
 
 		UINT32 numEntries = (UINT32)dependencies.size();
 		ScriptArray output = ScriptArray::create<ScriptResource>(numEntries);

+ 4 - 3
Source/SBansheeEditor/Source/BsScriptEditorWindow.cpp

@@ -382,9 +382,10 @@ namespace BansheeEngine
 
 	ScriptEditorWidget::ScriptEditorWidget(const String& ns, const String& type, UINT32 defaultWidth, 
 		UINT32 defaultHeight, EditorWidgetContainer& parentContainer)
-		:EditorWidgetBase(HString(toWString(type)), ns + "." + type, defaultWidth, defaultHeight, parentContainer), 
-		mNamespace(ns), mTypename(type), mUpdateThunk(nullptr), mManagedInstance(nullptr), mOnInitializeThunk(nullptr), 
-		mOnDestroyThunk(nullptr), mContentsPanel(nullptr), mScriptOwner(nullptr), mGetDisplayName(nullptr), mIsInitialized(false)
+		: EditorWidgetBase(HString(toWString(type)), ns + "." + type, defaultWidth, defaultHeight, parentContainer)
+		, mNamespace(ns), mTypename(type), mOnInitializeThunk(nullptr), mOnDestroyThunk(nullptr), mUpdateThunk(nullptr)
+		, mManagedInstance(nullptr), mGetDisplayName(nullptr), mScriptOwner(nullptr), mContentsPanel(nullptr)
+		, mIsInitialized(false)
 	{
 		if(createManagedInstance())
 		{

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptGUIResourceField.cpp

@@ -70,7 +70,7 @@ namespace BansheeEngine
 
 		guiResourceField->onValueChanged.connect(std::bind(&ScriptGUIResourceField::onChanged, instance, _1));
 
-		ScriptGUIResourceField* nativeInstance = new (bs_alloc<ScriptGUIResourceField>()) ScriptGUIResourceField(instance, guiResourceField);
+		new (bs_alloc<ScriptGUIResourceField>()) ScriptGUIResourceField(instance, guiResourceField);
 	}
 
 	void ScriptGUIResourceField::internal_getValue(ScriptGUIResourceField* nativeInstance, MonoObject** output)

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptGUISceneTreeView.cpp

@@ -81,7 +81,7 @@ namespace BansheeEngine
 		String styleName = toString(MonoUtil::monoToWString(style));
 
 		GUISceneTreeView* treeView = GUISceneTreeView::create(options);
-		ScriptGUISceneTreeView* nativeInstance = new (bs_alloc<ScriptGUISceneTreeView>()) ScriptGUISceneTreeView(instance, treeView);
+		new (bs_alloc<ScriptGUISceneTreeView>()) ScriptGUISceneTreeView(instance, treeView);
 	}
 
 	void ScriptGUISceneTreeView::internal_update(ScriptGUISceneTreeView* thisPtr)

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptGUISliderField.cpp

@@ -61,7 +61,7 @@ namespace BansheeEngine
 		guiSliderField->setRange(min, max);
 		guiSliderField->onValueChanged.connect(std::bind(&ScriptGUISliderField::onChanged, instance, _1));
 
-		ScriptGUISliderField* nativeInstance = new (bs_alloc<ScriptGUISliderField>()) ScriptGUISliderField(instance, guiSliderField);
+		new (bs_alloc<ScriptGUISliderField>()) ScriptGUISliderField(instance, guiSliderField);
 	}
 
 	float ScriptGUISliderField::internal_getValue(ScriptGUISliderField* nativeInstance)

+ 1 - 7
Source/SBansheeEditor/Source/BsScriptGUITextField.cpp

@@ -2,19 +2,13 @@
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsScriptGUITextField.h"
 #include "BsScriptMeta.h"
-#include "BsMonoField.h"
 #include "BsMonoClass.h"
 #include "BsMonoManager.h"
 #include "BsMonoMethod.h"
-#include "BsSpriteTexture.h"
 #include "BsMonoUtil.h"
-#include "BsGUILayout.h"
 #include "BsGUITextField.h"
 #include "BsGUIOptions.h"
 #include "BsGUIContent.h"
-#include "BsScriptGUIElementStyle.h"
-#include "BsScriptGUILayout.h"
-#include "BsScriptHString.h"
 #include "BsScriptGUIContent.h"
 
 using namespace std::placeholders;
@@ -67,7 +61,7 @@ namespace BansheeEngine
 		guiField->onValueChanged.connect(std::bind(&ScriptGUITextField::onChanged, instance, _1));
 		guiField->onConfirm.connect(std::bind(&ScriptGUITextField::onConfirmed, instance));
 
-		ScriptGUITextField* nativeInstance = new (bs_alloc<ScriptGUITextField>()) ScriptGUITextField(instance, guiField);
+		new (bs_alloc<ScriptGUITextField>()) ScriptGUITextField(instance, guiField);
 	}
 
 	void ScriptGUITextField::internal_getValue(ScriptGUITextField* nativeInstance, MonoString** output)

+ 1 - 8
Source/SBansheeEditor/Source/BsScriptGUITextureField.cpp

@@ -2,24 +2,17 @@
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsScriptGUITextureField.h"
 #include "BsScriptMeta.h"
-#include "BsMonoField.h"
 #include "BsMonoClass.h"
 #include "BsMonoManager.h"
 #include "BsMonoMethod.h"
-#include "BsSpriteTexture.h"
 #include "BsMonoUtil.h"
-#include "BsGUILayout.h"
 #include "BsGUITextureField.h"
 #include "BsGUIOptions.h"
 #include "BsGUIContent.h"
-#include "BsScriptGUIElementStyle.h"
-#include "BsScriptGUILayout.h"
-#include "BsScriptHString.h"
 #include "BsScriptGUIContent.h"
 #include "BsScriptTexture.h"
 #include "BsScriptResourceManager.h"
 #include "BsScriptResourceRef.h"
-#include "BsResources.h"
 
 using namespace std::placeholders;
 
@@ -69,7 +62,7 @@ namespace BansheeEngine
 
 		guiTextureField->onValueChanged.connect(std::bind(&ScriptGUITextureField::onChanged, instance, _1));
 
-		ScriptGUITextureField* nativeInstance = new (bs_alloc<ScriptGUITextureField>()) ScriptGUITextureField(instance, guiTextureField);
+		new (bs_alloc<ScriptGUITextureField>()) ScriptGUITextureField(instance, guiTextureField);
 	}
 
 	void ScriptGUITextureField::internal_getValue(ScriptGUITextureField* nativeInstance, MonoObject** output)

+ 1 - 7
Source/SBansheeEditor/Source/BsScriptGUIToggleField.cpp

@@ -2,19 +2,13 @@
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsScriptGUIToggleField.h"
 #include "BsScriptMeta.h"
-#include "BsMonoField.h"
 #include "BsMonoClass.h"
 #include "BsMonoManager.h"
 #include "BsMonoMethod.h"
-#include "BsSpriteTexture.h"
 #include "BsMonoUtil.h"
-#include "BsGUILayout.h"
 #include "BsGUIToggleField.h"
 #include "BsGUIOptions.h"
 #include "BsGUIContent.h"
-#include "BsScriptGUIElementStyle.h"
-#include "BsScriptGUILayout.h"
-#include "BsScriptHString.h"
 #include "BsScriptGUIContent.h"
 
 using namespace std::placeholders;
@@ -63,7 +57,7 @@ namespace BansheeEngine
 
 		guiField->onValueChanged.connect(std::bind(&ScriptGUIToggleField::onChanged, instance, _1));
 
-		ScriptGUIToggleField* nativeInstance = new (bs_alloc<ScriptGUIToggleField>()) ScriptGUIToggleField(instance, guiField);
+		new (bs_alloc<ScriptGUIToggleField>()) ScriptGUIToggleField(instance, guiField);
 	}
 
 	void ScriptGUIToggleField::internal_getValue(ScriptGUIToggleField* nativeInstance, bool* output)

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptGUIVector2Field.cpp

@@ -63,7 +63,7 @@ namespace BansheeEngine
 		field->onValueChanged.connect(std::bind(&ScriptGUIVector2Field::onChanged, instance, _1));
 		field->onConfirm.connect(std::bind(&ScriptGUIVector2Field::onConfirmed, instance));
 
-		ScriptGUIVector2Field* nativeInstance = new (bs_alloc<ScriptGUIVector2Field>()) ScriptGUIVector2Field(instance, field);
+		new (bs_alloc<ScriptGUIVector2Field>()) ScriptGUIVector2Field(instance, field);
 	}
 
 	void ScriptGUIVector2Field::internal_getValue(ScriptGUIVector2Field* nativeInstance, Vector2* output)

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptGUIVector3Field.cpp

@@ -63,7 +63,7 @@ namespace BansheeEngine
 		field->onValueChanged.connect(std::bind(&ScriptGUIVector3Field::onChanged, instance, _1));
 		field->onConfirm.connect(std::bind(&ScriptGUIVector3Field::onConfirmed, instance));
 
-		ScriptGUIVector3Field* nativeInstance = new (bs_alloc<ScriptGUIVector3Field>()) ScriptGUIVector3Field(instance, field);
+		new (bs_alloc<ScriptGUIVector3Field>()) ScriptGUIVector3Field(instance, field);
 	}
 
 	void ScriptGUIVector3Field::internal_getValue(ScriptGUIVector3Field* nativeInstance, Vector3* output)

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptGUIVector4Field.cpp

@@ -62,7 +62,7 @@ namespace BansheeEngine
 		field->onValueChanged.connect(std::bind(&ScriptGUIVector4Field::onChanged, instance, _1));
 		field->onConfirm.connect(std::bind(&ScriptGUIVector4Field::onConfirmed, instance));
 
-		ScriptGUIVector4Field* nativeInstance = new (bs_alloc<ScriptGUIVector4Field>()) ScriptGUIVector4Field(instance, field);
+		new (bs_alloc<ScriptGUIVector4Field>()) ScriptGUIVector4Field(instance, field);
 	}
 
 	void ScriptGUIVector4Field::internal_getValue(ScriptGUIVector4Field* nativeInstance, Vector4* output)

+ 2 - 2
Source/SBansheeEditor/Source/BsScriptHandleDrawing.cpp

@@ -96,8 +96,8 @@ namespace BansheeEngine
 
 	void ScriptHandleDrawing::internal_DrawRect(Vector3* center, Vector3* horzAxis, Vector3* vertAxis, float extentH, float extentV, float size)
 	{
-		std::array<Vector3, 2> axes = { *horzAxis, *vertAxis };
-		std::array<float, 2> extents = { extentH, extentV };
+		std::array<Vector3, 2> axes = { { *horzAxis, *vertAxis } };
+		std::array<float, 2> extents = { { extentH, extentV } };
 
 		Rect3 area(*center, axes, extents);
 		HandleManager::instance().getDrawManager().drawRect(area, size);

+ 1 - 2
Source/SBansheeEditor/Source/BsScriptHandleSliderDisc.cpp

@@ -38,8 +38,7 @@ namespace BansheeEngine
 
 	void ScriptHandleSliderDisc::internal_CreateInstance(MonoObject* instance, Vector3* normal, float radius, bool fixedScale, UINT64 layer)
 	{
-		ScriptHandleSliderDisc* nativeInstance = new (bs_alloc<ScriptHandleSliderDisc>())
-			ScriptHandleSliderDisc(instance, *normal, radius, fixedScale, layer);
+		new (bs_alloc<ScriptHandleSliderDisc>()) ScriptHandleSliderDisc(instance, *normal, radius, fixedScale, layer);
 	}
 
 	void ScriptHandleSliderDisc::internal_GetDelta(ScriptHandleSliderDisc* nativeInstance, float* value)

+ 1 - 2
Source/SBansheeEditor/Source/BsScriptHandleSliderLine.cpp

@@ -38,8 +38,7 @@ namespace BansheeEngine
 	void ScriptHandleSliderLine::internal_CreateInstance(MonoObject* instance, Vector3* direction, float length, 
 		bool fixedScale, UINT64 layer)
 	{
-		ScriptHandleSliderLine* nativeInstance = new (bs_alloc<ScriptHandleSliderLine>()) 
-			ScriptHandleSliderLine(instance, *direction, length, fixedScale, layer);
+		new (bs_alloc<ScriptHandleSliderLine>()) ScriptHandleSliderLine(instance, *direction, length, fixedScale, layer);
 	}
 
 	void ScriptHandleSliderLine::internal_GetDelta(ScriptHandleSliderLine* nativeInstance, float* value)

+ 1 - 2
Source/SBansheeEditor/Source/BsScriptHandleSliderPlane.cpp

@@ -38,8 +38,7 @@ namespace BansheeEngine
 	void ScriptHandleSliderPlane::internal_CreateInstance(MonoObject* instance, Vector3* dir1, Vector3* dir2, 
 		float length, bool fixedScale, UINT64 layer)
 	{
-		ScriptHandleSliderPlane* nativeInstance = new (bs_alloc<ScriptHandleSliderPlane>())
-			ScriptHandleSliderPlane(instance, *dir1, *dir2, length, fixedScale, layer);
+		new (bs_alloc<ScriptHandleSliderPlane>()) ScriptHandleSliderPlane(instance, *dir1, *dir2, length, fixedScale, layer);
 	}
 
 	void ScriptHandleSliderPlane::internal_GetDelta(ScriptHandleSliderPlane* nativeInstance, Vector2* value)

+ 4 - 4
Source/SBansheeEditor/Source/BsScriptImportOptions.cpp

@@ -105,7 +105,7 @@ namespace BansheeEngine
 
 	void ScriptTextureImportOptions::internal_CreateInstance(MonoObject* instance)
 	{
-		ScriptTextureImportOptions* nativeInstance = new (bs_alloc<ScriptTextureImportOptions>()) ScriptTextureImportOptions(instance);
+		new (bs_alloc<ScriptTextureImportOptions>()) ScriptTextureImportOptions(instance);
 	}
 
 	PixelFormat ScriptTextureImportOptions::internal_GetPixelFormat(ScriptTextureImportOptions* thisPtr)
@@ -206,7 +206,7 @@ namespace BansheeEngine
 
 	void ScriptMeshImportOptions::internal_CreateInstance(MonoObject* instance)
 	{
-		ScriptMeshImportOptions* nativeInstance = new (bs_alloc<ScriptMeshImportOptions>()) ScriptMeshImportOptions(instance);
+		new (bs_alloc<ScriptMeshImportOptions>()) ScriptMeshImportOptions(instance);
 	}
 
 	bool ScriptMeshImportOptions::internal_GetCPUReadable(ScriptMeshImportOptions* thisPtr)
@@ -333,7 +333,7 @@ namespace BansheeEngine
 
 	void ScriptFontImportOptions::internal_CreateInstance(MonoObject* instance)
 	{
-		ScriptFontImportOptions* nativeInstance = new (bs_alloc<ScriptFontImportOptions>()) ScriptFontImportOptions(instance);
+		new (bs_alloc<ScriptFontImportOptions>()) ScriptFontImportOptions(instance);
 	}
 
 	MonoArray* ScriptFontImportOptions::internal_GetFontSizes(ScriptFontImportOptions* thisPtr)
@@ -460,7 +460,7 @@ namespace BansheeEngine
 
 	void ScriptScriptCodeImportOptions::internal_CreateInstance(MonoObject* instance)
 	{
-		ScriptScriptCodeImportOptions* nativeInstance = new (bs_alloc<ScriptScriptCodeImportOptions>()) ScriptScriptCodeImportOptions(instance);
+		new (bs_alloc<ScriptScriptCodeImportOptions>()) ScriptScriptCodeImportOptions(instance);
 	}
 
 	bool ScriptScriptCodeImportOptions::internal_IsEditorScript(ScriptScriptCodeImportOptions* thisPtr)

+ 3 - 3
Source/SBansheeEditor/Source/BsScriptModalWindow.cpp

@@ -126,9 +126,9 @@ namespace BansheeEngine
 	}
 
 	ManagedModalWindow::ManagedModalWindow(bool allowCloseButton, MonoObject* managedInstance)
-		:ModalWindow(HString::dummy(), allowCloseButton), mUpdateThunk(nullptr), mManagedInstance(managedInstance),
-		mOnInitializeThunk(nullptr), mOnDestroyThunk(nullptr), mOnWindowResizedMethod(nullptr), mGCHandle(0),
-		mScriptParent(nullptr), mContentsPanel(nullptr), mIsInitialized(false)
+		: ModalWindow(HString::dummy(), allowCloseButton), mOnInitializeThunk(nullptr), mOnDestroyThunk(nullptr)
+		, mUpdateThunk(nullptr), mOnWindowResizedMethod(nullptr), mIsInitialized(false), mManagedInstance(managedInstance)
+		, mGCHandle(0), mScriptParent(nullptr), mContentsPanel(nullptr)
 	{
 		mGCHandle = mono_gchandle_new(mManagedInstance, false);
 

+ 2 - 2
Source/SBansheeEditor/Source/BsScriptOSDropTarget.cpp

@@ -25,7 +25,7 @@ namespace BansheeEngine
 	ScriptOSDropTarget::OnDropThunkDef ScriptOSDropTarget::onDropThunk;
 
 	ScriptOSDropTarget::ScriptOSDropTarget(MonoObject* instance, ScriptEditorWindow* parent)
-		:ScriptObject(instance), mDropTarget(nullptr), mIsDestroyed(false), mParent(parent)
+		:ScriptObject(instance), mParent(parent), mDropTarget(nullptr), mIsDestroyed(false)
 	{
 		EditorWidgetBase* parentWidget = getParentWidget();
 
@@ -65,7 +65,7 @@ namespace BansheeEngine
 
 	void ScriptOSDropTarget::internal_CreateInstance(MonoObject* instance, ScriptEditorWindow* editorWindow)
 	{
-		ScriptOSDropTarget* nativeInstance = new (bs_alloc<ScriptOSDropTarget>()) ScriptOSDropTarget(instance, editorWindow);
+		new (bs_alloc<ScriptOSDropTarget>()) ScriptOSDropTarget(instance, editorWindow);
 	}
 
 	void ScriptOSDropTarget::internal_Destroy(ScriptOSDropTarget* nativeInstance)

+ 1 - 0
Source/SBansheeEditor/Source/BsScriptPlatformInfo.cpp

@@ -45,6 +45,7 @@ namespace BansheeEngine
 		{
 		case PlatformType::Windows:
 			return ScriptWinPlatformInfo::create(std::static_pointer_cast<WinPlatformInfo>(platformInfo));
+		default:
 			break;
 		}
 

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptSceneHandles.cpp

@@ -13,7 +13,7 @@
 namespace BansheeEngine
 {
 	ScriptSceneHandles::ScriptSceneHandles(MonoObject* object, EditorWidgetBase* parentWidget, const SPtr<Camera>& camera)
-		:ScriptObject(object), mCamera(camera), mParentWidget(parentWidget)
+		:ScriptObject(object), mParentWidget(parentWidget), mCamera(camera)
 	{
 		HandleManager::instance().setSettings(gEditorApplication().getEditorSettings());
 	}

+ 1 - 1
Source/SBansheeEditor/Source/BsScriptSceneSelection.cpp

@@ -9,7 +9,7 @@
 namespace BansheeEngine
 {
 	ScriptSceneSelection::ScriptSceneSelection(MonoObject* object, const SPtr<Camera>& camera)
-		:ScriptObject(object), mSelectionRenderer(nullptr), mCamera(camera)
+		:ScriptObject(object), mCamera(camera), mSelectionRenderer(nullptr)
 	{
 		mSelectionRenderer = bs_new<SelectionRenderer>();
 	}

+ 4 - 3
Source/SBansheeEditor/Source/BsToolbarItemManager.cpp

@@ -21,9 +21,10 @@ using namespace std::placeholders;
 namespace BansheeEngine
 {
 	ToolbarItemManager::ToolbarItemManager(ScriptAssemblyManager& scriptObjectManager)
-		:mScriptObjectManager(scriptObjectManager), mToolbarItemAttribute(nullptr), mNameField(nullptr),
-		mIconField(nullptr), mPriorityField(nullptr), mTooltipField(nullptr), mSeparatorField(nullptr),
-		mBuiltinIconField(nullptr)
+		:mScriptObjectManager(scriptObjectManager), mToolbarItemAttribute(nullptr), mNameField(nullptr)
+		, mIconField(nullptr), mBuiltinIconField(nullptr), mTooltipField(nullptr), mPriorityField(nullptr)
+		, mSeparatorField(nullptr)
+		
 	{
 		mDomainLoadedConn = ScriptObjectManager::instance().onRefreshDomainLoaded.connect(std::bind(&ToolbarItemManager::reloadAssemblyData, this));
 		reloadAssemblyData();

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません