From e858314a9f1c0adb0a8c2ec2dd1536e111932650 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 22 May 2020 18:00:18 +0300 Subject: OpenAL configs --- premake5.lua | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'premake5.lua') diff --git a/premake5.lua b/premake5.lua index c8494884..79b8db64 100644 --- a/premake5.lua +++ b/premake5.lua @@ -51,6 +51,9 @@ workspace "re3" "win-x86-RW33_d3d8-mss", "win-x86-librw_d3d9-mss", "win-x86-librw_gl3_glfw-mss", + "win-x86-RW33_d3d8-oal", + "win-x86-librw_d3d9-oal", + "win-x86-librw_gl3_glfw-oal", } filter { "system:linux" } @@ -183,11 +186,23 @@ project "re3" includedirs { "src/extras" } includedirs { "eax" } - includedirs { "milessdk/include" } includedirs { "eax" } - - libdirs { "milessdk/lib" } + filter "platforms:*mss" + defines { "AUIOD_MSS" } + includedirs { "milessdk/include" } + libdirs { "milessdk/lib" } + + filter "platforms:*oal" + defines { "AUIOD_OAL" } + includedirs { "openal-soft/include" } + includedirs { "libsndfile/include" } + includedirs { "mpg123/include" } + libdirs { "openal-soft/libs/Win32" } + libdirs { "libsndfile/lib" } + libdirs { "mpg123/lib" } + + filter {} if(os.getenv("GTA_III_RE_DIR")) then setpaths("$(GTA_III_RE_DIR)/", "%(cfg.buildtarget.name)", "") end @@ -199,8 +214,7 @@ project "re3" characterset ("MBCS") targetextension ".exe" - filter "platforms:linux*" - defines { "OPENAL" } + filter "platforms:linux*oal" links { "openal", "mpg123", "sndfile", "pthread" } filter "platforms:*RW33*" -- cgit v1.2.3 From efe52dbbbc504acdf87573f23653d4a8ec295c46 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 22 May 2020 21:14:38 +0300 Subject: I am an idiot --- eax/eax.h | 4 ---- premake5.lua | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'premake5.lua') diff --git a/eax/eax.h b/eax/eax.h index 503090d2..b2210936 100644 --- a/eax/eax.h +++ b/eax/eax.h @@ -50,12 +50,8 @@ extern "C" { #else // AUDIO_OAL -#ifndef _WIN32 #include #include -#else - #include -#endif #ifndef GUID_DEFINED #define GUID_DEFINED diff --git a/premake5.lua b/premake5.lua index 79b8db64..75b1b979 100644 --- a/premake5.lua +++ b/premake5.lua @@ -189,12 +189,12 @@ project "re3" includedirs { "eax" } filter "platforms:*mss" - defines { "AUIOD_MSS" } + defines { "AUDIO_MSS" } includedirs { "milessdk/include" } libdirs { "milessdk/lib" } filter "platforms:*oal" - defines { "AUIOD_OAL" } + defines { "AUDIO_OAL" } includedirs { "openal-soft/include" } includedirs { "libsndfile/include" } includedirs { "mpg123/include" } -- cgit v1.2.3 From c993e99e0086aae50357c8ffa180de54396ede92 Mon Sep 17 00:00:00 2001 From: eray orçunus Date: Fri, 22 May 2020 22:49:54 +0300 Subject: Fix linux build --- premake5.lua | 14 ++++++++------ src/audio/oal/stream.cpp | 5 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'premake5.lua') diff --git a/premake5.lua b/premake5.lua index 75b1b979..fd6da6ac 100644 --- a/premake5.lua +++ b/premake5.lua @@ -195,12 +195,6 @@ project "re3" filter "platforms:*oal" defines { "AUDIO_OAL" } - includedirs { "openal-soft/include" } - includedirs { "libsndfile/include" } - includedirs { "mpg123/include" } - libdirs { "openal-soft/libs/Win32" } - libdirs { "libsndfile/lib" } - libdirs { "mpg123/lib" } filter {} if(os.getenv("GTA_III_RE_DIR")) then @@ -214,6 +208,14 @@ project "re3" characterset ("MBCS") targetextension ".exe" + filter "platforms:win*oal" + includedirs { "openal-soft/include" } + includedirs { "libsndfile/include" } + includedirs { "mpg123/include" } + libdirs { "openal-soft/libs/Win32" } + libdirs { "libsndfile/lib" } + libdirs { "mpg123/lib" } + filter "platforms:linux*oal" links { "openal", "mpg123", "sndfile", "pthread" } diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index c70cd2c1..34518f54 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -8,12 +8,11 @@ typedef long ssize_t; #pragma comment( lib, "libsndfile-1.lib" ) #pragma comment( lib, "libmpg123.lib" ) +#else +#include "crossplatform.h" #endif #include #include -#ifndef _WIN32 -#include "crossplatform.h" -#endif class CSndFile : public IDecoder { -- cgit v1.2.3