Commit graph

873 commits

Author SHA1 Message Date
Christoph Oelckers
b473fc936c - consolidated the 3 atterm implementations.
Each platform had its own copy. Why?

# Conflicts:
#	src/CMakeLists.txt
#	src/dobjtype.cpp
#	src/g_mapinfo.cpp
#	src/g_statusbar/sbarinfo.cpp
#	src/i_net.cpp
#	src/menu/menudef.cpp
#	src/p_setup.cpp
#	src/posix/cocoa/i_video.mm
#	src/posix/i_system.h
#	src/posix/sdl/i_main.cpp
#	src/r_utility.cpp
#	src/s_advsound.cpp
#	src/s_sound.cpp
#	src/v_video.cpp
#	src/win32/i_input.cpp
#	src/win32/i_system.h

# Conflicts:
#	src/CMakeLists.txt
#	src/doomtype.h
#	src/i_net.cpp
#	src/posix/sdl/i_system.cpp
#	src/win32/i_system.cpp
#	src/win32/win32video.cpp
2019-06-10 20:52:02 +02:00
drfrag
4c7eb79d72 - Fixed MinGW compilation. 2019-05-14 17:30:58 +02:00
Christoph Oelckers
c7877388a9 - made the console Unicode-capable.
This also necessitated some character remapping in the console font to move the Windows-1252 extra characters to their proper Unicode code points.

# Conflicts:
#	src/CMakeLists.txt
#	src/posix/sdl/i_input.cpp
#	src/scripting/backend/codegen.cpp
#	src/v_font.cpp

# Conflicts:
#	src/c_console.cpp
2019-05-14 17:12:18 +02:00
drfrag
7763698166 Revert "- Add stack protection for MinGW."
This reverts commit 9d3326d847.

Forgot to revert this, made it crash on 64 bit windows.
2019-05-06 14:25:10 +02:00
Christoph Oelckers
e245852bff - removed FCriticalSection and replaced all of its uses with std::mutex.
There's really no need for a non-standard solution here anymore with C++11.
This also fixes an unreleased lock in the WildMidi code.

# Conflicts:
#	src/posix/sdl/critsec.cpp
2019-04-28 22:13:36 +02:00
alexey.lysiuk
7fecc973f5 - disabled VM JIT completely on unsuported platforms 2019-04-27 13:47:47 +02:00
Timo Myyrä
b561b72fd0 fix Unix builds without backtrace functions in their libc
backtrace functions are not present in all libc implementations. Cmake has
module to add external libraries into build if needed so use it to fix build on
Unix systems without backtrace in libc.
2019-04-25 13:10:47 +02:00
Christoph Oelckers
d80d4bb228 - moved P_OpenMapData and related content out of p_setup.cpp.
# Conflicts:
#	src/g_levellocals.h

# Conflicts:
#	src/g_levellocals.h
2019-04-18 14:52:24 +02:00
Magnus Norddahl
175b67c088 - fix linking and some linux things 2019-04-18 14:22:11 +02:00
drfrag
ecf1402274 - Fixed linking with MinGW-w64. 2019-04-18 14:00:37 +02:00
Christoph Oelckers
a5e16e3261 - moved a large part of the VM thunks out of p_mobj.cpp. 2019-04-17 14:55:58 +02:00
Christoph Oelckers
1e4c22f8d4 - more direct native entry points. 2019-04-17 14:55:56 +02:00
Magnus Norddahl
ee7d6abdd3 - move the jit runtime to its own file 2019-04-16 14:58:27 +02:00
Christoph Oelckers
178c1a41a6 - moved VM thunks from p_sectors.cpp to a separate file and started adding direct native implementations.
For a few larger functions I took them out of sector_t and made them global functions to avoid creating more unnecessary stubs.

# Conflicts:
#	src/p_sectors.cpp
2019-04-16 12:37:04 +02:00
Christoph Oelckers
4c7096ffac - started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
So far 3 functions for testing implemented.

# Conflicts:
#	src/p_acs.cpp
2019-04-15 21:58:26 +02:00
Magnus Norddahl
9d970a1acb - split JitCompiler into multiple files 2019-04-15 14:32:46 +02:00
Magnus Norddahl
d651c02b17 - embed and use asmjit to JIT ZScript VM functions 2019-04-15 14:31:22 +02:00
ZZYZX
82a2bf3ac5 Single commit - destructible geometry feature
# Conflicts:
#	src/p_setup.cpp
2018-11-01 21:02:25 +01:00
Vitaly Novichkov
72affb2c2e Upgrade libADLMIDI and libOPNMIDI
Added full-panning stereo, improvement of channel management, and many other things.

Also, I have implemented an ability to use custom WOPL (for libADLMIDI) and WOPN (for libOPNMIDI) banks from the same path as "soundfonts", but also, in the same environment, the "fm_banks" folder was added for WOPL/WOPN storing purposes.
To toggle usage of embedded or custom bank, I have added togglable booleans. When bank fails to be loaded, the default embedded bank is getting to be used as fallback.

ADLMIDI 1.4.0   2018-10-01
 * Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for GS way of custom drum channels (through SysEx events)
 * Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
 * Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
 * Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
 * Fixed correctness of CMF files playing
 * Fixed unnecessary overuse of chip channels by blank notes
 * Added API to disable specific MIDI tracks or play one of MIDI tracks solo
 * Added support for more complex loop (loopStart=XX, loopEnd=0). Where XX - count of loops, or 0 - infinite. Nested loops are supported without of any limits.
 * Added working implementation of TMB's velocity offset
 * Added support for full-panning stereo option (Thanks to [Christopher Snowhill](https://github.com/kode54) for a work!)
 * Fixed inability to play high notes due physical tone frequency out of range on the OPL3 chip

OPNMIDI 1.4.0   2018-10-01
 * Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for GS way of custom drum channels (through SysEx events)
 * Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
 * Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
 * Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
 * Resolved a trouble which sometimes makes a junk noise sound and unnecessary overuse of chip channels
 * Volume models support taken from libADLMIDI has been adapted to OPN2's chip speficis
 * Fixed inability to play high notes due physical tone frequency out of range on the OPN2 chip
 * Added support for full-panning stereo option

ADL&OPN Hotfix: re-calculated default banks
The fix on side of measurer of OPL3-BE and OPN2-BE where some instruments getting zero releasing time.

# Conflicts:
#	src/sound/mididevices/music_adlmidi_mididevice.cpp
#	src/sound/mididevices/music_opnmidi_mididevice.cpp
#	wadsrc/static/menudef.txt
2018-10-04 20:25:02 +02:00
drfrag666
c1f0335bb4 - Do not allow the TC_USE_SSE2 option on 64 bit targets. 2018-09-28 13:04:32 +02:00
Kevin Caccamo
188d8704e1 Initial work on OBJ model support
What works:
- Parsing the model
- Constructing geometry (surfaces) for triangulated models

What doesn't:
- Rendering the model
- Building the vertex buffer
- Triangulating quads
2018-09-01 11:15:13 +02:00
Christoph Oelckers
b03c329ec6 - moved all GLDEFS parsing into a dedicated source file.
- split gl_postprocessshader.h in two so that the hardware independent part can be used by GLDEFS without pulling in all of OpenGL.

# Conflicts:
#	src/CMakeLists.txt
#	src/gl/dynlights/gl_glow.cpp
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/textures/gl_texture.cpp
2018-08-19 20:56:49 +02:00
drfrag666
9d3326d847 - Add stack protection for MinGW.
# Conflicts:
#	src/CMakeLists.txt
2018-08-17 01:42:18 +02:00
Vitaly Novichkov
4807ac9e6b Upgrade libADLMIDI and libOPNMIDI
Added ability to switch emulator and it's accuracy level ("enabling of 'run at PCM rate' reduces accuracy, and also reduces CPU usage")
Added draft code for future external banks support (WOPL format for ADLMIDI and WOPN format for OPNMIDI)

ADLMIDI 1.3.3   2018-06-19
 * Fixed an inability to load another custom bank without of library re-initialization
 * Optimizing the MIDI banks management system for MultiBanks (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Fixed incorrect 4-op counter which is still catch 4-op instruments on 2-op banks
 * Fixed an incorrect processing of auto-flags
 * Fixed incorrect initial MIDI tempo when MIDI file doesn't includes the tempo event
 * Channel and Note Aftertouch features are now supported correctly! Aftertouch is the tremolo / vibrato, NOT A VOLUME!
 * Updated DosBox OPL3 emulator up to r4111 of official DosBox trunk (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * The automatical choosing of 4 operator channels count has been improved (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added optional HQ resampler for Nuked OPL3 emulators which does usage of Zita-Resampler library (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)

ADLMIDI 1.3.2   2018-04-24
 * Added ability to disable MUS and XMI converters
 * Added ability to disable embedded MIDI sequencer to use library as RealTime synthesizer only or use any custom MIDI sequencer plugins.
 * Fixed blank instruments fallback in multi-bank support. When using non-zero bank, if instrument is blank, then, instrument will be taken from a root (I.e. zero bank).
 * Added support for real-time switching the emulator
 * Added support for CC-120 - "All sound off" on the MIDI channel
 * Changed logic of CC-74 Brightness to affect sound only between 0 and 64 like real XG synthesizers. Ability to turn on a full-ranged brightness (to use full 0...127 range) is kept.
 * Added support for different output sample formats (PCM8, PCM8U, PCM16, PCM16U, PCM32, PCM32U, Float32, and Float64) (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Reworked MIDI channels management to avoid any memory reallocations while music processing for a hard real time. (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)

OPNMIDI 1.3.0   2018-06-19
 * Optimizing the MIDI banks management system for MultiBanks (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Fixed incorrect initial MIDI tempo when MIDI file doesn't includes the tempo event
 * Fixed an incorrect processing of auto-flags
 * MAME YM2612 now results a more accurate sound as internal using of native sample rate makes more correct sound generation
 * Channel and Note Aftertouch features are now supported correctly! Aftertouch is the tremolo / vibrato, NOT A VOLUME!
 * Added optional HQ resampler for Nuked OPL3 emulators which does usage of Zita-Resampler library (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)

OPNMIDI 1.2.0   2018-04-24
 * Added ability to disable MUS and XMI converters
 * Added ability to disable embedded MIDI sequencer to use library as RealTime synthesizer only or use any custom MIDI sequencer plugins.
 * Fixed blank instruments fallback in multi-bank support. When using non-zero bank, if instrument is blank, then, instrument will be taken from a root (I.e. zero bank).
 * Added support for real-time switching the emulator
 * Added support for MAME YM2612 Emulator
 * Added support for CC-120 - "All sound off" on the MIDI channel
 * Changed logic of CC-74 Brightness to affect sound only between 0 and 64 like real XG synthesizers. Ability to turn on a full-ranged brightness (to use full 0...127 range) is kept.
 * Added support for different output sample formats (PCM8, PCM8U, PCM16, PCM16U, PCM32, PCM32U, Float32, and Float64) (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Reworked MIDI channels management to avoid any memory reallocations while music processing for a hard real time. (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)

(cherry picked from commit ceec12056a)
2018-06-22 19:50:32 +02:00
drfrag666
af4093fe94 - Disabled compiler intrinsics for the VS non SSE2 version, it should work now. 2018-06-22 11:12:11 +02:00
drfrag666
11cb5af07e - Extend the TC_USE_SSE2 option to VS. 2018-06-20 12:07:44 +02:00
drfrag666
f24f5e1bf9 - Clarify SSE2 option for software truecolor. 2018-06-07 20:06:48 +02:00
alexey.lysiuk
d645da3ccf - fixed linking with sanitizer(s) enabled
no more unresolved references to various functions

(cherry picked from commit b5274534d7)
2018-06-03 19:56:19 +02:00
drfrag666
d6369978b9 - Merged "- fixed Windows XP compatibility for MSVC 2017 targets".
Workaround initially implemented for MSVC 2015 is enabled with all Windows XP compatible toolsets regardless of Visual Studio version
(patch by _mental_)
Still it's a VS bug.
2018-05-31 11:00:19 +02:00
drfrag666
c656185069 - Extended workaround for the stat not working issue in v140_xp to v141_xp. 2018-05-29 09:51:12 +02:00
Marisa Kirisame
08d15514d2 Add support for packed Unreal Engine 1 vertex mesh format.
(concatenated "UMSH" signature + datafile + anivfile)
This is pretty much 100% functional by now.
Hasn't been tested on platforms other than Linux yet, though.
Code definitely deserves some cleaning.

(cherry picked from commit f285e550d6)
2018-05-17 13:01:28 +02:00
alexey.lysiuk
ac73549bd2 - use libc++ for all targets on macOS
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
(cherry picked from commit ce18ff1df3)

# Conflicts:
#	CMakeLists.txt
2018-05-10 21:49:07 +02:00
alexey.lysiuk
5f0ecca567 All platform-specific headers are referenced by generated projects
This was already the case on Windows anyway

(cherry picked from commit c264ff05da)
2018-05-10 11:15:37 +02:00
Magnus Norddahl
e519605c7d - Clean up PolyTriangleDrawer API so that it can better support both softpoly and the swrenderer
- Slightly improve how softpoly processes portals
- Pass the vertex transform matrix via a command rather than being part of the drawer args
- Improve zbuffer drawers in the software renderer
- Misc model rendering fixes

(cherry picked from commit 2d51fa5b43)
2018-05-09 10:47:22 +02:00
Rachael Alexanderson
a82f428910 - remove TLS workaround and turn it into an actual error since it is required in order to even properly compile and not all systems properly detect this.
(cherry picked from commit a23259f26a)
2018-05-09 09:54:36 +02:00
drfrag666
be304a4929 - SSE2 instructions were always enabled for certain files. 2018-04-30 12:57:36 +02:00
drfrag666
f04a1cb497 - Added USE_SSE2 compile option for gcc. 2018-04-22 22:41:03 +02:00
drfrag666
54e8bf74ce - Restored dependency on dxguid library for MinGW. 2018-04-22 18:50:12 +02:00
Christoph Oelckers
5c7f2e0217 - removed some dumb CMake script that messed around with Visual Studio's user settings. 2018-03-25 17:51:23 +02:00
Vitaly Novichkov
5acffa693f Merge branch 'master' of git@github.com:coelckers/gzdoom.git
# Conflicts:
#	src/sound/adlmidi/adlmidi.cpp
2018-03-24 23:51:36 +03:00
Vitaly Novichkov
be1b884a04 OPNMIDI: Natively disable embedded MUS and XMI, and MIDI sequencer 2018-03-24 23:46:05 +03:00
Vitaly Novichkov
be81e00722 ADLMIDI: Added built-in ability to disable unneeded MUS and XMI converters
Also embedded MIDI sequencer has been disabled too as it is not needed in GZDoom

I made that to allow easier updates of ADLMIDI into newer versions without of any future troubles and conflicts
2018-03-24 21:26:30 +01:00
Vitaly Novichkov
b6302f5fc9 ADLMIDI: Added built-in ability to disable unneeded MUS and XMI converters
Also embedded MIDI sequencer has been disabled too as it is not needed in GZDoom

I made that to allow easier updates of ADLMIDI into newer versions without of any future troubles and conflicts
2018-03-24 22:45:54 +03:00
Christoph Oelckers
4978d979e8 - fixed Windows version of snd_mididevice.
- removed mus2mis and xmi2mid converters from OPNMidi, because they are not needed.
- moved the data file for OPNMidi into gzdoom.pk3.
2018-03-24 18:29:12 +01:00
Vitaly Novichkov
6308fb311b Added support for libOPNMIDI Playing device 2018-03-24 17:58:47 +03:00
Christoph Oelckers
1c9b08dd44 Merge remote-tracking branch 'remotes/origin/master' into alphatex2 2018-03-23 19:52:48 +01:00
alexey.lysiuk
836b09c933 Added third-party sound headers to CMake generated project 2018-03-23 12:47:37 +02:00
Christoph Oelckers
702e948000 Merge remote-tracking branch 'remotes/origin/adlMIDI' into alphatex2 2018-03-22 20:44:32 +01:00
Rachael Alexanderson
0893f0c01e Merge remote-tracking branch 'origin/master' into adlMIDI 2018-03-22 14:28:54 -04:00
Christoph Oelckers
b473838627 - adjustments and fixes for alphatextures:
* Instead of using the red channel it now uses the grayscale value. While slower in a few situations, it is also more precise and makes the feature more useful.
* For paletted textures do not use the index as alpha anymore but the actual grayscaled color. This is again to make the feature more consistent and useful.
* To compensate for the above there is now a list of hashes for known alpha textures in patch format, so that they don't get broken.
* IMGZ is now considered a grayscale format. There's only two known textures that use IMGZ for something else than crosshairs and those are explicitly handled.
* several smaller fixes.
* the actual color conversion functions for paletted output are now consolidated in a small number of inlines so that future changes are easier to do.

Note: This hasn't been tested yet and will need further changes in the hardware rendering code. As it is it is not production-ready.
2018-03-22 00:29:01 +01:00