Forráskód Böngészése

Remove mention of AngelScript not being supported on Emscripten. Leave the generic call convention autohandle fix on at all times, since it doesn't hurt. Clarify CommandLine.txt not being able to be read on Emscripten.

Lasse Öörni 9 éve
szülő
commit
0803320a9a

+ 0 - 1
Docs/GettingStarted.dox

@@ -258,7 +258,6 @@ Execute cmake_mingw.sh then go to the build tree to execute make command. After
 
 > WHAT DOESN'T WORK:
 >    - Networking. Javascript can only use http and websockets protocols so it's not likely that kNet will ever function.
->    - AngelScript scripting support.
 
 This section assumes you have already updated, installed, and activated the latest Emscripten cross-compiler toolchain on your host system as per described in http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html.
 

+ 8 - 10
Source/ThirdParty/AngelScript/source/as_context.cpp

@@ -5130,16 +5130,14 @@ int asCContext::CallGeneric(asCScriptFunction *descr)
 	m_regs.objectRegister = gen.objectRegister;
 	m_regs.objectType = descr->returnType.GetObjectType();
 
-// Urho3D: add autohandle support for the AS_MAX_PORTABILITY builds
-#if defined(EMSCRIPTEN) || defined(FORCE_AS_PORTABLE)
-//based on http://www.gamedev.net/topic/630414-autohandles-with-generic-callconv/
-if ( descr->returnType.IsObject()
-		&& !descr->returnType.IsReference()
-		&& descr->returnType.IsObjectHandle()
-		&& sysFunc->returnAutoHandle
-		&& m_regs.objectRegister )
-	m_engine->CallObjectMethod( m_regs.objectRegister, descr->returnType.GetObjectType()->beh.addref );
-#endif
+	// Urho3D: add autohandle support
+	// based on http://www.gamedev.net/topic/630414-autohandles-with-generic-callconv/
+	if ( descr->returnType.IsObject()
+			&& !descr->returnType.IsReference()
+			&& descr->returnType.IsObjectHandle()
+			&& sysFunc->returnAutoHandle
+			&& m_regs.objectRegister )
+		m_engine->CallObjectMethod( m_regs.objectRegister, descr->returnType.GetObjectType()->beh.addref );
 
 	// Clean up arguments
 	const asUINT cleanCount = sysFunc->cleanArgs.GetLength();

+ 2 - 1
Source/Tools/Urho3DPlayer/Urho3DPlayer.cpp

@@ -69,7 +69,8 @@ void Urho3DPlayer::Setup()
     if (arguments.Size() && arguments[0][0] != '-')
         scriptFileName_ = GetInternalPath(arguments[0]);
 
-//hardcoded emscripten build script file, as it did not seem to work in the commandline.txt manner
+    // On Emscripten CommandLine.txt can only be read through the resource system, but it is not yet possible,
+    // so hardcode the script name for now
 #ifdef EMSCRIPTEN
     scriptFileName_ = "Scripts/NinjaSnowWar.as";
 #endif