mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
More fixes for the emscripten port.
This commit is contained in:
@@ -328,7 +328,7 @@ function build_link_configuration( package_name, use_ee_icon )
|
||||
package_name ~= "eepp-physics" and
|
||||
package_name ~= "eepp-vbo-fbo-batch"
|
||||
) then
|
||||
linkoptions { "--preload-file ../../assets@/" }
|
||||
linkoptions { "--preload-file assets/" }
|
||||
end
|
||||
|
||||
set_ios_config()
|
||||
@@ -353,6 +353,8 @@ function generate_os_links()
|
||||
multiple_insert( os_links, { "openal", "GL" } )
|
||||
elseif os.is_real("ios") then
|
||||
multiple_insert( os_links, { "OpenGLES.framework", "OpenAL.framework", "AudioToolbox.framework", "CoreAudio.framework", "Foundation.framework", "CoreFoundation.framework", "UIKit.framework", "QuartzCore.framework", "CoreGraphics.framework" } )
|
||||
elseif os.is_real("emscripten") then
|
||||
multiple_insert( os_links, { "openal" } )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -2,5 +2,7 @@
|
||||
cd $(dirname "$0")
|
||||
premake4 --file=../../premake4.lua --with-gles1 --with-gles2 --with-static-eepp --with-static-freetype --platform=emscripten --with-backend=SDL gmake
|
||||
cd ../../make/emscripten/
|
||||
#mkdir -p data
|
||||
ln -sf ../../assets/ ./
|
||||
sed -i 's/-rcs/rcs/g' *.make
|
||||
emmake make $@
|
||||
|
||||
@@ -23,10 +23,11 @@ cAudioDevice::cAudioDevice() {
|
||||
// Initialize the listener, located at the origin and looking along the Z axis
|
||||
#if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN
|
||||
ALCheck( alListenerf( AL_GAIN, 1.f ) );
|
||||
|
||||
ALCheck( alListener3f( AL_POSITION, 0.f, 0.f, 0.f ) );
|
||||
#endif
|
||||
|
||||
float Position[] = {0.f, 0.f, 0.f};
|
||||
ALCheck( alListenerfv( AL_POSITION, Position ) );
|
||||
|
||||
float Orientation[] = {0.f, 0.f, -1.f, 0.f, 1.f, 0.f};
|
||||
ALCheck( alListenerfv( AL_ORIENTATION, Orientation ) );
|
||||
|
||||
|
||||
@@ -131,7 +131,10 @@ float cSound::Volume() const {
|
||||
|
||||
eeVector3ff cSound::Position() const {
|
||||
eeVector3ff Position;
|
||||
|
||||
#if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN
|
||||
ALCheck( alGetSource3f( mSource, AL_POSITION, &Position.x, &Position.y, &Position.z ) );
|
||||
#endif
|
||||
|
||||
return Position;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user