https://gitlab.synchro.net/main/sbbs/-/commit/b2be5818e9fd2f72645dd686
Added Files:
src/doors/syncdoom/deh_ammo.c deh_bexstr.c deh_cheat.c deh_defs.h deh_doom.c deh_frame.c deh_io.c deh_io.h deh_main.c deh_mapping.c deh_mapping.h deh_misc.c deh_ptr.c deh_sound.c deh_str.c deh_text.c deh_thing.c deh_weapon.c w_merge.c
Modified Files:
src/doors/syncdoom/CMakeLists.txt d_main.c deh_main.h deh_misc.h deh_str.h doomfeatures.h doomtype.h
Log Message:
syncdoom: vendor and enable DeHackEd (-deh) and WAD merge (-merge)
Both were #undef'd in doomfeatures.h with their sources absent. Vendor the DeHackEd subsystem (deh_*.c/.h) and w_merge from Chocolate Doom and enable FEATURE_DEHACKED + FEATURE_WAD_MERGE. The deh sources came from a newer Chocolate
Doom than our doomgeneric base, so a few adaptations were needed:
- doomtype.h: add the PRINTF_ATTR / PRINTF_ARG_ATTR macros the newer headers use.
- deh_io.c: this base has no M_fopen, and lumpinfo is an array of structs.
- deh_main.c: drop DEH_AutoLoadPatches (needs the newer i_glob); and free the
-deh filename only when it is the malloc'd copy -- this base's
D_TryFindWADByName returns the original argv string when the file isn't found,
and freeing that stack pointer aborted the door (free(): invalid pointer).
- w_merge.c taken from the pre-lumpinfo-pointer-refactor revision to match.
Also un-gate LoadIwadDeh (ORIGCODE -> FEATURE_DEHACKED) so the Freedoom/FreeDM IWAD dehacked lumps (level names, etc.) load. Command-line -deh is applied after,
so it still overrides.
Co-Authored-By: Claude Opus 4.8 <
[email protected]>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net