mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-04-08 18:31:16 +00:00
An SDK to create Mods for dhewm3
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) |
||
---|---|---|
cm | ||
d3xp | ||
framework | ||
game | ||
idlib | ||
MayaImport | ||
renderer | ||
sound | ||
sys | ||
tools/compilers/aas | ||
ui | ||
.gitignore | ||
CMakeLists.txt | ||
config.h.in | ||
COPYING.txt | ||
README.txt |
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 ======================================================================