An SDK to create Mods for dhewm3
Find a file
Daniel Gibson 41cfd224f9 Don't use GCC's __builtin_alloca_with_align(), fix #572
turns out that __builtin_alloca_with_align() might releases the
allocated memory at the end of the block it was allocated in, instead
of the end of the function (which is the behavior of regular alloca()
and __builtin_alloca()): "The lifetime of the allocated object ends at
 the end of the block in which the function was called. The allocated
 storage is released no later than just before the calling function
 returns to its caller, but may be released at the end of the block in
 which the function was called."
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005falloca_005fwith_005falign

Clang also supports __builtin_alloca_with_align(), but always releases
the memory at the end of the function.

And it seems that newer GCC versions also tend to release it at the
end of the function, but GCC 4.7.2 (that I use for the official Linux
release binaries) didn't, and that caused weird graphical glitches.
But as I don't want to rely on newer GCC versions behaving like this
(and the documentation explicitly says that it *may* be released at
 the end of the block, but will definitely be released at the end of
 the function), I removed all usage of __builtin_alloca_with_align().

(Side-Note: GCC only started documenting the behavior of
 __builtin_alloca and __builtin_alloca_with_align at all with GCC 6.1.0)
2024-04-19 12:15:32 +02:00
cm Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
d3xp Make Sys_SetInteractiveIngameGuiActive() work better 2024-03-18 23:28:29 +01:00
framework Make sure MAX_OSPATH has sane size 2022-05-29 00:29:54 +02:00
game Make Sys_SetInteractiveIngameGuiActive() work better 2024-03-18 23:28:29 +01:00
idlib Fix MSVC non-Release builds (_alloca()/assert() didn't play nice) 2024-03-18 23:28:29 +01:00
MayaImport Make it build as SDK 2018-08-26 01:43:10 +02:00
renderer renderer/RenderSystem.h: Changes from dhewm3 2022-05-29 00:29:54 +02:00
sound Make it build as SDK 2018-08-26 01:43:10 +02:00
sys Don't use GCC's __builtin_alloca_with_align(), fix #572 2024-04-19 12:15:32 +02:00
tools/compilers/aas Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
ui Untangle the epic precompiled.h mess 2018-08-20 01:46:28 +02:00
.gitignore Make it build as SDK 2018-08-26 01:43:10 +02:00
CMakeLists.txt CMake: Detect all variations of the clang compiler (hopefully) 2024-03-19 03:14:55 +01:00
config.h.in Make it build as SDK 2018-08-26 01:43:10 +02:00
COPYING.txt Add GPLv3 COPYING.txt 2018-08-20 01:46:20 +02:00
README.md Changes to CMakeLists.txt and README for Fitz Packerton 2018-12-09 04:57:50 +01:00

Fitz Packerton

This is the source of the "Fitz Packerton" game by Brendon Chung, Teddy Dief, Ryan Cousins and Sarah Elmaleh, ported to the dhewm3 SDK.

The original source can be downloaded at http://blendogames.com/older.htm

Fitz Packerton is "A theatrical game about a man and the things he carries. Pack what you must. Pray you won't need it."

You can get the game at https://teddydief.itch.io/fitz

Fitz Packerton is actually an (experimental, short) standalone game, so you don't even need the Doom3 gamedata to run it, only the Fitz data linked above.

you could start it with ./dhewm3 +set fs_basepath /path/to/fitzpackerton/ +set fs_game fitz

How to build

(I should eventually expand this, especially for Windows)

On Linux and similar the following should work (if you have cmake, make and GCC/g++ installed):

  1. Clone the dhewm3-sdk git repo
  2. switch to your git clone's directory: cd dhewm3-sdk
  3. (optional: switch to an existing mods branch: git checkout dentonmod)
  4. create a build directory: mkdir build
  5. switch to build directory: cd build
  6. create Makefile with CMake: cmake ..
  7. compile the mod .so: make -j4
  8. it (e.g. fitz.so) should now be in the build/ directory, copy it to your dhewm3 install, where base.so and d3xp.so are
  9. start the game with that mod, like dhewm3 +set fs_game fitz

(Make sure to actually have the mods game data in the right directory as well; the directory name should be the same as the game lib name, but without .so/.dylib/.dll, for example dentonmod/ for dentonmod.so)

On Windows it should be kinda similar, but you have to tell CMake to create a Visual Studio solution for the VS version you're using, or Makefiles for MinGW-w64 or whatever.