mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 06:41:41 +00:00
Merge remote-tracking branch 'remotes/origin/master' into new_level_refactor
# Conflicts: # src/g_level.cpp # src/p_user.cpp
This commit is contained in:
commit
979f1df281
10 changed files with 89 additions and 51 deletions
21
.travis.yml
21
.travis.yml
|
@ -1,5 +1,5 @@
|
||||||
language: c++
|
language: cpp
|
||||||
dist: trusty
|
dist: xenial
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
|
@ -27,8 +27,6 @@ matrix:
|
||||||
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-maybe-uninitialized"
|
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-maybe-uninitialized"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
packages:
|
||||||
- g++-4.9
|
- g++-4.9
|
||||||
- libsdl2-dev
|
- libsdl2-dev
|
||||||
|
@ -41,8 +39,6 @@ matrix:
|
||||||
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-maybe-uninitialized"
|
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-maybe-uninitialized"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
packages:
|
||||||
- g++-5
|
- g++-5
|
||||||
- libsdl2-dev
|
- libsdl2-dev
|
||||||
|
@ -99,7 +95,7 @@ matrix:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-trusty-7
|
- llvm-toolchain-xenial-7
|
||||||
packages:
|
packages:
|
||||||
- clang-7
|
- clang-7
|
||||||
- libsdl2-dev
|
- libsdl2-dev
|
||||||
|
@ -110,6 +106,14 @@ matrix:
|
||||||
- libfluidsynth-dev
|
- libfluidsynth-dev
|
||||||
- libgtk-3-dev
|
- libgtk-3-dev
|
||||||
|
|
||||||
|
- os: windows
|
||||||
|
env:
|
||||||
|
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -A Win32"
|
||||||
|
|
||||||
|
- os: windows
|
||||||
|
env:
|
||||||
|
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -A x64"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [ -n "$GCC_VERSION" ]; then export CC="gcc-${GCC_VERSION}" CXX="g++-${GCC_VERSION}"; fi
|
- if [ -n "$GCC_VERSION" ]; then export CC="gcc-${GCC_VERSION}" CXX="g++-${GCC_VERSION}"; fi
|
||||||
- if [ -n "$CLANG_VERSION" ]; then export CC="clang-${CLANG_VERSION}" CXX="clang++-${CLANG_VERSION}"; fi
|
- if [ -n "$CLANG_VERSION" ]; then export CC="clang-${CLANG_VERSION}" CXX="clang++-${CLANG_VERSION}"; fi
|
||||||
|
@ -128,7 +132,8 @@ script:
|
||||||
-DFORCE_INTERNAL_GME=YES \
|
-DFORCE_INTERNAL_GME=YES \
|
||||||
-DPK3_QUIET_ZIPDIR=YES \
|
-DPK3_QUIET_ZIPDIR=YES \
|
||||||
..
|
..
|
||||||
- make -j2 -k
|
- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then cmake --build . -- -m; fi
|
||||||
|
- if [[ $TRAVIS_OS_NAME != 'windows' ]]; then cmake --build . -- -j2; fi
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
@ -163,10 +163,22 @@ option( NO_OPENAL "Disable OpenAL sound support" OFF )
|
||||||
find_package( BZip2 )
|
find_package( BZip2 )
|
||||||
find_package( JPEG )
|
find_package( JPEG )
|
||||||
find_package( ZLIB )
|
find_package( ZLIB )
|
||||||
# find_package( asmjit )
|
|
||||||
|
include( TargetArch )
|
||||||
|
|
||||||
|
target_architecture(ZDOOM_TARGET_ARCH)
|
||||||
|
|
||||||
|
if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" )
|
||||||
|
set( HAVE_VM_JIT ON )
|
||||||
|
endif()
|
||||||
|
|
||||||
# no, we're not using external asmjit for now, we made too many modifications to our's.
|
# no, we're not using external asmjit for now, we made too many modifications to our's.
|
||||||
# if the asmjit author uses our changes then we'll update this.
|
# if the asmjit author uses our changes then we'll update this.
|
||||||
|
|
||||||
|
#if( ${HAVE_VM_JIT} )
|
||||||
|
# find_package( asmjit )
|
||||||
|
#endif()
|
||||||
|
|
||||||
# GME
|
# GME
|
||||||
#find_path( GME_INCLUDE_DIR gme/gme.h )
|
#find_path( GME_INCLUDE_DIR gme/gme.h )
|
||||||
#find_library( GME_LIBRARIES gme )
|
#find_library( GME_LIBRARIES gme )
|
||||||
|
@ -299,6 +311,7 @@ else()
|
||||||
set( ZLIB_LIBRARY z )
|
set( ZLIB_LIBRARY z )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( ${HAVE_VM_JIT} )
|
||||||
if( ASMJIT_FOUND AND NOT FORCE_INTERNAL_ASMJIT )
|
if( ASMJIT_FOUND AND NOT FORCE_INTERNAL_ASMJIT )
|
||||||
message( STATUS "Using system asmjit, includes found at ${ASMJIT_INCLUDE_DIR}" )
|
message( STATUS "Using system asmjit, includes found at ${ASMJIT_INCLUDE_DIR}" )
|
||||||
else()
|
else()
|
||||||
|
@ -309,6 +322,7 @@ else()
|
||||||
set( ASMJIT_LIBRARIES asmjit )
|
set( ASMJIT_LIBRARIES asmjit )
|
||||||
set( ASMJIT_LIBRARY asmjit )
|
set( ASMJIT_LIBRARY asmjit )
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if( JPEG_FOUND AND NOT FORCE_INTERNAL_JPEG )
|
if( JPEG_FOUND AND NOT FORCE_INTERNAL_JPEG )
|
||||||
message( STATUS "Using system jpeg library, includes found at ${JPEG_INCLUDE_DIR}" )
|
message( STATUS "Using system jpeg library, includes found at ${JPEG_INCLUDE_DIR}" )
|
||||||
|
|
|
@ -13,7 +13,6 @@ include( CheckIncludeFile )
|
||||||
include( CheckIncludeFiles )
|
include( CheckIncludeFiles )
|
||||||
include( CheckLibraryExists )
|
include( CheckLibraryExists )
|
||||||
include( FindPkgConfig )
|
include( FindPkgConfig )
|
||||||
include( TargetArch )
|
|
||||||
|
|
||||||
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||||
option( NO_STRIP "Do not strip Release or MinSizeRel builds" )
|
option( NO_STRIP "Do not strip Release or MinSizeRel builds" )
|
||||||
|
@ -33,12 +32,13 @@ if( APPLE )
|
||||||
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
|
option( OSX_COCOA_BACKEND "Use native Cocoa backend instead of SDL" ON )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_architecture(ZDOOM_TARGET_ARCH)
|
|
||||||
|
|
||||||
if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" )
|
if( ${ZDOOM_TARGET_ARCH} MATCHES "x86_64" )
|
||||||
set( X64 64 )
|
set( X64 64 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( X64 OR ${ZDOOM_TARGET_ARCH} MATCHES "i386" )
|
||||||
|
add_definitions( -DARCH_IA32 )
|
||||||
|
endif()
|
||||||
|
|
||||||
if( NOT ZDOOM_LIBS )
|
if( NOT ZDOOM_LIBS )
|
||||||
set( ZDOOM_LIBS "" )
|
set( ZDOOM_LIBS "" )
|
||||||
|
@ -460,8 +460,14 @@ add_custom_target( revision_check ALL
|
||||||
# Libraries ZDoom needs
|
# Libraries ZDoom needs
|
||||||
|
|
||||||
message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" )
|
message( STATUS "Fluid synth libs: ${FLUIDSYNTH_LIBRARIES}" )
|
||||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${GME_LIBRARIES}" "${ASMJIT_LIBRARIES}" "${CMAKE_DL_LIBS}" )
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${GME_LIBRARIES}" "${CMAKE_DL_LIBS}" )
|
||||||
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" "${ASMJIT_INCLUDE_DIR}" )
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${JPEG_INCLUDE_DIR}" "${GME_INCLUDE_DIR}" )
|
||||||
|
|
||||||
|
if( ${HAVE_VM_JIT} )
|
||||||
|
add_definitions( -DHAVE_VM_JIT )
|
||||||
|
include_directories( "${ASMJIT_INCLUDE_DIR}" )
|
||||||
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ASMJIT_LIBRARIES}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if( SNDFILE_FOUND )
|
if( SNDFILE_FOUND )
|
||||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${SNDFILE_LIBRARIES}" )
|
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${SNDFILE_LIBRARIES}" )
|
||||||
|
@ -802,6 +808,17 @@ set( NOT_COMPILED_SOURCE_FILES
|
||||||
zcc-parse.h
|
zcc-parse.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set( VM_JIT_SOURCES
|
||||||
|
scripting/vm/jit.cpp
|
||||||
|
scripting/vm/jit_runtime.cpp
|
||||||
|
scripting/vm/jit_call.cpp
|
||||||
|
scripting/vm/jit_flow.cpp
|
||||||
|
scripting/vm/jit_load.cpp
|
||||||
|
scripting/vm/jit_math.cpp
|
||||||
|
scripting/vm/jit_move.cpp
|
||||||
|
scripting/vm/jit_store.cpp
|
||||||
|
)
|
||||||
|
|
||||||
# This is disabled for now because I cannot find a way to give the .pch file a different name.
|
# This is disabled for now because I cannot find a way to give the .pch file a different name.
|
||||||
# Visual C++ 2015 seems hell-bent on only allowing one .pch file with the same name as the executable.
|
# Visual C++ 2015 seems hell-bent on only allowing one .pch file with the same name as the executable.
|
||||||
#enable_precompiled_headers( g_pch2.h FASTMATH_PCH_SOURCES )
|
#enable_precompiled_headers( g_pch2.h FASTMATH_PCH_SOURCES )
|
||||||
|
@ -1158,14 +1175,6 @@ set (PCH_SOURCES
|
||||||
scripting/decorate/thingdef_states.cpp
|
scripting/decorate/thingdef_states.cpp
|
||||||
scripting/vm/vmexec.cpp
|
scripting/vm/vmexec.cpp
|
||||||
scripting/vm/vmframe.cpp
|
scripting/vm/vmframe.cpp
|
||||||
scripting/vm/jit.cpp
|
|
||||||
scripting/vm/jit_runtime.cpp
|
|
||||||
scripting/vm/jit_call.cpp
|
|
||||||
scripting/vm/jit_flow.cpp
|
|
||||||
scripting/vm/jit_load.cpp
|
|
||||||
scripting/vm/jit_math.cpp
|
|
||||||
scripting/vm/jit_move.cpp
|
|
||||||
scripting/vm/jit_store.cpp
|
|
||||||
scripting/zscript/ast.cpp
|
scripting/zscript/ast.cpp
|
||||||
scripting/zscript/zcc_compile.cpp
|
scripting/zscript/zcc_compile.cpp
|
||||||
scripting/zscript/zcc_parser.cpp
|
scripting/zscript/zcc_parser.cpp
|
||||||
|
@ -1265,6 +1274,12 @@ set (PCH_SOURCES
|
||||||
utility/zstrformat.cpp
|
utility/zstrformat.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if( ${HAVE_VM_JIT} )
|
||||||
|
set( PCH_SOURCES ${PCH_SOURCES} ${VM_JIT_SOURCES} )
|
||||||
|
else()
|
||||||
|
set( NOT_COMPILED_SOURCE_FILES ${NOT_COMPILED_SOURCE_FILES} ${VM_JIT_SOURCES} )
|
||||||
|
endif()
|
||||||
|
|
||||||
enable_precompiled_headers( g_pch.h PCH_SOURCES )
|
enable_precompiled_headers( g_pch.h PCH_SOURCES )
|
||||||
|
|
||||||
add_executable( zdoom WIN32 MACOSX_BUNDLE
|
add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
|
@ -1272,7 +1287,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
|
||||||
${NOT_COMPILED_SOURCE_FILES}
|
${NOT_COMPILED_SOURCE_FILES}
|
||||||
__autostart.cpp
|
__autostart.cpp
|
||||||
${SYSTEM_SOURCES}
|
${SYSTEM_SOURCES}
|
||||||
${X86_SOURCES}
|
|
||||||
${FASTMATH_SOURCES}
|
${FASTMATH_SOURCES}
|
||||||
${PCH_SOURCES}
|
${PCH_SOURCES}
|
||||||
utility/x86.cpp
|
utility/x86.cpp
|
||||||
|
|
|
@ -543,7 +543,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
||||||
|
|
||||||
G_DoLoadLevel (mapname, 0, false, !savegamerestore);
|
G_DoLoadLevel (mapname, 0, false, !savegamerestore);
|
||||||
|
|
||||||
if (gameinfo.gametype == GAME_Strife || (SBarInfoScript[SCRIPT_CUSTOM] != nullptr && SBarInfoScript[SCRIPT_CUSTOM]->GetGameType() == GAME_Strife))
|
if (!savegamerestore && (gameinfo.gametype == GAME_Strife || (SBarInfoScript[SCRIPT_CUSTOM] != nullptr && SBarInfoScript[SCRIPT_CUSTOM]->GetGameType() == GAME_Strife)))
|
||||||
{
|
{
|
||||||
// Set the initial quest log text for Strife.
|
// Set the initial quest log text for Strife.
|
||||||
for (i = 0; i < MAXPLAYERS; ++i)
|
for (i = 0; i < MAXPLAYERS; ++i)
|
||||||
|
|
|
@ -808,6 +808,7 @@ void SetDehParams(FState *state, int codepointer)
|
||||||
}
|
}
|
||||||
fclose(dump);
|
fclose(dump);
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_VM_JIT
|
||||||
if (Args->CheckParm("-dumpjit"))
|
if (Args->CheckParm("-dumpjit"))
|
||||||
{
|
{
|
||||||
FILE *dump = fopen("dumpjit.txt", "a");
|
FILE *dump = fopen("dumpjit.txt", "a");
|
||||||
|
@ -817,6 +818,7 @@ void SetDehParams(FState *state, int codepointer)
|
||||||
}
|
}
|
||||||
fclose(dump);
|
fclose(dump);
|
||||||
}
|
}
|
||||||
|
#endif // HAVE_VM_JIT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ void player_t::SetLogText (const char *text)
|
||||||
{
|
{
|
||||||
// Print log text to console
|
// Print log text to console
|
||||||
AddToConsole(-1, TEXTCOLOR_GOLD);
|
AddToConsole(-1, TEXTCOLOR_GOLD);
|
||||||
AddToConsole(-1, LogText[0] == '$'? GStrings(LogText.GetChars()+1) : LogText.GetChars() );
|
AddToConsole(-1, LogText[0] == '$'? GStrings(text+1) : text );
|
||||||
AddToConsole(-1, "\n");
|
AddToConsole(-1, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,10 @@
|
||||||
#include "hwrenderer/scene/hw_portal.h"
|
#include "hwrenderer/scene/hw_portal.h"
|
||||||
#include "hwrenderer/utility/hw_clock.h"
|
#include "hwrenderer/utility/hw_clock.h"
|
||||||
#include "hwrenderer/data/flatvertices.h"
|
#include "hwrenderer/data/flatvertices.h"
|
||||||
|
|
||||||
|
#ifdef ARCH_IA32
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
#endif // ARCH_IA32
|
||||||
|
|
||||||
CVAR(Bool, gl_multithread, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CVAR(Bool, gl_multithread, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
|
@ -106,6 +109,7 @@ void HWDrawInfo::WorkerThread()
|
||||||
auto job = jobQueue.GetJob();
|
auto job = jobQueue.GetJob();
|
||||||
if (job == nullptr)
|
if (job == nullptr)
|
||||||
{
|
{
|
||||||
|
#ifdef ARCH_IA32
|
||||||
// The queue is empty. But yielding would be too costly here and possibly cause further delays down the line if the thread is halted.
|
// The queue is empty. But yielding would be too costly here and possibly cause further delays down the line if the thread is halted.
|
||||||
// So instead add a few pause instructions and retry immediately.
|
// So instead add a few pause instructions and retry immediately.
|
||||||
_mm_pause();
|
_mm_pause();
|
||||||
|
@ -118,6 +122,7 @@ void HWDrawInfo::WorkerThread()
|
||||||
_mm_pause();
|
_mm_pause();
|
||||||
_mm_pause();
|
_mm_pause();
|
||||||
_mm_pause();
|
_mm_pause();
|
||||||
|
#endif // ARCH_IA32
|
||||||
}
|
}
|
||||||
// Note that the main thread MUST have prepared the fake sectors that get used below!
|
// Note that the main thread MUST have prepared the fake sectors that get used below!
|
||||||
// This worker thread cannot prepare them itself without costly synchronization.
|
// This worker thread cannot prepare them itself without costly synchronization.
|
||||||
|
|
|
@ -922,6 +922,7 @@ void FFunctionBuildList::Build()
|
||||||
|
|
||||||
void FFunctionBuildList::DumpJit()
|
void FFunctionBuildList::DumpJit()
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_VM_JIT
|
||||||
FILE *dump = fopen("dumpjit.txt", "w");
|
FILE *dump = fopen("dumpjit.txt", "w");
|
||||||
if (dump == nullptr)
|
if (dump == nullptr)
|
||||||
return;
|
return;
|
||||||
|
@ -932,6 +933,7 @@ void FFunctionBuildList::DumpJit()
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(dump);
|
fclose(dump);
|
||||||
|
#endif // HAVE_VM_JIT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,7 @@
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#if (defined(_M_X64 ) || defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(__amd64 ) || defined(__amd64__ ))
|
#ifdef HAVE_VM_JIT
|
||||||
#define ARCH_X64
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ARCH_X64
|
|
||||||
CUSTOM_CVAR(Bool, vm_jit, true, CVAR_NOINITCALL)
|
CUSTOM_CVAR(Bool, vm_jit, true, CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
Printf("You must restart " GAMENAME " for this change to take effect.\n");
|
Printf("You must restart " GAMENAME " for this change to take effect.\n");
|
||||||
|
@ -56,6 +52,8 @@ CUSTOM_CVAR(Bool, vm_jit, true, CVAR_NOINITCALL)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
CVAR(Bool, vm_jit, false, CVAR_NOINITCALL|CVAR_NOSET)
|
CVAR(Bool, vm_jit, false, CVAR_NOINITCALL|CVAR_NOSET)
|
||||||
|
FString JitCaptureStackTrace(int framesToSkip, bool includeNativeFrames) { return FString(); }
|
||||||
|
void JitRelease() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cycle_t VMCycles[10];
|
cycle_t VMCycles[10];
|
||||||
|
@ -282,7 +280,7 @@ static bool CanJit(VMScriptFunction *func)
|
||||||
|
|
||||||
int VMScriptFunction::FirstScriptCall(VMFunction *func, VMValue *params, int numparams, VMReturn *ret, int numret)
|
int VMScriptFunction::FirstScriptCall(VMFunction *func, VMValue *params, int numparams, VMReturn *ret, int numret)
|
||||||
{
|
{
|
||||||
#ifdef ARCH_X64
|
#ifdef HAVE_VM_JIT
|
||||||
if (vm_jit && CanJit(static_cast<VMScriptFunction*>(func)))
|
if (vm_jit && CanJit(static_cast<VMScriptFunction*>(func)))
|
||||||
{
|
{
|
||||||
func->ScriptCall = JitCompile(static_cast<VMScriptFunction*>(func));
|
func->ScriptCall = JitCompile(static_cast<VMScriptFunction*>(func));
|
||||||
|
@ -290,12 +288,10 @@ int VMScriptFunction::FirstScriptCall(VMFunction *func, VMValue *params, int num
|
||||||
func->ScriptCall = VMExec;
|
func->ScriptCall = VMExec;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif // HAVE_VM_JIT
|
||||||
{
|
{
|
||||||
func->ScriptCall = VMExec;
|
func->ScriptCall = VMExec;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
func->ScriptCall = VMExec;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return func->ScriptCall(func, params, numparams, ret, numret);
|
return func->ScriptCall(func, params, numparams, ret, numret);
|
||||||
}
|
}
|
||||||
|
|
|
@ -825,12 +825,12 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
|
|
||||||
// Speed of sound is in units per second. Presuming we want to simulate a
|
// Speed of sound is in units per second. Presuming we want to simulate a
|
||||||
// typical speed of sound of 343.3 meters per second, multiply it by the
|
// typical speed of sound of 343.3 meters per second, multiply it by the
|
||||||
// units per meter scale (32?), and set the meters per unit to the scale's
|
// units per meter scale (1), and set the meters per unit to the scale's
|
||||||
// reciprocal. It's important to set these correctly for both doppler
|
// reciprocal. It's important to set these correctly for both doppler
|
||||||
// effects and reverb.
|
// effects and reverb.
|
||||||
alSpeedOfSound(343.3f * 32.0f);
|
alSpeedOfSound(343.3f);
|
||||||
if(ALC.EXT_EFX)
|
if(ALC.EXT_EFX)
|
||||||
alListenerf(AL_METERS_PER_UNIT, 1.0f/32.0f);
|
alListenerf(AL_METERS_PER_UNIT, 1.0f);
|
||||||
|
|
||||||
alDistanceModel(AL_INVERSE_DISTANCE);
|
alDistanceModel(AL_INVERSE_DISTANCE);
|
||||||
if(AL.EXT_source_distance_model)
|
if(AL.EXT_source_distance_model)
|
||||||
|
|
Loading…
Reference in a new issue