Browse Source

Drag and drop into empty hierarchy now works
Fixed a crash due to affine matrices not being recognized correctly
Fixed crash due to an unloaded GUI sprite texture
Renderable now properly has 1 material by default

BearishSun 10 years ago
parent
commit
68bf4f12b4

+ 0 - 24
BansheeCore/Include/BsCorePrerequisites.h

@@ -98,13 +98,6 @@
 #           endif
 #           endif
 #   	endif
 #   	endif
 #	endif
 #	endif
-// Win32 compilers use _DEBUG for specifying debug builds.
-// for MinGW, we set DEBUG
-#   if defined(_DEBUG) || defined(DEBUG)
-#       define BS_DEBUG_MODE 1
-#   else
-#       define BS_DEBUG_MODE 0
-#   endif
 
 
 #endif
 #endif
 
 
@@ -120,23 +113,6 @@
 #       define BS_HIDDEN
 #       define BS_HIDDEN
 #   endif
 #   endif
 
 
-// A quick define to overcome different names for the same function
-#   define stricmp strcasecmp
-
-#   ifdef DEBUG
-#       define BS_DEBUG_MODE 1
-#   else
-#       define BS_DEBUG_MODE 0
-#   endif
-
-#endif
-
-#if BS_DEBUG_MODE
-#define BS_DEBUG_ONLY(x) x
-#define BS_ASSERT(x) assert(x)
-#else
-#define BS_DEBUG_ONLY(x)
-#define BS_ASSERT(x)
 #endif
 #endif
 
 
 #include "BsHString.h"
 #include "BsHString.h"

+ 1 - 1
BansheeEngine/Source/BsCamera.cpp

@@ -418,7 +418,7 @@ namespace BansheeEngine
 		mCustomViewMatrix = enable;
 		mCustomViewMatrix = enable;
 		if (enable)
 		if (enable)
 		{
 		{
-			assert(viewMatrix.isAffine());
+			BS_ASSERT(viewMatrix.isAffine());
 			mViewMatrix = viewMatrix;
 			mViewMatrix = viewMatrix;
 			mViewMatrixInv = mViewMatrix.inverseAffine();
 			mViewMatrixInv = mViewMatrix.inverseAffine();
 		}
 		}

+ 1 - 1
BansheeEngine/Source/BsGUIHelper.cpp

@@ -23,7 +23,7 @@ namespace BansheeEngine
 		Vector2I contentBounds = calcOptimalContentsSize((const WString&)content.getText(), style, dimensions);
 		Vector2I contentBounds = calcOptimalContentsSize((const WString&)content.getText(), style, dimensions);
 
 
 		HSpriteTexture image = content.getImage(state);
 		HSpriteTexture image = content.getImage(state);
-		if (image != nullptr)
+		if (image.isLoaded())
 		{
 		{
 			contentBounds.x += image->getWidth() + GUIContent::IMAGE_TEXT_SPACING;
 			contentBounds.x += image->getWidth() + GUIContent::IMAGE_TEXT_SPACING;
 			contentBounds.y = std::max(image->getHeight(), (UINT32)contentBounds.y);
 			contentBounds.y = std::max(image->getHeight(), (UINT32)contentBounds.y);

+ 1 - 1
BansheeUtility/Include/BsMatrix4.h

@@ -313,7 +313,7 @@ namespace BansheeEngine
          */
          */
         Matrix4 concatenateAffine(const Matrix4 &other) const
         Matrix4 concatenateAffine(const Matrix4 &other) const
         {
         {
-            assert(isAffine() && other.isAffine());
+            BS_ASSERT(isAffine() && other.isAffine());
 
 
             return Matrix4(
             return Matrix4(
                 m[0][0] * other.m[0][0] + m[0][1] * other.m[1][0] + m[0][2] * other.m[2][0],
                 m[0][0] * other.m[0][0] + m[0][1] * other.m[1][0] + m[0][2] * other.m[2][0],

+ 33 - 0
BansheeUtility/Include/BsPrerequisitesUtil.h

@@ -120,6 +120,39 @@
 
 
 #endif
 #endif
 
 
+// Windows Settings
+#if BS_PLATFORM == BS_PLATFORM_WIN32
+// Win32 compilers use _DEBUG for specifying debug builds.
+// for MinGW, we set DEBUG
+#   if defined(_DEBUG) || defined(DEBUG)
+#       define BS_DEBUG_MODE 1
+#   else
+#       define BS_DEBUG_MODE 0
+#   endif
+
+#endif
+
+// Linux/Apple Settings
+#if BS_PLATFORM == BS_PLATFORM_LINUX || BS_PLATFORM == BS_PLATFORM_APPLE
+// A quick define to overcome different names for the same function
+#   define stricmp strcasecmp
+
+#   ifdef DEBUG
+#       define BS_DEBUG_MODE 1
+#   else
+#       define BS_DEBUG_MODE 0
+#   endif
+
+#endif
+
+#if BS_DEBUG_MODE
+#define BS_DEBUG_ONLY(x) x
+#define BS_ASSERT(x) assert(x)
+#else
+#define BS_DEBUG_ONLY(x)
+#define BS_ASSERT(x)
+#endif
+
 // Short-hand names for various built-in types
 // Short-hand names for various built-in types
 #include "BsTypes.h"
 #include "BsTypes.h"
 
 

+ 1 - 1
BansheeUtility/Source/BsAABox.cpp

@@ -143,7 +143,7 @@ namespace BansheeEngine
 
 
 	void AABox::transformAffine(const Matrix4& m)
 	void AABox::transformAffine(const Matrix4& m)
 	{
 	{
-		assert(m.isAffine());
+		BS_ASSERT(m.isAffine());
 
 
 		Vector3 centre = getCenter();
 		Vector3 centre = getCenter();
 		Vector3 halfSize = getHalfSize();
 		Vector3 halfSize = getHalfSize();

+ 1 - 1
BansheeUtility/Source/BsMatrix4.cpp

@@ -134,7 +134,7 @@ namespace BansheeEngine
 
 
     Matrix4 Matrix4::inverseAffine() const
     Matrix4 Matrix4::inverseAffine() const
     {
     {
-        assert(isAffine());
+        BS_ASSERT(isAffine());
 
 
         float m10 = m[1][0], m11 = m[1][1], m12 = m[1][2];
         float m10 = m[1][0], m11 = m[1][1], m12 = m[1][2];
         float m20 = m[2][0], m21 = m[2][1], m22 = m[2][2];
         float m20 = m[2][0], m21 = m[2][1], m22 = m[2][2];

+ 1 - 1
MBansheeEditor/HierarchyWindow.cs

@@ -71,7 +71,7 @@ namespace BansheeEditor
             GUIScrollArea scrollArea = new GUIScrollArea();
             GUIScrollArea scrollArea = new GUIScrollArea();
             GUI.AddElement(scrollArea);
             GUI.AddElement(scrollArea);
 
 
-            treeView = new GUISceneTreeView();
+            treeView = new GUISceneTreeView(GUIOption.FlexibleHeight(20), GUIOption.FlexibleWidth(20));
             scrollArea.Layout.AddElement(treeView);
             scrollArea.Layout.AddElement(treeView);
         }
         }
 
 

+ 1 - 1
MBansheeEngine/Renderable.cs

@@ -155,7 +155,7 @@ namespace BansheeEngine
         private class SerializableData
         private class SerializableData
         {
         {
             public Mesh mesh;
             public Mesh mesh;
-            public Material[] materials = new Material[0];
+            public Material[] materials = new Material[1];
             public UInt64 layers = 1;
             public UInt64 layers = 1;
         }
         }
     }
     }

+ 2 - 2
README.md

@@ -16,7 +16,7 @@ Project is currently in active development. Current version is considered a prev
 
 
 Downloading pre-compiled binaries is the easiest way to check out Banshee if you don't want to go through the hassle of compiling it yourself. 
 Downloading pre-compiled binaries is the easiest way to check out Banshee if you don't want to go through the hassle of compiling it yourself. 
 
 
-[Download binaries (Windows x64)] (http://bearishsun.thalassa.feralhosting.com/Banshee_Win_x64_v0.2.rar)
+[Download binaries (Windows x64)] (http://bearishsun.thalassa.feralhosting.com/Banshee_Win_x64_v0.2.0.zip)
 
 
 ## Compiling from source
 ## Compiling from source
 
 
@@ -24,7 +24,7 @@ Banshee compiles on VS2013 and VS2015. Other Windows compilers might work but ha
 
 
 Aside from Banshee source code you will also need various third party dependencies. You may retrieve/compile those dependencies yourself by following a guide in "CompilingDependenciesManually.txt". If you are using VS2015 you can avoid compiling dependencies by downloading a set of pre-compiled dependencies below. These should be extracted in the root of the directory containing Banshee source code.
 Aside from Banshee source code you will also need various third party dependencies. You may retrieve/compile those dependencies yourself by following a guide in "CompilingDependenciesManually.txt". If you are using VS2015 you can avoid compiling dependencies by downloading a set of pre-compiled dependencies below. These should be extracted in the root of the directory containing Banshee source code.
 
 
-[Download precompiled dependencies (VS2015)] (http://bearishsun.thalassa.feralhosting.com/BansheeDependencies.rar)
+[Download precompiled dependencies (VS2015)] (http://bearishsun.thalassa.feralhosting.com/BansheeDependencies_VS2015_v0.2.0.zip)
 
 
 ## Features (currently available)
 ## Features (currently available)
 
 

+ 2 - 0
Scripts/package_editor.py

@@ -7,6 +7,8 @@
 # Usage: "package_editor $Configuration"
 # Usage: "package_editor $Configuration"
 # Where: $Configuration - e.g. Debug, DebugRelease
 # Where: $Configuration - e.g. Debug, DebugRelease
 
 
+# TODO: Don't package Settings.asset, Game binaries, Example binaries
+
 import os
 import os
 import sys
 import sys
 import shutil
 import shutil