mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 03:50:01 +00:00
commit
8428b99c0d
21
premake5.lua
21
premake5.lua
|
@ -77,6 +77,11 @@ workspace "re3"
|
||||||
"linux-arm-librw_gl3_glfw-oal",
|
"linux-arm-librw_gl3_glfw-oal",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filter { "system:bsd" }
|
||||||
|
platforms {
|
||||||
|
"bsd-amd64-librw_gl3_glfw-oal"
|
||||||
|
}
|
||||||
|
|
||||||
filter "configurations:Debug"
|
filter "configurations:Debug"
|
||||||
defines { "DEBUG" }
|
defines { "DEBUG" }
|
||||||
|
|
||||||
|
@ -90,6 +95,9 @@ workspace "re3"
|
||||||
filter { "platforms:linux*" }
|
filter { "platforms:linux*" }
|
||||||
system "linux"
|
system "linux"
|
||||||
|
|
||||||
|
filter { "platforms:bsd*" }
|
||||||
|
system "bsd"
|
||||||
|
|
||||||
filter { "platforms:*x86*" }
|
filter { "platforms:*x86*" }
|
||||||
architecture "x86"
|
architecture "x86"
|
||||||
|
|
||||||
|
@ -147,6 +155,11 @@ project "librw"
|
||||||
targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
|
targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
|
||||||
files { path.join(Librw, "src/*.*") }
|
files { path.join(Librw, "src/*.*") }
|
||||||
files { path.join(Librw, "src/*/*.*") }
|
files { path.join(Librw, "src/*/*.*") }
|
||||||
|
|
||||||
|
filter "platforms:bsd*"
|
||||||
|
includedirs { "/usr/local/include" }
|
||||||
|
libdirs { "/usr/local/lib" }
|
||||||
|
|
||||||
filter "platforms:*RW33*"
|
filter "platforms:*RW33*"
|
||||||
flags { "ExcludeFromBuild" }
|
flags { "ExcludeFromBuild" }
|
||||||
filter {}
|
filter {}
|
||||||
|
@ -259,6 +272,9 @@ project "re3"
|
||||||
filter "platforms:linux*oal"
|
filter "platforms:linux*oal"
|
||||||
links { "openal", "mpg123", "sndfile", "pthread" }
|
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||||
|
|
||||||
|
filter "platforms:bsd*oal"
|
||||||
|
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||||
|
|
||||||
if _OPTIONS["with-opus"] then
|
if _OPTIONS["with-opus"] then
|
||||||
filter {}
|
filter {}
|
||||||
links { "libogg" }
|
links { "libogg" }
|
||||||
|
@ -306,3 +322,8 @@ project "re3"
|
||||||
|
|
||||||
filter "platforms:linux*gl3_glfw*"
|
filter "platforms:linux*gl3_glfw*"
|
||||||
links { "GL", "GLEW", "glfw" }
|
links { "GL", "GLEW", "glfw" }
|
||||||
|
|
||||||
|
filter "platforms:bsd*gl3_glfw*"
|
||||||
|
links { "GL", "GLEW", "glfw", "sysinfo" }
|
||||||
|
includedirs { "/usr/local/include" }
|
||||||
|
libdirs { "/usr/local/lib" }
|
||||||
|
|
|
@ -587,16 +587,16 @@ cSampleManager::Initialise(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] = (uintptr)malloc(nSampleBankSize[SAMPLEBANK_MAIN]);
|
nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] = (uintptr)malloc(nSampleBankSize[SAMPLEBANK_MAIN]);
|
||||||
ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] != NULL);
|
ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] != 0);
|
||||||
|
|
||||||
if ( nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] == NULL )
|
if ( nSampleBankMemoryStartAddress[SAMPLEBANK_MAIN] == 0 )
|
||||||
{
|
{
|
||||||
Terminate();
|
Terminate();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
nSampleBankMemoryStartAddress[SAMPLEBANK_PED] = (uintptr)malloc(PED_BLOCKSIZE*MAX_PEDSFX);
|
nSampleBankMemoryStartAddress[SAMPLEBANK_PED] = (uintptr)malloc(PED_BLOCKSIZE*MAX_PEDSFX);
|
||||||
ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] != NULL);
|
ASSERT(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -150,9 +150,11 @@ CdStreamInit(int32 numChannels)
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef __linux__
|
||||||
_gdwCdStreamFlags = O_RDONLY | O_NOATIME;
|
_gdwCdStreamFlags = O_RDONLY | O_NOATIME;
|
||||||
|
#else
|
||||||
|
_gdwCdStreamFlags = O_RDONLY;
|
||||||
|
#endif
|
||||||
// People say it's slower
|
// People say it's slower
|
||||||
/*
|
/*
|
||||||
if ( fsInfo.f_bsize <= CDSTREAM_SECTOR_SIZE )
|
if ( fsInfo.f_bsize <= CDSTREAM_SECTOR_SIZE )
|
||||||
|
@ -400,8 +402,11 @@ void *CdStreamThread(void *param)
|
||||||
if (gCdStreamThreadStatus == 0){
|
if (gCdStreamThreadStatus == 0){
|
||||||
gCdStreamThreadStatus = 1;
|
gCdStreamThreadStatus = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
pid_t tid = syscall(SYS_gettid);
|
pid_t tid = syscall(SYS_gettid);
|
||||||
int ret = setpriority(PRIO_PROCESS, tid, getpriority(PRIO_PROCESS, getpid()) + 1);
|
int ret = setpriority(PRIO_PROCESS, tid, getpriority(PRIO_PROCESS, getpid()) + 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// spurious wakeup or we sent interrupt signal for flushing
|
// spurious wakeup or we sent interrupt signal for flushing
|
||||||
|
|
|
@ -209,7 +209,11 @@ double
|
||||||
psTimer(void)
|
psTimer(void)
|
||||||
{
|
{
|
||||||
struct timespec start;
|
struct timespec start;
|
||||||
|
#ifdef __linux__
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||||
|
#else
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||||
|
#endif
|
||||||
return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0;
|
return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue