ZDoom 2.0.97 Bugfix Release
Moderator: GZDoom Developers
- Shadelight
- Posts: 5113
- Joined: Fri May 20, 2005 11:16 am
- Location: Labrynna
- Doomguy0505
- Posts: 625
- Joined: Tue Mar 29, 2005 4:53 am
- Contact:
- MartinHowe
- Posts: 2062
- Joined: Mon Aug 11, 2003 1:50 pm
- Preferred Pronouns: He/Him
- Location: East Suffolk (UK)
- Doomguy0505
- Posts: 625
- Joined: Tue Mar 29, 2005 4:53 am
- Contact:
- Chris
- Posts: 2971
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
The list of changes needed for Linux. Patch attached. Includes cbuild.c and a cbuild script. The script is only setup to work with GCC (in Linux and MinGW), though it can be changed to work with MSVC cli tools.. I just don't know VC's command lines well enough.
People with an sh-compatible shell can run the cbuild.c file directly, otherwise, you'll need to manually compile it into an executable (eg: gcc -O2 -W -Wall -Werror -o cbuild.exe cbuild.c). Setting the environment vars NOASM, OPTLEVEL, ARCH_TYPE, TUNE_TYPE, CONFIG, RELEASETARGET, and DEBUGTARGET before running the script will have the same effect as with the makefile. Run with 'help' to get a list of available options.
As for the changes themselves...
In src/sdl:
Edit2 - Fixed a bug in cbuild relating to predefining env. vars. Thanks to Sanders for pointing it out.
People with an sh-compatible shell can run the cbuild.c file directly, otherwise, you'll need to manually compile it into an executable (eg: gcc -O2 -W -Wall -Werror -o cbuild.exe cbuild.c). Setting the environment vars NOASM, OPTLEVEL, ARCH_TYPE, TUNE_TYPE, CONFIG, RELEASETARGET, and DEBUGTARGET before running the script will have the same effect as with the makefile. Run with 'help' to get a list of available options.
As for the changes themselves...
In src/sdl:
- I_PrintStr uses the wrong prototype.
- GetModeCount is a virtual method in IVideo, but is never defined in SDLVideo. Since it's never used, it can be simply removed.
- IVideo and SDLVideo's NextMode function, as well as I_NextMode, are missing the 'bool *letterbox' parameter.
- A redundant i_music.h is conflicting with the one in src/sound.
- Missing a 'Windowed' variable in one of the SDLVideo functions (and in the same lines, unclean use of the ?: operators)
- I_FindFirst returns NULL where (void*)-1 is expected.
- I_RegisterSong tries to use SPC in non-Windows (unfortunately it was way too much of a hassle to maintain this capability in Linux).
- i_sound.cpp tries to include the Win32-only header altsound.h in non-Windows.
- Also in i_sound.cpp, GSnd is not initialized with an FMODSoundRenderer object in non-Windows. It thusly crashes when attempting to check if(!GSnd->IsValid()).
- music_midi_timidity.cpp needs to include unistd.h for open/close/pipe/etc.
- v_palette.cpp also needs unistd.h
- zstrformat.cpp uses the non-standard __int64 type. For this patch, I changed it to use the C99-standard uint64_t and int64_t types (found in stdint.h, which the latest MinGW supports), and added typedefs for MSVC (why won't Microsoft support C99
).
Edit2 - Fixed a bug in cbuild relating to predefining env. vars. Thanks to Sanders for pointing it out.
Last edited by Chris on Mon Oct 03, 2005 3:13 pm, edited 2 times in total.
- Doomguy0505
- Posts: 625
- Joined: Tue Mar 29, 2005 4:53 am
- Contact:
- Shadelight
- Posts: 5113
- Joined: Fri May 20, 2005 11:16 am
- Location: Labrynna