Emscripten fixes

This commit is contained in:
Joshua Granick
2017-06-23 15:22:40 -07:00
parent 0842c591c0
commit 44020adfc3
4 changed files with 38 additions and 19 deletions

View File

@@ -5,18 +5,15 @@
<set name="lime" />
<haxedef name="native" if="cpp || neko || nodejs || cs" />
<set name="native" if="cpp || neko || nodejs || cs" />
<define name="native" if="cpp || neko || nodejs || cs" />
<define name="howlerjs" if="html5" />
<haxedef name="howlerjs" if="html5" />
<set name="howlerjs" if="html5" />
<define name="lime-html5" if="html5" />
<define name="lime-native" if="native" />
<define name="lime-cffi" if="native" />
<define name="lime-vorbis" if="native" />
<haxedef name="lime-html5" if="html5" />
<haxedef name="lime-native" if="native" />
<haxedef name="lime-cffi" if="native" />
<haxedef name="lime-vorbis" if="native" />
<haxedef name="no-typedarray-inline" if="cs" />
<define name="no-typedarray-inline" if="cs" />
<haxedef name="no-compilation" />
<templatePath name="templates" />
@@ -64,16 +61,23 @@
<dependency path="dependencies/angle/libegl.dll" if="windows angle" unless="static_link" />
<dependency path="dependencies/angle/libglesv2.dll" if="windows angle" unless="static_link" />
<haxedef name="native-trace" if="flash" unless="haxe-trace || haxetrace" />
<haxedef name="MACOSX_DEPLOYMENT_TARGET" value="10.6" if="mac" unless="MACOSX_DEPLOYMENT_TARGET" />
<define name="native-trace" if="flash" unless="haxe-trace || haxetrace" />
<define name="MACOSX_DEPLOYMENT_TARGET" value="10.6" if="mac" unless="MACOSX_DEPLOYMENT_TARGET" />
<architecture name="armv7" if="android" />
<haxedef name="lime-cairo" unless="flash || html5" />
<haxedef name="lime-curl" unless="lime-console || emscripten || flash || html5" />
<haxedef name="lime-opengl" unless="lime-console || flash" />
<haxedef name="lime-openal" unless="lime-console || static_link || flash || html5" />
<haxedef name="lime-openal" if="emscripten" />
<define name="lime-cairo" unless="flash || html5" />
<define name="lime-curl" unless="lime-console || emscripten || flash || html5" />
<define name="lime-opengl" unless="lime-console || flash" />
<define name="lime-openal" unless="lime-console || static_link || flash || html5" />
<define name="lime-openal" if="emscripten" />
<section if="emscripten">
<dependency name="pthread" />
<dependency name="openal" if="lime-openal" />
</section>
<!-- TODO: Fix inheritance with separate modules -->

View File

@@ -508,10 +508,13 @@ class NativeAudioSource {
public function getPosition ():Vector4 {
#if !emscripten
var value = AL.getSource3f (handle, AL.POSITION);
position.x = value[0];
position.y = value[1];
position.z = value[2];
#end
return position;
}

View File

@@ -90,9 +90,20 @@ class EmscriptenPlatform extends PlatformTarget {
args.push ("-s");
args.push ("NO_EXIT_RUNTIME=1");
args.push ("-s");
args.push ("USE_SDL=2");
for (dependency in project.dependencies) {
if (dependency.name != "") {
args.push ("-l" + dependency.name);
}
}
if (project.targetFlags.exists ("final")) {
args.push ("-s");

View File

@@ -138,8 +138,8 @@
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/openal/include/" unless="emscripten" />
<compilerflag value="-DLIME_OPENAL" />
<compilerflag value="-DLIME_OPENALSOFT" if="LIME_OPENALSOFT" />
<compilerflag value="-DAL_LIBTYPE_STATIC=1" />
<compilerflag value="-DAL_ALEXT_PROTOTYPES" />
<compilerflag value="-DAL_LIBTYPE_STATIC=1" if="LIME_OPENALSOFT" />
<compilerflag value="-DAL_ALEXT_PROTOTYPES" if="LIME_OPENALSOFT" />
<file name="src/media/openal/OpenALBindings.cpp" />
@@ -437,6 +437,7 @@
<lib name="-lGLESv2" />
</section>
</section>
</target>