Browse Source

AS bindings: Move wrapper addon to engine; fix unclosed multiline comment

1vanK 4 years ago
parent
commit
08063ca915

+ 0 - 2
Source/ThirdParty/AngelScript/CMakeLists.txt

@@ -30,8 +30,6 @@ endif ()
 if (NOT EXCEPTIONS)
 if (NOT EXCEPTIONS)
     add_definitions (-DAS_NO_EXCEPTIONS)
     add_definitions (-DAS_NO_EXCEPTIONS)
 endif ()
 endif ()
-# Add compiler define to build the library with the normal function/method macros
-add_definitions (-DAS_IS_BUILDING)
 
 
 # Define source files
 # Define source files
 define_source_files (GLOB_CPP_PATTERNS source/*.cpp GLOB_H_PATTERNS include/*.h source/*.h)
 define_source_files (GLOB_CPP_PATTERNS source/*.cpp GLOB_H_PATTERNS include/*.h source/*.h)

+ 0 - 9
Source/ThirdParty/AngelScript/include/angelscript.h

@@ -1969,15 +1969,6 @@ const asSBCInfo asBCInfo[256] =
 #define asBC_SWORDARG1(x) (*(((short*)x)+2))
 #define asBC_SWORDARG1(x) (*(((short*)x)+2))
 #define asBC_SWORDARG2(x) (*(((short*)x)+3))
 #define asBC_SWORDARG2(x) (*(((short*)x)+3))
 
 
-// Urho3D: Include the wrapper macros file but only after they have been defined above
-// This causes a large number of warnings, which could possibly be prevented with further
-// changes to the library or the Urho Angelscript code
-// Only include this file if we are NOT building the angelscript library itself,
-// as Angelscript already provides generic wrappers for their classes
-// (AS_IS_BUILDING is defined in the CMakeLists.txt file for the AngelScript (sub)library)
-#ifndef AS_IS_BUILDING
-#include "wrapmacros.h"
-#endif
 
 
 END_AS_NAMESPACE
 END_AS_NAMESPACE
 
 

+ 1 - 0
Source/Urho3D/AngelScript/APITemplates.h

@@ -45,6 +45,7 @@
 #endif
 #endif
 
 
 #include <AngelScript/angelscript.h>
 #include <AngelScript/angelscript.h>
+#include "../AngelScript/wrapmacros.h"
 #include <cstring>
 #include <cstring>
 
 
 #ifdef _MSC_VER
 #ifdef _MSC_VER

+ 1 - 0
Source/Urho3D/AngelScript/Addons.h

@@ -33,6 +33,7 @@
 #include "../Math/StringHash.h"
 #include "../Math/StringHash.h"
 
 
 #include <AngelScript/angelscript.h>
 #include <AngelScript/angelscript.h>
+#include "../AngelScript/wrapmacros.h"
 
 
 // Adapted from Angelscript's scriptarray, scriptdictionary & scriptstdstring add-ons, but with garbage collection disabled
 // Adapted from Angelscript's scriptarray, scriptdictionary & scriptstdstring add-ons, but with garbage collection disabled
 
 

+ 1 - 1
Source/Urho3D/AngelScript/Manual_Scene.h

@@ -109,7 +109,7 @@ Component* NodeGetComponent(unsigned index, Node* ptr);
         /* void Node::SetOwner(Connection* owner) | File: ../Scene/Node.h */ \
         /* void Node::SetOwner(Connection* owner) | File: ../Scene/Node.h */ \
         engine->RegisterObjectMethod(className, "void SetOwner(Connection@+)", asMETHODPR(T, SetOwner, (Connection*), void), asCALL_THISCALL); \
         engine->RegisterObjectMethod(className, "void SetOwner(Connection@+)", asMETHODPR(T, SetOwner, (Connection*), void), asCALL_THISCALL); \
         engine->RegisterObjectMethod(className, "void set_owner(Connection@+)", asMETHODPR(T, SetOwner, (Connection*), void), asCALL_THISCALL); \
         engine->RegisterObjectMethod(className, "void set_owner(Connection@+)", asMETHODPR(T, SetOwner, (Connection*), void), asCALL_THISCALL); \
-        /* Connection* Node::GetOwner() const | File: ../Scene/Node.h * \
+        /* Connection* Node::GetOwner() const | File: ../Scene/Node.h */ \
         engine->RegisterObjectMethod(className, "Connection@+ GetOwner() const", asMETHODPR(T, GetOwner, () const, Connection*), asCALL_THISCALL); \
         engine->RegisterObjectMethod(className, "Connection@+ GetOwner() const", asMETHODPR(T, GetOwner, () const, Connection*), asCALL_THISCALL); \
         engine->RegisterObjectMethod(className, "Connection@+ get_owner() const", asMETHODPR(T, GetOwner, () const, Connection*), asCALL_THISCALL); \
         engine->RegisterObjectMethod(className, "Connection@+ get_owner() const", asMETHODPR(T, GetOwner, () const, Connection*), asCALL_THISCALL); \
         /* void Node::CleanupConnection(Connection* connection) | File: ../Scene/Node.h */ \
         /* void Node::CleanupConnection(Connection* connection) | File: ../Scene/Node.h */ \

+ 1 - 0
Source/Urho3D/AngelScript/ScriptAPIDump.cpp

@@ -29,6 +29,7 @@
 #include "../IO/Log.h"
 #include "../IO/Log.h"
 
 
 #include <AngelScript/angelscript.h>
 #include <AngelScript/angelscript.h>
+#include "../AngelScript/wrapmacros.h"
 
 
 #include "../DebugNew.h"
 #include "../DebugNew.h"
 
 

+ 1 - 0
Source/Urho3D/AngelScript/ScriptFile.cpp

@@ -34,6 +34,7 @@
 #include "../Resource/ResourceCache.h"
 #include "../Resource/ResourceCache.h"
 
 
 #include <AngelScript/angelscript.h>
 #include <AngelScript/angelscript.h>
+#include "../AngelScript/wrapmacros.h"
 
 
 #include "../DebugNew.h"
 #include "../DebugNew.h"
 
 

+ 1 - 0
Source/Urho3D/AngelScript/ScriptInstance.cpp

@@ -40,6 +40,7 @@
 #include "../Scene/SceneEvents.h"
 #include "../Scene/SceneEvents.h"
 
 
 #include <AngelScript/angelscript.h>
 #include <AngelScript/angelscript.h>
+#include "../AngelScript/wrapmacros.h"
 
 
 #include "../DebugNew.h"
 #include "../DebugNew.h"
 
 

+ 1 - 1
Source/ThirdParty/AngelScript/include/wrap.h → Source/Urho3D/AngelScript/wrap.h

@@ -24,7 +24,7 @@
 
 
 #include <type_traits>
 #include <type_traits>
 
 
-#include "angelscript.h"
+#include <AngelScript/angelscript.h>
 
 
 //only Boost.Preprocessor is needed, so it may be reasonable to include it in the Urho repository directly
 //only Boost.Preprocessor is needed, so it may be reasonable to include it in the Urho repository directly
 #include <boost/preprocessor.hpp>
 #include <boost/preprocessor.hpp>

+ 7 - 1
Source/ThirdParty/AngelScript/include/wrap16.h → Source/Urho3D/AngelScript/wrap16.h

@@ -6,7 +6,13 @@
 
 
 #ifndef ANGELSCRIPT_H
 #ifndef ANGELSCRIPT_H
 // Avoid having to inform include path if header is already include before
 // Avoid having to inform include path if header is already include before
-#include <angelscript.h>
+
+// Urho3D: Commented out original
+//#include <angelscript.h>
+
+// Urho3D
+#include <AngelScript/angelscript.h>
+
 #endif
 #endif
 #include <new>
 #include <new>
 
 

+ 0 - 0
Source/ThirdParty/AngelScript/include/wrapmacros.h → Source/Urho3D/AngelScript/wrapmacros.h