Skip to content

Commit

Permalink
dhewm3: fix build with openal-soft-1.24.1
Browse files Browse the repository at this point in the history
Using upstream patch. Remove BROKEN. Changes since 1.5.1:

1.5.4
------------------------------------------------------------------------

* A brand new settings menu that uses [Dear ImGui](https://github.com/ocornut/imgui).
  Can be opened with `F10` (unless that key is bound already) or by entering `dhewm3Settings`
  in the console. It has lots of settings that the original options menu doesn't have and
  can be easily navigated with gamepad or keyboard (or the mouse, of course).
  It can also be opened while in the game, which then is paused (if Single Player) but still visible,
  so the effect of most graphics settings can be seen immediately.
  Needs SDL2 and C++11.
* "Soft" Particles (that don't "cut" into geometry but fade smoothly), based on code from The Dark Mod
  2.04. Can be enabled/disabled with `r_useSoftParticles`, is applied automatically for all appropriate
  particles (view-aligned, using additive or alpha blending and not too small)
* `r_enableDepthCapture`: Enable capturing depth buffer to texture, needed for the soft particles.
  Can be used in custom materials by using the `"_currentDepth"` texture
* Replaced dependency on (external) zlib with integrated [miniz](https://github.com/richgel999/miniz)
* HighDPI/Retina support
* Allow inverted mouse look (horizontally, vertically or both) with `m_invertLook`
* CVar to allow always run in single player (still drains stamina though!): `in_allowAlwaysRunInSP`
* VSync can be enabled/disabled on the fly, without restarting the renderer (still with `r_swapInterval`
  or in the menu, of course; needs SDL2)
* Allow enabling/disabling [HRTF](https://en.wikipedia.org/wiki/Head-related_transfer_function)
  with `s_alHRTF`
* `s_alOutputLimiter`: Configure OpenAL's output-limiter which temporarily reduces the overall
  volume when too many too loud sounds play at once, to avoid issues like clipping
* `s_scaleDownAndClamp`: Clamp and reduce volume of all sounds to prevent clipping or temporary
  downscaling by OpenAL's output limiter
* If `r_windowResizable` is set, the dhewm3 window (when in windowed mode..) can be freely resized.
  Needs SDL2; with 2.0.5 and newer it's applied immediately, otherwise when creating the window.
* If switching between fullscreen and windowed mode or similar changes causes issues (like
  [here](dhewm/dhewm3#587 (comment))), you can set
  `r_vidRestartAlwaysFull 1`, so (again) a full `vid_restart` is done, instead of the partial one
  which *usually* suffices for just changing the resolution or fullscreen state. If you run into that
  issue (probably a driver bug), you'll probably also want to set `r_windowResizable 0`, because
  resizing the window that way also triggered the bug, and in that case no `vid_restart` is done at all
* Fixed screenshots when using native Wayland (`SDL_VIDEODRIVER=wayland`)
* If you enter the `map` command in the console, without any arguments, the current map name is printed
* Support OpenGL debug contexts and messages (`GL_ARB_debug_output`). Can be enabled with `r_glDebugContext 1`.
  Changing that CVar requires a `vid_restart` (or set it as startup argument)
* The Mods Menu's entries for the base game and d3xp/RoE are now clearer, and it can load the new
  d3xp-based mods (sikkmodd3xp, perfected_roe)

1.5.3 (2024-03-29)
------------------------------------------------------------------------

* Support for gamepads (based on code from [Quadrilateral Cowboy](https://github.com/blendogames/quadrilateralcowboy),
  but heavily expanded). See [Configuration.md](./Configuration.md#using-gamepads) for more information.
* Support different file formats for screenshots by setting the `r_screenshotFormat` CVar
  (0 = TGA, still the default, 1 = BMP, 2 = PNG, 3 = JPG). `r_screenshotJpgQuality` and
  `r_screenshotPngCompression` allow configuring how JPG/PNG are compressed.
  Thanks *eezstreet (Nick Whitlock)*!
* Fixed problems with lights after loading a savegame (#495)
* Fix volume of some weapon sounds, like chaingun being too quit (#326)
* Increase stack size on Windows to 8MB (instead default of 1MB) to make loading huge models work
* Fixed crash in Radiant Model Preview Dialog (#496)
* Fix MD3 model support
* Several new CMake options:
    - To enable Clang/GCC Address Sanitizer and Undefined Behavior Sanitizer
    - Hardlink the game code into the executable (instead of using game DLLs,
      only supports base *or* d3xp then; needed for Undefined Behavior Sanitizer)
    - Force colored diagnostic output from GCC or Clang (esp. useful when building with ninja)
* Fix several compiler warnings
* Added build instructions for Linux (and similar systems) to README.md
* Updated stb_image and stb_vorbis
* Updated minizip (from zlib/contrib) to latest upstream code
* Added `in_namePressed` CVar to print currently pressed key/button (useful for binding keys
  in the console or configs). Thanks *Biel Bestué de Luna*!


1.5.2 (2022-06-13)
------------------------------------------------------------------------

* Gamma and Brightness are now applied in the shaders instead of by setting hardware gamma.
  Can be disabled (so hardware gamma is used again) with `r_gammaInShaders 0`
* Improvements for (Windows-only) MFC-based tools:
    - Added the script debugger! (thanks *HarrievG*!)
      Original Doom3 didn't have it (Quake4 did), but the Doom3 GPL source contained
      most of it. *HarrievG* implemented the missing parts and we added some new
      features. It can even be used over the network and while the client part
      (the debugger GUI) is Windows-only, the server can run on all supported
      platforms, so you can debug a game running on Linux or macOS, for example.
      Relevant CVars for network debugging are:
      `com_enableDebuggerServer` and `com_dbgClientAdr` and `com_dbgServerAdr`.
      To debug the running game on the same PC, just enter `debugger` in the console.
    - All tools can now be built in 64bit (thanks *raynorpat*!)
    - HighDPI support (thanks *HarrievG*!)
    - PDAEditor works now
    - Additional bugfixes
* Cycle through multiple Quicksave slots instead of immediately overwriting the last
  Quicksave. The `com_numQuicksaves` CVar allows setting the number of QuickSaves (#392)
* Make r_locksurfaces work (#357)
  It doesn't do exactly what its description and name suggests: it renders
  everything that is *currently* visible from the position/view the player had
  when setting `r_locksurfaces 1`. Originally it was supposed to render exactly
  the surfaces that *were* visible then, but I couldn't get that to work.
  This is pretty similar, but there may be differences with opened doors and such.
* Keyboard input improvements (mostly SDL2-only):
    - Support (hopefully) all keyboard keys on all kinds of keyboard layouts
      by using scancodes for otherwise unknown keys
    - Support typing in non-ASCII characters, if supported by Doom3 (it supports ISO-8859-1)
    - Support the clipboard also on non-Windows platforms
      You can paste text from the clipboard into the console or other edit fields
      with `Shift+Insert`
    - Explicit support for Right Ctrl, Alt and Shift keys
      (can be bound to different actions than their left counterparts)
    - Added `in_grabKeyboard` CVar to make sure dhewm3 gets *all* keyboard input
      Prevents the Windows-key or Alt-Tab or whatever from taking focus from the game
    - Added `in_ignoreConsoleKey` - if set to `1`, the console is only opened with
      Shift+Esc, and the "console key" (that key between Esc, 1 and Tab) can be freely
      bound to an action (and its char can be typed in the console without closing it).
    - Added (SDL2-only) "auto" option for `in_kbd`: When not disabling the console key,
      dhewm3 will try to automatically detect it if `in_kbd` is set to "auto" (now default)
* Reworked mouse-input and -grabbing code, using absolute mouse mode in fullscreen GUIs
  (except for the PDA, because it's implemented weirdly).
  This made releasing the mouse in the main menu possible, as now the ingame cursor
  is at the same position as the system cursor.
* `s_alReverbGain` CVar to reduce EFX reverb effect intensity (#365)
* Pause (looped) sounds when entering menu (#330)
* Fixes for looped sounds (#390)
* Replace libjpeg with stb_image and libogg/libvorbis(file) with stb_vorbis
    - Now the only required external dependencies should be OpenAL, SDL, zlib
      and optionally libCURL (and of course the C and C++ runtimes)
* (Optionally) use libbacktrace on non-Windows platforms for more useful
  backtraces in case of crashes (usually linked statically)
* Fixed a deadlock (freeze) on Windows when printing messages from another thread
* Fixed endless loop (game locking up at startup) if graphics settings couldn't be applied (#386)
* Fixed some warnings and uninitialized variables (thanks *turol*!)
* Work around dmap bug caused by GCC using FMA "optimizations" (#147)
* Prevent dhewm3 from being run as root on Unix-like systems to improve security
* Replaced most usages of `strncpy()` with something safer to prevent buffer overflows
  (remaining cases should be safe).
    - Just a precaution, I don't know if any of them could actually be exploited,
      but there were some compiler warnings in newer GCC versions.
* Console output is now logged to `dhewm3log.txt` (last log is renamed to `dhewm3log-old.txt`)
    - On Windows it's in `My Documents/My Games/dhewm3/`
    - On Mac it's in `$HOME/Library/Application Support/dhewm3/`
    - On other Unix-like systems like Linux it's in `$XDG_DATA_HOME/dhewm3/`
      (usually `$HOME/.local/share/dhewm3/`)
* Improved compatibility with Wayland (#426)
* Work around assertion in AlphaLabs4 due to "ride_of_death" yeeting
  the dead "monster_zsec_shotgun_12" into the void (#409)
* Support loading some mods known to need `fs_game_base d3xp` via Mods menu
  (currently, *The Lost Mission* and *LibreCoop d3xp* are supported)
* Disable assertion in idSampleDecoderLocal::DecodeOGG() that triggered
  when starting a new Classic Doom3 game (#461)
  • Loading branch information
0-wiz-0 committed Nov 30, 2024
1 parent a1a7ac8 commit d639370
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions games/dhewm3/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.31 2024/11/30 21:20:47 wiz Exp $
# $NetBSD: Makefile,v 1.32 2024/11/30 23:02:05 wiz Exp $

DISTNAME= dhewm3-1.5.4
CATEGORIES= games
Expand All @@ -12,7 +12,7 @@ COMMENT= Source port of the original Doom 3
LICENSE= gnu-gpl-v3

# https://github.com/dhewm/dhewm3/issues/633
BROKEN= "Does not build against openal-soft-1.24"
#BROKEN= "Does not build against openal-soft-1.24"

WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
USE_TOOLS+= pkg-config
Expand Down
3 changes: 2 additions & 1 deletion games/dhewm3/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.7 2024/11/30 21:20:47 wiz Exp $
$NetBSD: distinfo,v 1.8 2024/11/30 23:02:05 wiz Exp $

BLAKE2s (dhewm3-1.5.4.tar.gz) = 1fde9b0d26a790170a015450b7c03f52bc115dd23cfc9ecc30f2f97e7568e721
SHA512 (dhewm3-1.5.4.tar.gz) = 1ed970ee2c61b11050694823c8526036dbf1034579d31ea4fd5b21afc095a4e54a2829f6838666da0deee82007890356a10a5b38277b10658c1f90bfb57aa0a7
Size (dhewm3-1.5.4.tar.gz) = 7685654 bytes
SHA1 (patch-neo_sound_snd__local.h) = 878df5a70ff84165809e3531f75383ec73db99b7
15 changes: 15 additions & 0 deletions games/dhewm3/patches/patch-neo_sound_snd__local.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$NetBSD: patch-neo_sound_snd__local.h,v 1.1 2024/11/30 23:02:05 wiz Exp $

Fix build with openal-soft-1.24.
https://github.com/dhewm/dhewm3/issues/633#issuecomment-2509399667

--- neo/sound/snd_local.h.orig 2024-11-30 22:29:45.302155237 +0000
+++ neo/sound/snd_local.h
@@ -34,6 +34,7 @@ If you have questions concerning this li
// because the implemenations are in openal_stub.cpp
// this is ensured by defining AL_LIBTYPE_STATIC before including the AL headers
#define AL_LIBTYPE_STATIC
+#define AL_DISABLE_NOEXCEPT
#endif

#include <AL/al.h>

0 comments on commit d639370

Please sign in to comment.