Skip to content

Commit

Permalink
Fix binkdec build warnings and update README for Linux & macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
SRSaunders committed Jul 23, 2021
1 parent c536e1f commit 507973f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,7 @@ Recommended in this case is `cmake-vs2017-64bit-windows10.bat`

> sudo zypper install cmake libSDL2-devel openal-soft-devel

You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF to the CMake options.
It is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode.
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. FFmpeg is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode.

2. Generate the Makefiles using CMake:

Expand All @@ -529,6 +528,8 @@ Recommended in this case is `cmake-vs2017-64bit-windows10.bat`
2. You need the following dependencies in order to compile RBDoom3BFG with all features:

> brew install cmake sdl2 openal-soft ffmpeg
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. FFmpeg is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode. If FFmpeg is not installed and you are building for Vulkan, you must install either Homebrew's libx11 or Xquartz (https://www.xquartz.org).

3. Generate the Makefiles using CMake:

Expand Down
5 changes: 5 additions & 0 deletions neo/libs/libbinkdec/include/FFmpeg_includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@
#else // DG: add alternative that should work with at least GCC and clang
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#endif
// SRS - Add guards to prevent override of standard math defines
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
#ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
#endif

#define HAVE_MMX 0
#define ARCH_ARM 0
Expand Down
2 changes: 1 addition & 1 deletion neo/libs/libbinkdec/src/BinkVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ int BinkDecoder::ReadDCs(BinkCommon::BitReader &bits, Bundle *b, int start_bits,
v += v2;
*dst++ = v;
if (v < -32768 || v > 32767) {
BinkCommon::LogError("DC value went out of bounds" + v);
BinkCommon::LogError("DC value went out of bounds: " + std::to_string(v));
return -1;
}
}
Expand Down

0 comments on commit 507973f

Please sign in to comment.