An SDK to create Mods for dhewm3
Find a file
Daniel Gibson c6d2afac06 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 11:26:12 +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:19:05 +01:00
framework Make sure MAX_OSPATH has sane size 2022-05-27 01:45:17 +02:00
game Make Sys_SetInteractiveIngameGuiActive() work better 2024-03-18 23:19:05 +01:00
idlib Fix MSVC non-Release builds (_alloca()/assert() didn't play nice) 2024-03-18 23:19:05 +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-27 01:45:17 +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 11:26:12 +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:12:27 +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.txt Fix cdoom download link in README 2018-08-27 03:13:12 +02:00

NOTE from Daniel: 
The following is (mostly) the original README of the mod and still refers to the SDK etc.

You can get the game data from https://www.moddb.com/downloads/classic-doom-3-131
Just extract that zip to your Doom3/dhewm3 installation.

After compiling the source, you can start the game with
  ./dhewm3 +set fs_game cdoom
  
A big THANK YOU to "SnoopJeDi" (and the rest of the Classic Doom 3 Team) for releasing this mod under GPL!

The original ReadMe:
======================================================================
CLASSIC DOOM III - VERSION 1.3.1 Sourcecode
======================================================================

DEVELOPER - Flaming Sheep Software
DATE OF RELEASE - October 2007
HOMEPAGE - http://cdoom.d3files.com
FORUMS - http://cdoom.d3files.com/forum/index.php


======================================================================
Description
======================================================================

This is a package of all the files from the Doom 3 Software Development Kit (SDK) that have been modified in the creation of Classic Doom 3.  The more predominant features of this code are the following:

-The intermission/statistics screen displayed between levels (there is an unused key/val combination that would allow mappers to update the GUI graphics depending the sequential progress of the player.  This was originally designed to facilitate a map on the intermission screen, but was dropped).

-Autorun.  A very small modification that simply checks the state of ui_autoRun and accordingly either flips input from the run key or leaves it untouched.


For a complete picture of what has been changed, cross-reference this code and the untouched 1.3.1 code using diff or a similar program for your operating system.



======================================================================
Legal
======================================================================

This modification is only for use with a legitimate version of the game "Doom 3", created by id Software.  This modification is not affiliated with id Software in any way.

If there is any technical issues directly related to this modification that is not a known issue with the game "Doom 3", please contact Flaming Sheep Software either through email or the website at http://cdoom.d3files.com

Activision and id Software do not hold responsibility for any technical issues that you may encouter through the use of this modification.

Distribution of this modification can be by any means necessary, aslong as it is kept as a complete package.

[Any and all assets or code presented in this modification are not allowed to be distributed as part of any other package, in whole or in part.] - UPDATE: got permission by the Coder (SnoopJeDi) to release this source under GPLv3

If you have any questions about the uses that are allowed with the modification, please contact Flaming Sheep Software at http://cdoom.d3files.com

======================================================================