Merge remote-tracking branch 'origin/miami' into lcs

This commit is contained in:
withmorten 2021-02-18 02:32:49 +01:00
commit 037c332158
6 changed files with 27 additions and 47 deletions

View File

@ -6,13 +6,9 @@ on:
release:
types: published
env:
GLEW_VER: "2.1.0"
GLFW_VER: "3.3.2"
GLEW_BASE: "glew-2.1.0"
GLFW_BASE: "glfw-3.3.2.bin.WIN64"
GLEW_FILE: "glew-2.1.0-win32.zip"
GLFW_FILE: "glfw-3.3.2.bin.WIN64.zip"
GLEW_URL: "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip"
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN64.zip"
jobs:
build:
@ -27,11 +23,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'true'
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
name: Download glew
uses: carlosperate/download-file-action@v1.0.3
with:
file-url: ${{env.GLEW_URL}}
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
name: Download glfw
uses: carlosperate/download-file-action@v1.0.3
@ -40,11 +31,10 @@ jobs:
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
name: Unpack archives
run: |
7z x ${{env.GLEW_FILE}}
7z x ${{env.GLFW_FILE}}
- name: Configure build
run: |
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
./premake5 vs2019 --with-librw --glfwdir64=${{env.GLFW_BASE}}
- name: Build
run: |
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}

View File

@ -6,13 +6,9 @@ on:
release:
types: published
env:
GLEW_VER: "2.1.0"
GLFW_VER: "3.3.2"
GLEW_BASE: "glew-2.1.0"
GLFW_BASE: "glfw-3.3.2.bin.WIN32"
GLEW_FILE: "glew-2.1.0-win32.zip"
GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip"
GLEW_URL: "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip"
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
jobs:
build:
@ -27,11 +23,6 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'true'
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
name: Download glew
uses: carlosperate/download-file-action@v1.0.3
with:
file-url: ${{env.GLEW_URL}}
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
name: Download glfw
uses: carlosperate/download-file-action@v1.0.3
@ -40,11 +31,10 @@ jobs:
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
name: Unpack archives
run: |
7z x ${{env.GLEW_FILE}}
7z x ${{env.GLFW_FILE}}
- name: Configure build
run: |
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
./premake5 vs2019 --with-librw --glfwdir32=${{env.GLFW_BASE}}
- name: Build
run: |
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}

View File

@ -1,10 +1,3 @@
newoption {
trigger = "glewdir",
value = "PATH",
description = "Directory of GLEW",
default = "vendor/glew-2.1.0"
}
newoption {
trigger = "glfwdir64",
value = "PATH",
@ -165,7 +158,6 @@ workspace "reLCS"
filter "platforms:*librw_gl3_glfw*"
defines { "RW_GL3" }
includedirs { path.join(_OPTIONS["glewdir"], "include") }
if(not _OPTIONS["with-librw"]) then
libdirs { path.join(Librw, "lib/%{getsys(cfg.system)}-%{getarch(cfg.architecture)}-gl3/%{cfg.buildcfg}") }
end
@ -176,9 +168,6 @@ workspace "reLCS"
filter "platforms:*amd64-librw_gl3_glfw*"
includedirs { path.join(_OPTIONS["glfwdir64"], "include") }
filter "platforms:win*librw_gl3_glfw*"
defines { "GLEW_STATIC" }
filter {}
function setpaths (gamepath, exepath)
@ -202,7 +191,8 @@ project "librw"
targetname "rw"
targetdir(path.join(Librw, "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/gl/*/*.*") }
filter { "platforms:*x86*" }
architecture "x86"
@ -406,25 +396,23 @@ project "reLCS"
libdirs { "sdk/dx8sdk/lib" }
filter "platforms:win-x86*gl3_glfw*"
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
libdirs { path.join(_OPTIONS["glfwdir32"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
links { "opengl32", "glew32s", "glfw3" }
links { "opengl32", "glfw3" }
filter "platforms:win-amd64*gl3_glfw*"
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/x64") }
libdirs { path.join(_OPTIONS["glfwdir64"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
links { "opengl32", "glew32s", "glfw3" }
links { "opengl32", "glfw3" }
filter "platforms:linux*gl3_glfw*"
links { "GL", "GLEW", "glfw" }
links { "GL", "glfw" }
filter "platforms:bsd*gl3_glfw*"
links { "GL", "GLEW", "glfw", "sysinfo" }
links { "GL", "glfw", "sysinfo" }
includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" }
filter "platforms:macosx*gl3_glfw*"
links { "GLEW", "glfw" }
links { "glfw" }
linkoptions { "-framework OpenGL" }
includedirs { "/opt/local/include" }
includedirs { "/usr/local/include" }

View File

@ -1265,7 +1265,11 @@ cMusicManager::DisplayRadioStationName()
if (vehicle)
{
int8 track;
#if defined RADIO_SCROLL_TO_PREV_STATION || defined FIX_BUGS // Because m_nFrontendTrack can have NO_TRACK
int track;
#else
uint8 track;
#endif
gStreamedSound = vehicle->m_nRadioStation;
if (gStreamedSound >= STREAMED_SOUND_CITY_AMBIENT && gStreamedSound <= STREAMED_SOUND_AMBSIL_AMBIENT)
gStreamedSound = RADIO_OFF;
@ -1282,11 +1286,7 @@ cMusicManager::DisplayRadioStationName()
gNumRetunePresses++;
}
else
#ifdef FIX_BUGS
track = GetCarTuning(); // gStreamedSound or veh->m_nRadioStation would also work, but these don't cover police/taxi radios
#else
track = m_nFrontendTrack;
#endif
wchar* string = nil;
switch (track) {

View File

@ -464,7 +464,7 @@ public:
#endif
#ifdef AUDIO_OAL_USE_MPG123
// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (nothing breaks though)
// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (and breaks radio sometimes)
//#define MP3_USE_FUZZY_SEEK
class CMP3File : public IDecoder
@ -492,6 +492,8 @@ public:
{
#ifdef MP3_USE_FUZZY_SEEK
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
#else
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
#endif
long rate = 0;
int channels = 0;
@ -602,6 +604,8 @@ public:
{
#ifdef MP3_USE_FUZZY_SEEK
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
#else
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
#endif
long rate = 0;
int channels = 0;

View File

@ -1881,8 +1881,13 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
}
// Print bindings, including seperator (-) between them
CFont::SetScale(MENU_X(0.25f), MENU_Y(LISTITEM_Y_SCALE));
#ifdef FIX_BUGS
for (; contSetOrder < MAX_SETORDERS && controllerAction >= 0; contSetOrder++) {
#else
for (; contSetOrder < MAX_SETORDERS && controllerAction != -1; contSetOrder++) {
#endif
wchar *settingText = ControlsManager.GetControllerSettingTextWithOrderNumber((e_ControllerAction)controllerAction, (eContSetOrder)contSetOrder);
if (settingText) {
++bindingsForThisOpt;
@ -5503,6 +5508,9 @@ CMenuManager::SwitchMenuOnAndOff()
}
Initialise();
LoadAllTextures();
#ifdef FIX_BUGS
CPad::StopPadsShaking();
#endif
} else {
#ifdef EXTENDED_COLOURFILTER
// we always expect CPostFX to be open