Commit graph

16154 commits

Author SHA1 Message Date
alexey.lysiuk
5a6d8035d0 - added access check for state functions
Private functions cannot be called from derived classes anymore

https://forum.zdoom.org/viewtopic.php?t=66158
2019-10-19 14:50:36 +02:00
Chronos Ouroboros
1a67899bba Added direct-native versions of the Shape2D linear transform API. 2019-10-19 05:25:31 -03:00
Chronos Ouroboros
f45ade151a Added direct-native versions of the Shape2D API. 2019-10-19 04:41:57 -03:00
alexey.lysiuk
c3dc8ea837 - fixed selection of system MIDI device on startup
https://forum.zdoom.org/viewtopic.php?t=66150
2019-10-18 15:22:58 +03:00
Christoph Oelckers
f7f51e1964 - fixed: The dynamic lights must be initialized before the first frame is ticked.
Otherwise they only show up after the first frame.
2019-10-17 00:11:38 +02:00
alexey.lysiuk
c45e8b32d0 - fallback to console font in case of missing small font
https://forum.zdoom.org/viewtopic.php?t=66102
2019-10-16 09:46:23 +02:00
alexey.lysiuk
d44d91d6a4 - fixed compilation of Cocoa backend with 10.9 SDK
src/posix/cocoa/i_video.mm:68:31: error: property 'delegate' not found on object of type 'id'
src/posix/cocoa/st_console.mm:464:37: error: property 'delegate' not found on object of type 'id'
2019-10-15 22:31:02 +03:00
Major Cooke
d0a256b51c Fixed CheckBossDeath not checking for actor replacements.
- A_BossDeath relies upon this function in particular.
- This completes CheckReplacee's purpose, allowing for varied actors to count as one particular actor, such as a Fatso for map07 and avoid lowering the walls until they are all dead.
2019-10-15 20:44:21 +02:00
Christoph Oelckers
e166563ac9 - removed redundant resource reading. 2019-10-15 18:46:53 +02:00
Christoph Oelckers
4d8f0fc014 - fixed: ZMusic_Close may not lock the mutex because it will delete it.
Here the calling code must ensure that the music object won't be accessible anymore before it gets deleted.
2019-10-15 01:16:02 +02:00
Christoph Oelckers
dc32c2148a - ZMusic interface refactoring.
Use global functions instead of the class interface which exposed too many implementation details.
2019-10-15 00:23:03 +02:00
alexey.lysiuk
30f2ac1e89 - fixed crash with DMSS_INFLICTORDMGTYPE flag and no inflictor
https://forum.zdoom.org/viewtopic.php?t=66110
2019-10-14 13:01:13 +03:00
alexey.lysiuk
29e3222fb3 - updated Cocoa backend to follow single exit point workflow 2019-10-12 14:44:13 +03:00
alexey.lysiuk
bb5ca2ce39 - deleted leftovers of exit refactoring 2019-10-12 12:43:49 +03:00
alexey.lysiuk
b40e0ae38d - made GL nodes loader more resilient to broken data
https://forum.zdoom.org/viewtopic.php?t=66086
2019-10-12 12:41:14 +03:00
alexey.lysiuk
b68a9ebef5 - cleanup SDL fatal error reporting
Output error text to terminal if SDL message box cannot be shown
Removed wrong "No IWAD found" message
2019-10-11 12:03:23 +03:00
alexey.lysiuk
279b327c6c - fixed potential crashes in Linux crash reporter
Do not access various global objects at early stage of initialization and late stage of shutdown
2019-10-11 12:01:36 +03:00
alexey.lysiuk
08a66abde9 - call SDL_Quit() from main() instead of atexit()
This should help with crash reporting during SDL shutdown
2019-10-11 11:56:38 +03:00
drfrag
525d678219 - Fixed capped tall skies not working (Heretic and Hexen).
- Fixed sky stretching for the new freelook limit.
2019-10-09 15:08:39 -04:00
alexey.lysiuk
bfa8e25100 - fixed crash on exiting from IWAD selector
https://forum.zdoom.org/viewtopic.php?t=66073
2019-10-09 15:05:20 +03:00
alexey.lysiuk
d3c50eadaa
- removed test code
https://forum.zdoom.org/viewtopic.php?t=66065
2019-10-08 22:23:43 +03:00
alexey.lysiuk
d87170ed9e
- restored command line arguments initialization in SDL backend 2019-10-08 22:18:47 +03:00
alexey.lysiuk
f678b5d4d6 - fixed crash on closing fatal error window
Framebuffer was accessed after its destruction
2019-10-08 12:39:45 +02:00
alexey.lysiuk
d87f7593b8 - fixed compilation of POSIX targets
src/posix/cocoa/i_main.mm:152:2: error: use of undeclared identifier 'ShutdownJoysticks'
src/posix/sdl/i_system.cpp:128:3: error: ‘I_FatalError_Gtk’ was not declared in this scope
src/posix/sdl/st_start.cpp:329:8: error: ‘CExitEvent’ was not declared in this scope
2019-10-08 10:48:43 +03:00
Christoph Oelckers
523fd0bf3a Revert "AsmJit update"
This reverts commit 747b3dfcfe.

# Conflicts:
#	libraries/asmjit/asmjit/core/compiler.h

This had to be reverted because it breaks exception handling which is a critical problem.
With the updated code any exception thrown inside code that had a JITed call stack would crash.
2019-10-07 20:34:55 +02:00
Christoph Oelckers
2e7af1338c - the big cleanup of the exit cleanup is done!
atterm is gone and only a few system-side functions use atexit.
All game side cleanup is performed in D_DoomMain now.
2019-10-07 20:28:55 +02:00
Christoph Oelckers
6f821a9198 - fixed compilation on Windows. 2019-10-07 18:59:18 +02:00
Christoph Oelckers
ff379e7c0c replaced all 'exit's with an ExitEvent exception
The main exits are initiated from code that cannot filter this back to D_DoomMain easily so the exception is the only way to get there.

The 3 main points of exit are:

* quit/exit CCMD
* quitting the menu through ST_Endoom
* receiving a quit message on the main window.
2019-10-07 01:24:51 +02:00
Christoph Oelckers
5d265d2d88 - don't exit from within a window proc.
This should be handled by the message pump evaluating WM_QUIT which is how Windows suggests this to be done.
2019-10-07 01:11:53 +02:00
Christoph Oelckers
c95a07d2c4 - missed one exit. 2019-10-07 01:10:37 +02:00
Christoph Oelckers
0a611e1992 - refactored the exit calls out of the networking code
These ones were particularly bad examples of misusing the exit handlers by temporarily installing one themselves and then calling exit to clean stuff up.

Now they just return an error code to D_DoomMain to perform a regular exit.
2019-10-07 00:55:14 +02:00
Christoph Oelckers
96006eb94f - moved all exception handling out of the backends
The main catch is now in D_DoomMain, only calling platform specific functions to handle the output for the error.

As a nice side effect, -norun can now be done without an exception, just by exiting D_DoomMain with a special exit code.
2019-10-07 00:37:56 +02:00
Christoph Oelckers
b5fa08bf15 - consolidated I_FatalError functions
This also removes the handling from thr Posix backend and will not compile on non-Windows.
2019-10-07 00:20:07 +02:00
Christoph Oelckers
cd086ae1da - consolidated the 3 I_Error implementations
Debug output is now being handled by the respective interface functions, not by the Windows I_Error itself.
2019-10-07 00:01:12 +02:00
Christoph Oelckers
5a72e0bfb7 - added a new texture class using stb_image to read a more formats.
This implementation only reads GIF, BMP and PIC formats. No animated GIF support because stb_image does not handle that.
PNG, JPG and TGA are still being handled by the existing dedicated implementations.
PSD and HDR are impractical for reading texture data and thus are disabled.
PnM could be enabled, if its identification semantics were stronger. stb_image only checks the first two characters which simply would falsely identify several flats with the right colors in the first two bytes.

This is more or less a waste product of getting stb_image to work with something actually testable, so it is just provided as-is.
2019-10-06 08:37:23 +02:00
Rachael Alexanderson
5cbb1c86ab - add missing information for the drawers, from the wallsprite code. this reverts a revert.
This reverts commit 338430995e.
2019-10-05 14:51:48 -04:00
drfrag
e6c6b617e2 - Fixed crash with wallsprites in the software renderer for real. 2019-10-05 19:18:00 +02:00
drfrag
338430995e Revert "- fixed a crash in the software renderer that caused wallsprites to crash"
This reverts commit 0dea6fcecc.
2019-10-05 19:18:00 +02:00
alexey.lysiuk
46270326be - implemented str(n)icmp function definitions via CMake macro 2019-10-05 14:47:36 +03:00
alexey.lysiuk
9332316c2a - set initial vsync state after creation of framebuffer
https://forum.zdoom.org/viewtopic.php?t=66020
2019-10-04 10:46:52 +03:00
Rachael Alexanderson
0dea6fcecc - fixed a crash in the software renderer that caused wallsprites to crash
(note: there is still a bug with grabbing the texture for these)
2019-10-03 23:32:14 -04:00
alexey.lysiuk
1d9b5cb239 - restored ability to link with thirdparty sound libraries explicitly
DYN_SNDFILE=NO and DYN_MPG123=NO were ignored while DYN_FLUIDSYNTH=NO broke compilation
These options should be applied to ZMusic target instead of the main executable
As a bonus, it's now possible to build GZDoom without FluidSynth
2019-10-03 12:22:46 +03:00
alexey.lysiuk
ad3327bdf5 - fixed compilation of Cocoa backend
src/posix/cocoa/st_start.mm:63:7: error: redefinition of 'FBasicStartupScreen'
2019-10-02 10:57:39 +03:00
Christoph Oelckers
b0acfc3ce6 - split up st_start.cpp into one file with the Windows interface code and a second one which only contains platform independent code.
Since this made heavy use of Windows type, those were duplicated to avoid rewriting the entire interface.
This split at least reduces the amount of code needed to refactor for making the screens work on other platforms than Windows.
2019-10-01 23:00:13 +02:00
Christoph Oelckers
5179a69fdb - don't let Vulkan access the vid_vsync variable directly.
Since the FrameBuffers have a SetVsync method anything these last set must count, not the global variable directly.
2019-10-01 20:50:15 +02:00
Christoph Oelckers
b9d4e77214 - eliminate a little bit of redundancy. 2019-10-01 20:13:40 +02:00
Christoph Oelckers
d2c156224b - cleanup of the sound init/exit code.
Now there is only one single entry point for both, instead of previously 2 entry and 4 exit points.
This also eliminates the explicit shutdown of ZMusic. Timidity++'s two buffers have been put in containers that self-destruct on shutdown and calling dumb_exit is not necessary because the only feature requiring it is not used by any code in the music library.
2019-10-01 20:04:46 +02:00
Christoph Oelckers
86ab366958 - some reformatting on exit code, mainly to make searching for the content easier. 2019-10-01 19:06:28 +02:00
Christoph Oelckers
241a47602b - small fix 2019-10-01 15:24:17 +02:00
Christoph Oelckers
338ae15a4c - sanitized exit code a bit
Instead of trying a homegrown way to avoid recursive exceptions, let's do it with the defined procedure C++ has for this case: call std::terminate.

This allowed removing some old hackery inherited from Boom and will now hopefully allow sanitizing the exit procedure to the point that it can be done without depending on exit handlers.
2019-10-01 01:37:21 +02:00
Christoph Oelckers
ff40bcd178 - moced I_DetectOS call into D_DoomMain
This requires the console and was the reason for this strange setup.
2019-10-01 01:02:49 +02:00
Christoph Oelckers
a1a73ef2b3 - moved the initial C_InitConsole call into D_DoomMain
The only difference here were the size values on Windows but for this initial call they have been useless for a long time. When this code was written the console buffer still had a fixed width that needed to be set before adding any text.
2019-10-01 01:00:37 +02:00
Christoph Oelckers
9f15efc5f5 - also put the Windows system specific exit handlers into atexit's list
Again, these have no place in the game's own uninit code.
2019-10-01 00:51:14 +02:00
Christoph Oelckers
eae593b1f5 - put SDL_Quit into the atexit queue instead of atterm
System exit procedures should not go in there.
2019-10-01 00:44:28 +02:00
Christoph Oelckers
12440bbca3 - new exception class for quitting the game
This will eventually replace the atexit mess, right now it isn't used.
2019-10-01 00:43:12 +02:00
Christoph Oelckers
e7c388dccd - don't throw exceptions before the system isn't initialized
If the window cannot be opened this has no way to report the problem. In this case a message box is needed.
2019-10-01 00:42:21 +02:00
Christoph Oelckers
42a54ef545 - copied the restart cleanup code into its own function 2019-10-01 00:30:44 +02:00
Christoph Oelckers
282047e67c - added a mapping table from DOS-IBM-437 to Unicode
This is for future use, added now so that it won't get lost.
2019-10-01 00:26:07 +02:00
Christoph Oelckers
2a3205200f - reordered a few things in the startup procedure
Mainly done to isolate the calls that actually manipulate the global frame buffer.

V_Init alsoi initialized some palette data, which was moved to V_InitPalette and did something entirely different when running a restart as opposed to an initial start.
2019-10-01 00:21:51 +02:00
Christoph Oelckers
a2883cdf39 - added missing return to the GENMIDI loader. 2019-10-01 00:11:41 +02:00
Braden Obrzut
63f2bf7ae3 - Document limitation of TArray and silence warnings about non-trivial types being trivially moved 2019-09-30 20:45:52 +02:00
Alexander
ff9715c080 add m_quickexit option for quick exit in game menu
Default: off (false)

When this option is enabled (true), then exiting the game from
main menu and by menu_quit command doesn't require confirmation
and doesn't play sound.
2019-09-30 20:07:45 +02:00
Christoph Oelckers
a76cdd0946 - fixed crash with non-looping music ending.
In this case it was the song terminating the stream, with the new setup the main music code has to do this itself.
2019-09-30 19:41:03 +02:00
Christoph Oelckers
83e8e5535d - fixed compilation on Windows. 2019-09-30 18:21:34 +02:00
Christoph Oelckers
2b87941d7d Merge branch 'master' into zmusic_work
# Conflicts:
#	src/sound/music/i_musicinterns.h
2019-09-30 17:48:34 +02:00
Christoph Oelckers
c61e8ada86 - removed the remains of the FModEx-style stream implementation
FMod had MP3/Ogg playback integrated right into itself, and the OpenAL backend tried to replicate this functionality.

This functionality, however, has been removed over two years ago when FMod started breaking things more and more, it was only this backing implementation that was left in.
2019-09-30 03:01:33 +02:00
Christoph Oelckers
2bc72f38cc - renamed a few functions in the public interface of ZMusic. 2019-09-30 02:40:22 +02:00
Christoph Oelckers
02507effe8 - moved the music loader code to ZMusic.
This was the final piece of code reorganization.

What's left is cleaning up the interface.
2019-09-30 02:35:47 +02:00
Christoph Oelckers
c42deda6e6 - cleanup of the remaining music code in the main project 2019-09-30 02:31:12 +02:00
Christoph Oelckers
d0cf21654e - moved the CD Audio code to ZMusic, too.
This was the last player class.
This code was also cleaned up for non-Windows systems where CD Audio is not implemented.
Instead of providing an empty implementation, all related code is now explicitly deactivated.
2019-09-30 02:22:53 +02:00
Christoph Oelckers
352365189f - moved the main music classes to ZMusic
What's left is the CD-Audio playback and some global functions.
2019-09-30 02:10:00 +02:00
Christoph Oelckers
6bfa1bf692 - fixed compilation with XCode and silenced several warnings 2019-09-30 01:51:53 +02:00
Christoph Oelckers
2c33e47988 - hooked up a few more CVARs and other values the music backend needs to know about and moved the MusInfo base class into zmusic. 2019-09-30 01:34:16 +02:00
Christoph Oelckers
7c27cd0c57 - moved the sound system's sound stream for the music out of the song objects.
It is now being handled by the controlling code.
While of no benefit for GZDoom itself, this finally allows to separate the entire music code into a separate, engine independent project that merely provides streamed music data when not playing on a hardware device (WinMM Midi or CD Audio.)
The tight coupling of the music code with the sound backend made this nearly impossible before
2019-09-30 00:02:31 +02:00
Christoph Oelckers
c7b379483e - reordering code a bit to see where the stream must be started. 2019-09-29 22:54:13 +02:00
Christoph Oelckers
d06ec56c2e - a bit of cleanup - moving internal class declarations into the sources.
Now i_musicinterns.h doesn't bleed the entire implementation everywhere anymore.
2019-09-29 22:32:42 +02:00
Christoph Oelckers
b9b706e951 - renamed the configuration file. 2019-09-29 22:03:14 +02:00
Christoph Oelckers
44a6b6e87c - moved all configuration code to zmusic project.
The CVARs are now just getting forwarded without any own logic.
2019-09-29 22:01:19 +02:00
Christoph Oelckers
b7b57b904d - first state of music configuration refactor. 2019-09-29 20:01:57 +02:00
Christoph Oelckers
ab016be6b9 - did a bit of reordering on I_RegisterSong.
The way CDDA was treated as an afterthought made handling of stream songs somewhat problematic, because the state could be unclear.
CDDA is an easily identifiable format so it should be tested first.
2019-09-29 15:10:06 +02:00
Christoph Oelckers
6d7b6fb9fd - moved MIDI format detection and source creation into zmusic project. 2019-09-29 14:47:10 +02:00
Christoph Oelckers
859028b35a - moved the stream sources to zmusic project. 2019-09-29 13:33:09 +02:00
Christoph Oelckers
247346e821 - removed ZDoom dependencies from music_libsndfile.cpp 2019-09-29 13:06:40 +02:00
Christoph Oelckers
cdf2a17c5a - moved the sound decoding code to the zmusic project.
Since this gets used by both the sound backend and the music code it needs to be in a place accessible to both.
2019-09-29 12:48:12 +02:00
Christoph Oelckers
b883d27a1f - XA, too. 2019-09-29 01:44:59 +02:00
Christoph Oelckers
dbabc3c0f6 - ... and the raw OPL format. 2019-09-29 01:31:42 +02:00
Christoph Oelckers
dbb4539f4f - gave music_gme.cpp the treatment. 2019-09-29 01:00:15 +02:00
Christoph Oelckers
5eed3dab59 - dependency cleanup in music_dumb.cpp. 2019-09-29 00:41:13 +02:00
Christoph Oelckers
7468c0f36d - consolidated the different file access interfaces in the backends into one shared version.
This was getting a bit unwieldy. The include path setup is not perfect yet, that's work for later.
(It's about time we're getting C++20 with modules so that this include path madness can be put to an end.)
2019-09-28 23:17:16 +02:00
Christoph Oelckers
d94b63b486 - uncoupled the stream sources from the low level implementation. The entire setup had the stream sources depend on the SoundStream class, severely limiting reusability. This was changed that there is one SoundStream class that uses the StreamSources as mere data source that has no knowledge and no connection to the underlying system, similar to how the MIDI system works. With this there are only 3 top level music classes left - MIDIStreamer, StreamSong and CDSong.
Also made the decode_vorbis function in DUMB a function pointer so that the library does not depend on high level code and can just ignore the vorbis case if no supported.
2019-09-28 21:04:41 +02:00
Christoph Oelckers
cfe89ef6e6 - created a new zmusic library which will eventually contain all the music playback code.
Currently all it contains are the MIDI sources and the MIDI devices, the rest needs to be reworked first.
2019-09-28 18:32:25 +02:00
Christoph Oelckers
fc6eba0c26 - more dependency removal, this time from the MIDI devices. 2019-09-28 16:50:00 +02:00
Christoph Oelckers
820cbcc689 - removed all dependencies on ZDoom code from the MIDI sources (including TArray and FileReader.) 2019-09-28 13:59:46 +02:00
alexey.lysiuk
e00a4a53a6 - fixed compilation of Linux targets
src/sound/music/i_musicinterns.h:111:7: error: no template named 'shared_ptr' in namespace 'std'
src/sound/music/i_musicinterns.h:133:7: error: no template named 'shared_ptr' in namespace 'std'
src/sound/music/i_musicinterns.h:152:7: error: no template named 'shared_ptr' in namespace 'std'
2019-09-28 13:32:31 +03:00
alexey.lysiuk
9f190e76e3 - disabled code signing in Xcode by default
It’s impossible to build GZDoom without valid code signing identity with Xcode 11 using a project
2019-09-28 13:32:31 +03:00
drfrag
634ef60c78 - Fixed player sprites not being affected by sector light level in the classic software renderer. 2019-09-28 10:31:27 +02:00
Christoph Oelckers
d8a1005c76 - fixed typo. 2019-09-28 10:04:09 +02:00
Christoph Oelckers
123ed9d01d - moved the stream handling out of the MIDI device into the MIDIStreamer class.
This isn't the final location but this means that the device is merely a data provider, with the sole exception of the Win32 MIDI device whose unwieldy usage requirements unfortunately dictate much of the needed interface here.
2019-09-28 10:00:22 +02:00
Christoph Oelckers
67169b80e5 - split out the MIDIDevice implementation into its own source file. 2019-09-28 07:47:50 +02:00
Christoph Oelckers
d13766f2ee - fixed a merge error. 2019-09-28 07:47:10 +02:00
Christoph Oelckers
c5f2578ff5 Merge branch 'midi_work_2' 2019-09-28 00:11:54 +02:00
Christoph Oelckers
61bc25d781 - WildMidi also done. 2019-09-28 00:10:39 +02:00
Christoph Oelckers
890db1fbf9 - Timidity++ done. 2019-09-27 22:19:00 +02:00
Christoph Oelckers
1cb668e895 - fixed the GUS MIDI device.
The sound font reader may not be deleted because its ownership is transferred to the instrument set.
The gus_patchdir variable was not transferred to the config struct.
2019-09-27 20:08:03 +02:00
alexey.lysiuk
b5e1656c8e - fixed compilation on Linux
libraries/oplsynth/oplio.cpp:59:32: error: ‘memset’ was not declared in this scope
src/sound/mididevices/midi_cvars.cpp:43:31: error: expected initializer before ‘GetSystemDirectoryA’
2019-09-27 10:21:11 +03:00
Christoph Oelckers
ed7b73d8cb - work on GUS MIDI device plus some cleanup
This is not tested yet!
2019-09-27 02:31:27 +02:00
Christoph Oelckers
b3b870d67e - Gave OPN device the same treatment
Also made some improvements to the interface.
2019-09-27 01:51:05 +02:00
Christoph Oelckers
621945905f - same treatment for the OPL Midi player. 2019-09-27 01:01:52 +02:00
Christoph Oelckers
d67fcd3887 - missed an 'else'. 2019-09-27 00:23:49 +02:00
Christoph Oelckers
647abf040b - cleared FluidSynthMIDIDevice of most ZDoom dependencies. 2019-09-27 00:16:32 +02:00
Christoph Oelckers
8d2c67fe95 - more work on music code
- renamed the FluidSetting functions to ChangeSetting so that they can be used as a generic means to change music player options without overloading the virtual function table for each minor thing.
- pass Printf as a parameter to the MIDI renderer to uncouple it from the main GZDoom code.
- throw exceptions when setting up the renderer fails so that this can be handled consistently for all construction errors here.
- delete FluidSynth handles before the constructor aborts.
2019-09-26 22:30:07 +02:00
Christoph Oelckers
9b0529b8a3 - removed most dependencies on ZDoom code in ADL Midi device. 2019-09-26 21:29:06 +02:00
Christoph Oelckers
d3df422031 - made the OPL synth backend a separate library. 2019-09-26 20:06:39 +02:00
Christoph Oelckers
b085ac3efb - cleaned up the dependencies of the OPL interface layer.
This also removes the OPL dumper because I wasn't able to get any non-broken output from it and have no desire to fix such a niche feature.
2019-09-26 19:33:28 +02:00
Christoph Oelckers
17eac1c57b - removed all ZDoom dependencies from the OPL backend code. 2019-09-26 18:15:23 +02:00
Christoph Oelckers
2aa03e8e8a - removed the global current_opl_core variable and pass the needed info as function parameters
because using global variables for this is really bad style!
This also removes the unused OPLMUSDumper class.
2019-09-26 17:40:39 +02:00
Christoph Oelckers
159b98ea88 - gave the Timidity error functions better names and hooked up the WildMidi version. 2019-09-26 17:22:54 +02:00
alexey.lysiuk
021e548db7 - fixed compilation with Apple Clang as well
src/utility/basictypes.h:39:23: error: unknown type name 'size_t'; did you mean 'time_t'?
2019-09-26 10:56:07 +03:00
Christoph Oelckers
c3f26422df - changed MIDI sources so that they do not have to include i_musicinterns.h anymore.
They were already clean of unwanted external references, but including this file made it hard to keep it that way.
This also moves a few useful definitions around to less 'dirty' headers.
2019-09-25 21:47:33 +02:00
Christoph Oelckers
b8824b572f - adapted the PSX XA decoder from EDuke32 as a music format in GZDoom.
Libsndfile cannot decode this format but tries to play these files as regular WAVs and turns them into noise (Both are in a RIFF container.)
2019-09-25 21:11:00 +02:00
Christoph Oelckers
4ba8da290c - made WildMidi a library. 2019-09-25 19:38:48 +02:00
Christoph Oelckers
a562d69ec3 Merge branch 'wildmidi_cleanup' 2019-09-25 19:21:12 +02:00
Christoph Oelckers
32e1605e17 - fixed WildMidi. 2019-09-25 19:20:22 +02:00
Christoph Oelckers
4369220335 - refactoring of WildMidi to have proper instrument management
Not tested yet, it compiles but may not work as-is.
2019-09-25 17:27:10 +02:00
Marisa Kirisame
8dbddfc365 Fix crash on vulkan with a large number of texture shaders. 2019-09-25 17:46:33 +03:00
alexey.lysiuk
6ab9991e8d - fixed potential resetting of bindings
Quitting GZDoom during initialization could lead to unbound game controls

https://forum.zdoom.org/viewtopic.php?t=65945
2019-09-25 12:21:08 +03:00
Christoph Oelckers
d9e32eb207 - started cleanup work on WildMidi code. 2019-09-24 23:46:27 +02:00
Christoph Oelckers
7962bf189e - made the Timidity(GUS) device a separate library. 2019-09-24 23:43:44 +02:00
Christoph Oelckers
dcef3681d4 - cleaned up the includes in timidity.cpp. 2019-09-24 23:12:38 +02:00
Christoph Oelckers
d557f609cf - cleanup of the TimidityMIDIDevice(GUS) backend code to eliminate the storage in global variables and to remove the dependencies on core ZDoom code.
The organization here is now the same as for the Timidity++ device, i.e. it is the device owning the instruments to give better control over their lifecycle.
2019-09-24 23:08:56 +02:00
Christoph Oelckers
c107657ea8 Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-09-24 11:08:47 +02:00
Christoph Oelckers
fea0f77905 - removed some ZDoomd dependencies from Timidity(GUS) backend
* use std::string instead of FString
* replaced the single use of clamp with std::min/std::max.
* copied MAKE_ID macro into the source.
* use snprintf instead of mysnprintf
* use std::runtime_error instead of I_Error to abort on failed memory allocations.
2019-09-24 11:07:32 +02:00
alexey.lysiuk
ca5ca8e974 - fixed C++ compilation flags applied to C files
This had an effect on 32-bit targets without SSE support
2019-09-24 11:53:18 +03:00
Rachael Alexanderson
7ba485f632
fixed the software resized texture warp problem. (#934)
* - almost nearly fixed the software resized texture warp problem.

* - proposed fix for mipmapping issue for previous commit

* - reduce texture allocation for mipmapped warped textures in the software renderer

* - add a check for the resize mode
2019-09-23 22:37:35 -04:00
Christoph Oelckers
66c9f0902b Merge commit '115d1cb182168bb2c8c29a3650dfc33b08e3e6cb' 2019-09-23 15:21:43 +02:00
alexey.lysiuk
7ec33b6b92 - fixed crash when setting sound pitch on non-existing channel
This applies to a lack of free channels, -nosound command line switch, missing OpenAL library, sound initialization failures, ...

https://forum.zdoom.org/viewtopic.php?t=65926
2019-09-23 15:42:03 +03:00
Christoph Oelckers
115d1cb182 - made the Timidity++ backend a library, now that it has no dependencies on GZDoom anymore. 2019-09-23 14:27:43 +02:00
Christoph Oelckers
56e4c8f213 - handled the final piece where Timidity++ had a direct dependency on GZDoom - the error logging function.
This is npw a function pointer so that a simple stdout printout can be used as default, but allows to override it.
Also added the missing timidity_file.h header.
2019-09-23 14:14:32 +02:00
Christoph Oelckers
98329311b4 - moved the CVars out of the Timidity++ backend. 2019-09-23 13:58:16 +02:00
Christoph Oelckers
cf6d0c3127 - implemented an abstract sound font reader interface for Timidity++.
The only dependency left on the main GZDoom code are the CVars, which will be dealt with next.
2019-09-23 13:53:28 +02:00
Christoph Oelckers
16ab52c5f3 - thinned out the FSoundFontReader interface a bit more by moving the file open code into the FSoundFontReader class itself. 2019-09-23 12:45:26 +02:00
Christoph Oelckers
2cf8cc47df - moved the instrument set maintenance out of the Timidity++ library into the player class.
This removes the dependency on the sound font manager from the low level library, reducing the direct dependencies to FileReader and SoundFontReader.
2019-09-23 11:27:57 +02:00
Christoph Oelckers
df7a4bb0d9 - removed a few dependencies of the Timidity++ code from the main GZDoom code base.
The big issues, i.e. FileReader and SoundFontReader still need to be handled to make this a standalone library.
2019-09-23 10:18:19 +02:00
Christoph Oelckers
b3a9884eb1 - gave libopen the same treatment and made it its own subproject 2019-09-23 10:03:18 +02:00
Christoph Oelckers
84cc7cbdd2 - made libadl its own library subproject.
This is to improve compile times because the MSVC compiler tends to become slow with large lists of source files in a single project.
This new project is still our stripped down copy of libadl, not the original, because that project contains a large amount of baggage we do not need.
2019-09-23 10:03:17 +02:00
drfrag
2a642c66be - Fixed ancient ZDoom savegame slot selection bug. When creating new autosaves LastAccessed and LastSaved were not updated accordingly. 2019-09-19 18:43:18 +02:00
Christoph Oelckers
b709a0b6b2 - fixed: sector lights could access the sector before it was set. 2019-09-16 17:34:41 +02:00
Christoph Oelckers
c8c8fecad3 - fixed a few warnings. 2019-09-16 17:30:39 +02:00
Marisa Kirisame
2628dabc31 Fix for LineTrace not setting its starting sector based on its offset. 2019-09-15 21:58:25 +02:00
drfrag
0cbb08ce84 - Fixed crash with mock2.wad in software. 2019-09-14 13:13:55 -04:00
alexey.lysiuk
e48edf6199 - fixed compilation with MSVC
src\gamedata\resourcefiles\resourcefile.h(77): error C4716:  'FResourceLump::FillCache': must return a value
2019-09-13 17:35:31 +03:00
Rachael Alexanderson
836f774b6c - use drfrag's suggested fix of checking for valid texture access, rather than checking whether it is null, when drawing fog boundaries in the software renderer 2019-09-13 09:18:26 -04:00
Christoph Oelckers
587fd75190 - extended lump injection to allow injecting data into a PWAD's directory, not just the IWAD. 2019-09-13 13:55:53 +02:00
Christoph Oelckers
31aa855a51 - generate a hash identifier for each loaded resource file.
This is not useful by itself but can be used for adding new features later, e.g. mod-wide compatibility settings or file specific lump replacement or injection.
2019-09-13 12:29:17 +02:00
Marisa Kirisame
bcef440511 Squashed commit of the following:
commit 6ecd831eb45a8258995c02664450c3ca8cfe5b48
Merge: a4fb1f61c afbd7f7a2
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 28 22:02:19 2019 +0200

    Merge branch 'master' of github.com:coelckers/gzdoom into f3dfloor_export

commit a4fb1f61c0532d3a6051d4c1fca4ac72ec33e060
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Fri Jul 12 15:43:25 2019 +0200

    Renamed EFFloorType enum in ZScript to the more descriptive EF3DFloorFlags

commit 9ad1c3b5625d53c06229be2a94d44fa0f36f41fd
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 7 20:25:31 2019 +0200

    Add bounds checks to Get3DFloor/GetAttached

commit dd2a7956a887b92ed24ce5e79f10b1a445664d6c
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 7 17:13:44 2019 +0200

    Correct handling of 3d floor plane texture getting.

commit 9b748287892c8fdee9ac67019bf1f66bc4b69eab
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 7 16:14:45 2019 +0200

    Implemented requested changes to F3DFloor exports.
    * Getters for ffloors/attached arrays.
    * Getter for 3D floor top/bottom texture.

commit 6a1482bb0637a70890629e4c13e8759c7a3673f3
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sat Jul 6 13:42:52 2019 +0200

    Renamed exported extsector pointer in Sector struct to something more descriptive.

commit 7c6783d43b898cbd7a01fb2191fd401ed8e8c300
Merge: ff64e04b2 8d36f0a0c
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Mon Apr 29 12:40:44 2019 +0200

    Merge branch 'master' into f3dfloor_export

commit ff64e04b251f23325d2f72bc25c59f34b4cab6fa
Merge: a90947392 5b6bae409
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Apr 21 16:56:18 2019 +0200

    Merge branch 'master' into f3dfloor_export

commit a90947392a27eb1c2dac7005614592ec2f410274
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Mon Feb 4 17:47:25 2019 +0100

    Export F3DFloor structure and related data.
    Small changes to Trace code to better use this struct.
2019-09-11 08:19:19 +03:00
Christoph Oelckers
62b0fc5f4e - give P_ExplodeMissile a damage type when being called from P_DamageMobj 2019-09-09 15:41:09 +02:00
Christoph Oelckers
21a621031b - rename sprite names with '^' in the hires namespace. 2019-09-09 10:52:34 +02:00
Christoph Oelckers
76ee658be4 Made several classes trivially copyable,
Many had leftover non-default constructors/ assignment operators, and some were initialized, even though the initialized data was never used.

In case of FCycler this even caused a default setting to be overwritten when used inside FDynamicLight.
2019-09-09 09:52:33 +02:00
Christoph Oelckers
cbd4479628 - reinstated the old scriptwait implementation as a compatibility option.
Daedalus's MAP19 needs this.
2019-09-07 09:34:50 +02:00
alexey.lysiuk
37fa2e1b67 - fixed initial setup for dynamic light actors
They are attached and actived explicitly during usual actor initialization sequence
Postponed processing applicable to so called user dynamic lights must be skipped for them
RECREATELIGHTS flag handling for dynamic light actors had the opposite effect of deactivating them

https://forum.zdoom.org/viewtopic.php?t=65683
2019-09-02 12:20:13 +02:00
Jan Engelhardt
f16c09badb Make the build work with fluidsynth 2.x. 2019-08-31 21:47:53 +03:00
alexey.lysiuk
f5d2063613 - do thinker profiling of internal dynlights only when they are present
There is no point to output zero calls and/or handle such case in profiling stats calculation
2019-08-31 13:20:10 +03:00
alexey.lysiuk
49b790a8f6 - fixed: saving game to read-only file was erroneously reported as succeeded 2019-08-29 14:34:02 +03:00
hdr88
554eb1c813 Add current, max and average velocity as stat (#912)
* Add current, max and average velocity as stat
2019-08-28 20:33:07 +02:00
alexey.lysiuk
98128d9fa3 - added ability to specify deprecation messages in ZScript
It's an optional extension of deprecated keyword:
    deprecated("2.4", "use ModernFunction instead") int OldFunction();
    deprecated("3.5", "use ModernVariable instead") int OldVariable;

Usage of such members will produce the following report:
    Script warning, ":zscript.txt" line 123:
    Accessing deprecated function OldFunction - deprecated since 2.4.0, use ModernFunction instead
    Script warning, ":zscript.txt" line 456:
    Accessing deprecated member variable OldVariable - deprecated since 3.5.0, use ModernVariable instead
2019-08-28 13:37:48 +02:00
Vitaly Novichkov
1a070d12a1 GME update with bug-fixes
- True fix for infinite loops [please verify!]
- True fix for KSS silence
- Fix for HES distorted and unstable/random tempo
2019-08-25 15:38:39 +03:00
Magnus Norddahl
7d73616fda - release any references to command buffer when flushed 2019-08-25 12:12:29 +02:00
Magnus Norddahl
a410324084 Merge remote-tracking branch 'origin/master' into polybackend 2019-08-25 11:54:45 +02:00
alexey.lysiuk
cc1f18a328 - fixed crash on parsing bad hex number
https://forum.zdoom.org/viewtopic.php?t=65718
2019-08-25 11:21:44 +03:00
alexey.lysiuk
574e079f17 - use own implementation of iswalpha() function
Character classification is no longer affected by quirks of standard library implementation
Lookup table for own function was generated with Python thanks to Unicode Database module from its standard library
Explicitly set locale for POSIX targets was reverted to C

https://forum.zdoom.org/viewtopic.php?t=65641&start=18#p1115930
2019-08-24 20:52:24 +02:00
Christoph Oelckers
48f2105cd1 - moved a few CCMDs from i_sound.cpp to s_sound.cpp. 2019-08-23 21:57:56 +02:00
Christoph Oelckers
45f6ed4cd1 Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-08-23 16:03:15 +02:00
Christoph Oelckers
66db894866 - split off all music code from s_sound.cpp 2019-08-23 17:15:19 +02:00
alexey.lysiuk
80ef9ca686 - set locale to US English UTF-8 for POSIX targets
Locale-dependent standard library functions didn't treat UTF-8 strings correctly, e.g. iswalpha() returns 0 for any non-latin letter
The same function from MSVC runtime classifies such characters as alphabetic even with C locale

https://forum.zdoom.org/viewtopic.php?t=65641&start=18#p1115930
2019-08-23 12:11:25 +03:00
Christoph Oelckers
1595bf30c6 Revert "- removed a few redundant includes"
This reverts commit 7cd5bd9773.

This commit was only meant for testing, not for publishing
2019-08-23 08:31:49 +02:00
Christoph Oelckers
7cd5bd9773 - removed a few redundant includes 2019-08-22 21:15:06 +02:00
alexey.lysiuk
c3edfdd946 - temporary solution to fix build of non-MSVC targets
Precompilation of prefix header for GCC and Clang requires some efforts thanks to CMake which doesn't support this feature out of the box
Existing thirparty solutions must be tuned to our needs, and our configuration should be adjusted to a chosen module
2019-08-22 11:30:40 +03:00
Christoph Oelckers
a56bdda3f0 Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-08-21 22:27:19 +02:00
Christoph Oelckers
b3deb30fa5 - changed license of portal.cpp to GPLv3
- list Eternity Engine as a source of some code in the main README.
2019-08-21 21:31:12 +02:00
Christoph Oelckers
13d031196b - removed redundant include. 2019-08-21 21:07:00 +02:00
alexey.lysiuk
772adc86be - fixed missing #include's for targets without precompiled header
src/utility/palette.cpp:76:21: error: ‘DBL_MAX’ was not declared in this scope
src/utility/palette.cpp:84:76: error: ‘pow’ was not declared in this scope
src/utility/palette.cpp:89:41: error: ‘abs’ was not declared in this scope
src/utility/palette.cpp:92:3: error: ‘fdist’ was not declared in this scope
src/utility/palette.cpp:196:46: error: ‘memcpy’ was not declared in this scope
src/utility/palette.cpp:298:19: error: ‘floor’ was not declared in this scope
2019-08-21 10:14:09 +03:00
Christoph Oelckers
b1953585fe - remove doomtypes.h include from files.h. 2019-08-20 23:14:00 +02:00
Christoph Oelckers
0abc66dbff - uncoupled the decompressors from ZDoom's internal error handling.
This code made it hard to repurpose this code for other tools, so now the error handler must be passed as a callback to OpenDecompressor.
2019-08-20 23:14:00 +02:00
Christoph Oelckers
3cfda930ea - removed all Doom specific dependencies from cmdlib.cpp/h.
This meant moving CleanseString and ParseHex elsewhere and removing the I_Error call from ScanDirectory.
2019-08-20 23:12:23 +02:00
Christoph Oelckers
38fec546a7 - moved the generic palette utilities and the matrix class to 'utility' 2019-08-20 23:05:20 +02:00
Christoph Oelckers
cf15ebc966 - inlined the entire ColorMatcher. 2019-08-20 23:05:19 +02:00
Marisa Kirisame
f9a41cf11e The wrong pointer was passed to ProcessMidPrint, which resulted in a crash. 2019-08-20 19:08:05 +02:00
Petr Kobalicek
747b3dfcfe AsmJit update 2019-08-19 21:02:36 +02:00
Christoph Oelckers
8b6c051bf8
Merge pull request #907 from OrdinaryMagician/sbar_overrides
Allow status bars to override notifications/prints/chat prompt
2019-08-19 19:45:09 +02:00
Marisa Kirisame
14dc288f22 Allow custom status bars to override notifications, centered prints and chat prompt. 2019-08-19 11:19:36 +02:00
Christoph Oelckers
1a94e169ff - changed colors for crosshair health display to keep this in line with other health indicators on the HUD.
Use green for 100% health, not 200% and move toward blue for higher health.
2019-08-18 19:28:40 +02:00
Hugo Locurcio
61badfd694 Improve crosshair health color to be more informative
With `crosshairhealth 2`, the crosshair will now
go from white to yellow, then yellow to red as the player's health
decreases. As the player's health increases up to 200, the crosshair
will also go from white to green to indicate overheal.
This is similar to the implementation in games like Xonotic.

The old behavior (`crosshairhealth 1`) is still the default.
2019-08-18 19:09:52 +02:00
Christoph Oelckers
94179a11f5 - fixed the PR. 2019-08-18 18:45:18 +02:00
cuttlefish
e4896e343b - Converts keyboard turnspeeds into global CVars 2019-08-18 18:30:37 +02:00
Christoph Oelckers
1dde2ef597 - added obituary fallbacks for actors that do not have any defined.
This is mainly for Dehacked mods which redefine decorations as monsters.
The fallback names are DEFOB_{classname} or DEFITOB_{classname}.
2019-08-18 18:28:09 +02:00
Christoph Oelckers
5c4e8783e9 - removed the internal WildMidi player object cleanup code.
This was solely meant for the original WildMidi player but got seriously in the way of how this code gets used by GZDoom. In GZDoom the player object is owned by the MIDI devive which should be the only instance which is allowed to destroy it.
2019-08-18 16:12:52 +02:00
Christoph Oelckers
ca805016c8 - fixed bad default alpha for 3D floors.
This is a byte value, therefore the default must be 255, not 65536.
2019-08-18 15:04:34 +02:00
Christoph Oelckers
9210811b74 - patch the token 'texture2d' in GLSL sources.
This builtin function no longer exists outside of backwards compatible GLSL compilers so it needs to be remapped to 'texture' so that user shaders still using it can compile.
2019-08-18 14:50:37 +02:00
Christoph Oelckers
ae57bc71d4 - fixed attached dynamic light setup.
This was only run on a state change and missed every external light change.
Any place which wants to flag a light change now only will set a flag and at the end of the thinker loop all flagged actors will be processed.
For performance reasons this was merged with the P_RunEffects iterator loop.
2019-08-18 13:48:52 +02:00
alexey.lysiuk
6e8ee9a684 - applied texture use type to special font with translation disabled 2019-08-18 11:44:00 +03:00
alexey.lysiuk
ce536485e1
- fixed typo in MAPINFO parser warning 2019-08-18 08:58:18 +03:00
alexey.lysiuk
a892e1f506 - added missing space character to script parser's message 2019-08-17 11:55:35 +03:00
alexey.lysiuk
c95a555f5e - added check for multiple parsing of the same MAPINFO
Warning message is issued when such case is detected
2019-08-17 11:53:29 +03:00
alexey.lysiuk
a5e10fd863 - remove '... is already the default skill' error 2019-08-17 11:49:16 +03:00
Patryk Obara
4c98b69b6b - use fallback implementation for C++ aligned_alloc
This function was introduced in C++17, then backported to older versions
of glibc++ library, but is not available in older releases (it's missing
from Ubuntu 12.04 derived SteamRT for example).
2019-08-16 20:44:29 +03:00
alexey.lysiuk
f317f69776 - added ability to enter main menu from credits screen via controller
There was only one way to enter main menu (by pressing Escape button) from the last intermission screen after episode's end
Controller's buttons that are usually assigned to this action, Start and Back by default, now open main menu as well

https://forum.zdoom.org/viewtopic.php?t=65632
2019-08-16 10:45:19 +03:00
Rachael Alexanderson
0d2bdfca99 - fix typo 2019-08-15 21:27:11 -04:00
alexey.lysiuk
28ea567c22 - fixed doubling of deprecation warnings for ZScript code
https://forum.zdoom.org/viewtopic.php?t=65617
2019-08-15 16:31:50 +03:00
alexey.lysiuk
06e0c88622 - exposed xBRZ scaler options as CVARs
Added 5 xbrz_... CVARs to control various settings of upscaling process

Added xbrz_colorformat CVAR for buffered (zero) and unbuffered (any other value) color format
The first one requires a restart because settings are applied once to a precalculated buffer
The second one has reduced performance with ability to apply settings on-the-fly
2019-08-14 23:00:53 +03:00
alexey.lysiuk
afab181505 - updated xBRZ scaler to version 1.7
https://sourceforge.net/projects/xbrz/
https://sourceforge.net/projects/xbrz/files/xBRZ/xBRZ_1.7.zip

https://forum.zdoom.org/viewtopic.php?t=65596
2019-08-14 22:51:44 +03:00
alexey.lysiuk
0cae5fc6e4 - removed type punning from xBRZ scaler integration
it was a hack that wouldn't work with xBRZ 1.7
2019-08-14 22:50:38 +03:00
Christoph Oelckers
347f6cf89a - 4.3pre 2019-08-13 17:48:36 +02:00
Christoph Oelckers
6cce1f1e52 - fixed uninitialized alpha channel in palette for savegame images. 2019-08-11 21:26:08 +02:00
Christoph Oelckers
5e4de10f97 - fixed survey data retrieval for Vulkan. 2019-08-11 21:26:08 +02:00
Christoph Oelckers
6cc9434788 - added checks for the special hacky quicksave marker. 2019-08-11 18:37:32 +02:00
Christoph Oelckers
cf74118d53 - fixed the extremely long standing bug that Lost Souls didn't reacquire their target when slamming into something.
This was one of that annoying old design mistakes where Doom and Heretic features were poorly merged together. The Heretic Gargoyle uses very similar coding but performs a subtly different action when actually hitting another actor. This different action was made the default, even for the Lost Soul.
It has now been changed that both monsters use their original action, being distinguished by an actor flag. For compatibility with custom definitions Heretic's behavior, which has been the default in ZDoom will be the preferred one. The one of the Lost Soul can be reactivated by a flag.
2019-08-11 09:00:29 +02:00
Christoph Oelckers
5953f492c1 - fixed: The OriginalSmallFont must always be created, even when the actual SmallFont is not the IWAD default. 2019-08-10 20:09:04 +02:00
alexey.lysiuk
07a2331ca3 - exposed Append() method to ZScript dynamic array
https://forum.zdoom.org/viewtopic.php?t=65570
2019-08-10 16:37:40 +03:00
Christoph Oelckers
541dcab89a - for debug builds run the survey code every time if enabled, but do not send survey data. 2019-08-09 23:18:28 +02:00
Christoph Oelckers
817190458d - fixed survey request. 2019-08-09 21:42:00 +02:00
Christoph Oelckers
3b4184816b - do not blur the background for portrait-less conversations. 2019-08-09 15:22:52 +02:00
Christoph Oelckers
1e4a32004b - fixed bad texture canvas checks when in truecolor software rendering. 2019-08-09 13:59:54 +02:00
Christoph Oelckers
53c2d7e8d2 - fixed: in order to ensure that all font characters are of texture type FontChar it is necessary to clone the texture instead of changing its use type.
The use type is being used for texture lookup, so changing this alters the texture lookup rules and may cause return of incorrect textures.
This also ensures that context depending upscaling rules get used, because FontChars are separate from regular textures.
2019-08-09 11:40:21 +02:00
Christoph Oelckers
afe4a45a76 - fixed: The frozen state was not reset when the global level variable was reset. 2019-08-09 10:39:09 +02:00
Christoph Oelckers
14a21c2a7e - made some changes to the survey code to give clearer output and removed a few obsolete things that are no longer relevant. 2019-08-09 10:18:15 +02:00
Christoph Oelckers
c3e3fda94a - fixed handling of the "ouch" face.
This depended on order of execution, taking the health values to compare from variables which were not synchronized properly.
Now both the last and current health being used here are being retrieved in the same place so that further changes cannot break this again.
2019-08-09 09:58:40 +02:00
Christoph Oelckers
5ca1bb3979 - fixed an inconsistency with missiles bouncing off actors.
They exploded when hitting a side but not when hitting top or bottom. Changed so that they always explode now.
2019-08-09 09:36:50 +02:00
Christoph Oelckers
a239675fb5 - fixed incorrect write barrier in sound sequence code. 2019-08-09 08:42:36 +02:00
Christoph Oelckers
8447525019 - fixed: Takedown of an expired HUD message did not properly detach it from the list. 2019-08-09 08:32:23 +02:00
Magnus Norddahl
d1026e4b5b - call vkDeviceWaitIdle before RAII tears down buffers 2019-08-08 20:56:11 +02:00
Christoph Oelckers
3c449f3908 - delete the teaser logs from SVE.WAD.
The way Strife has been set uo, it is not possible to have the full game and the teaser coexist without hackery.
2019-08-07 19:22:06 +02:00
Christoph Oelckers
43041c21d8 - made author names work with title patches.
Most importantly, specifying a patch may optionally disallow showing the autor's name - this is for cases where a styled patch gets used for English but text-based translations of the map name should still be possible.
2019-08-07 12:09:47 +02:00
Magnus Norddahl
7746b2c6fd - add light array 2019-08-06 07:15:07 +02:00
Magnus Norddahl
b34658d4d8 - fix out of bounds crash 2019-08-06 06:21:37 +02:00
Magnus Norddahl
eb127d0dac - implement more shaders 2019-08-06 04:51:37 +02:00
Magnus Norddahl
4e24fdacf0 - implement more of the default shader 2019-08-05 23:31:56 +02:00
Magnus Norddahl
82a17572ef - implement getTexel part of main.fp 2019-08-05 19:32:54 +02:00
Christoph Oelckers
be0478972a Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-08-05 19:15:16 +02:00
Magnus Norddahl
b17351cda4 - implement blend functions 2019-08-05 08:37:22 +02:00
Magnus Norddahl
f73470dcf4 - rewrite screen triangle drawer to be more modular and better support the hwrenderer shaders 2019-08-05 03:23:04 +02:00
alexey.lysiuk
d9dcc26dc6 - set default magnification filter for Metal layer to nearest
Magnification filter is applied to swapchain image when it's copied to a physical display surface
This is needed for gfx-portability because MoltenVK uses nearest sampling by default
2019-08-04 13:37:47 +03:00
Magnus Norddahl
ebe377e5de - remove TriDrawTriangleArgs::uniforms as it is redundant 2019-08-04 02:57:08 +02:00
Magnus Norddahl
7940d5fe01 Merge remote-tracking branch 'origin/master' into polybackend 2019-08-04 02:22:55 +02:00
alexey.lysiuk
c05ef39718 - do not set use type on font texture if it is used as a sprite
Setting texture use type in this case would break actors that use the corresponding sprite

https://forum.zdoom.org/viewtopic.php?t=65509
2019-08-03 15:42:06 +03:00
alexey.lysiuk
ff4bc8bab9 - use EXT_metal_surface extension for Vulkan surface creation
Prefer EXT_metal_surface over deprecated MVK_macos_surface extension, and use it only when modern one is not available
2019-08-03 13:16:12 +03:00
alexey.lysiuk
cf81ab465e - updated Vulkan headers to version 1.1.114
This is the latest version released with Vulkan SDK
New headers are needed for EXT_metal_surface
2019-08-03 10:52:04 +03:00
alexey.lysiuk
5870cb7ea1 - recreate Vulkan swapchain in case of surface lost error
Do not abort with fatal error when VK_ERROR_SURFACE_LOST_KHR was returned from vkAcquireNextImageKHR() or vkQueuePresentKHR()
So far, only gfx-portability implementation is reporting this error from time to time, usually on startup, entering the game, or task switching
2019-08-02 10:21:06 +03:00
Christoph Oelckers
3e99216967 - added option to print a map author's name on the summary screen
For now only with font-printed map names. Allowing this with titlepatches will require more work and an option to disable.
2019-08-02 09:11:40 +02:00
Christoph Oelckers
154af34cd9 - added an option to always display the log and the subtitles with the generic font.
If this is on it will disable the status bar's pop screen for the log and always use the HUD overlay instead.
2019-07-31 17:02:39 +02:00
Christoph Oelckers
c36dc137ba - made adjustments to the text placement on the summary screen.
With extended fonts much of the old code did not work anymore, this needed more precise checks for the sources of the printed texts.
2019-07-30 10:53:02 +02:00
alexey.lysiuk
370f5ef234 - fixed writing of texture matrices in Vulkan render backend
https://forum.zdoom.org/viewtopic.php?t=65479
2019-07-30 11:46:14 +03:00
Christoph Oelckers
afbd7f7a24 - increased StreamBuffer size because I got it to crash with comatose.wad once due to an overflow here. 2019-07-28 19:05:39 +02:00
Magnus Norddahl
ad8c5bb96e - add VkRenderPassManager::GetVertexFormat so that all VkRenderState access is done through functions that can then be made thread safe 2019-07-28 17:20:49 +02:00
Magnus Norddahl
76675a4d61 - add VkMatrixBufferWriter so that both buffers are used same way in VkRenderState 2019-07-28 17:04:56 +02:00
Magnus Norddahl
4adac3fe59 - move streaming uniform buffers out of VkRenderState 2019-07-28 16:28:43 +02:00
Christoph Oelckers
c577f1d743
Merge pull request #899 from khutchins/master
Adds option to use a quicksave rotation
2019-07-28 08:44:21 +02:00
Kevin Hutchins
5cb59018e0 Adds option to use a rotation of quicksaves instead of having one quicksave slot that needs to be manually created. 2019-07-27 12:09:55 -07:00
alexey.lysiuk
a308becb48 - pass NSView instance when creating macOS Vulkan surface
MoltenVK allows passing a layer, although Vulkan specs prohibit this
https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkMacOSSurfaceCreateInfoMVK.html

This helps with testing of renderer using Vulkan Portability Implementation
2019-07-27 12:55:05 +03:00
Christoph Oelckers
86d2742798 - allow switching the Strife conversation screen to the VGA font for all languages by a CVAR.
This is for readability purposes because the styled SmallFont may be problematic for some players.
2019-07-26 20:23:46 +02:00
Christoph Oelckers
495f2d9c82 - changed subtitle duration to last at least 7 seconds, even for shorter sounds so that there is sufficient time to read them. 2019-07-26 20:18:01 +02:00
alexey.lysiuk
222dfd17b7 - added ability to specify display duration of subtitles
Duration of sound playback and subtitles display will be synchronized if sound id is specified
For existing Strife messages this works out of the box

https://forum.zdoom.org/viewtopic.php?t=65379
2019-07-26 20:11:42 +02:00
Magnus Norddahl
97a4f25771 - hook up dynamic lights 2019-07-25 04:19:05 +02:00
Magnus Norddahl
a55412fcf6 - fix crash when rendering models 2019-07-24 23:25:48 +02:00
Magnus Norddahl
ec82f994f7 - hook up software renderer 2019-07-24 22:13:00 +02:00
Magnus Norddahl
9da46d0e0a - force this branch to always use the poly backend 2019-07-24 21:45:37 +02:00
Christoph Oelckers
4cfc650f5b - fixed line breaking on non-spaces for multi-byte UTF-8 characters.
This needs to backtrack the entire code point, not just one byte.
2019-07-24 21:40:17 +02:00
Magnus Norddahl
e6f6f10e81 Merge remote-tracking branch 'origin/master' into polybackend 2019-07-24 21:39:07 +02:00
Major Cooke
15eabfd055 Added A_SoundPitch and an optional pitch parameter to A_PlaySound and S_Sound.
- Note: Because sound channels are not in zscript, there's no way to modify a sound made by S_Sound.
2019-07-24 20:15:24 +02:00
alexey.lysiuk
435f0bb0b0 - fixed crash on player unmorph after falling death
Rearranged conditions to avoid accessing player from obsolete morphed pawn
Unmorphing upon death resets player in morphed actor, so player alive state should be tested first
Removed duplicate health check as well

https://forum.zdoom.org/viewtopic.php?t=65429
2019-07-23 12:10:16 +03:00
Christoph Oelckers
c262591f0e - added alternative character mapping for Greek letters.
Although not really needed yet, this allows striking 19 characters off the support list, except for the Raven fonts without any real work.
2019-07-18 21:40:04 +02:00
3saster
5eb2a6b681 FPS counter no longer blocks level time on automap
Respects HUD & Console scaling
2019-07-18 10:41:23 +02:00
Christoph Oelckers
9219834a1a Revert "- fixed the calculations which decide whether to use an options menu for skills and episodes."
This reverts commit d308a1223b.

This does not work because the menu treats negative coordinates differently.
On top of that, changing size of the episode and skill menus dynamically depending on screen size is causing secondary problems so this is better reverted to the previous state.
2019-07-17 21:10:29 +02:00
Christoph Oelckers
95349822c4 - for the map name on the automap, fall back to the original SmallFont if the actual one cannot print it.
This is mainly for mods which provide a new font but do not alter the automap texts, a good example is Hell Revealed 2.
2019-07-17 20:28:07 +02:00
Christoph Oelckers
b37acef0c9 - added the two missing subtitle texts for Strife.
These are identical to the actual logs but it turned out that these texts need to be separate to avoid misbehavior.
This also disables the subtitles for the teaser because its log numbers collide with the full game.
2019-07-17 20:02:43 +02:00
Christoph Oelckers
77b1ebe0d7 - moved several IWAD dependent files into the game_support resource
* sprite offset definitions, which are IWAD dependent
* Freedoom's decal overrides
* conversation ID definitions for the Strife teasers
* the fallback BigFont now can also be loaded by IWADs which declare themselves as GAME_Heretic or GAME_Hexen.
2019-07-17 00:54:59 +02:00
Christoph Oelckers
9de462ee07 - renamed zd_extra.pk3 to game_support.pk3 2019-07-16 22:24:43 +02:00
Christoph Oelckers
56d03c8223 - remove test code. 2019-07-16 21:53:53 +02:00
Christoph Oelckers
38a1a05af3 - moved iwadinfo.txt to zd_extra.pk3.
This was done for two reasons:

1. It forces loading of zd_extra.pk3 for the stock IWADs, eliminating a certain kind of user error.
2. It removes the stock IWAD definitions for custom games that distribute the engine along with their data, so that it doesn't pick up on Steam and GOG installations and shows an inappropriate IWAD picker.
2019-07-16 20:22:15 +02:00
alexey.lysiuk
36ed7e5182 - fixed UMAPINFO episode parsing
* bounds checking for accessing episode tokens
* support empty tokens in episode definition
* handle upper cased episode shortcut

https://forum.zdoom.org/viewtopic.php?t=65364
2019-07-16 12:39:36 +03:00
alexey.lysiuk
b935218dc2 - fixed: subtitles background renains visible on new game
https://forum.zdoom.org/viewtopic.php?t=65366
2019-07-16 11:37:41 +03:00
Christoph Oelckers
7916cebdc1 - merged the Hacx extra stuff into zd_extra.pk3 and added the ability to inject data into the resource directory after the IWAD so that the base resources can provide content that can override IWAD data if broken or not usable.
Hacx in particular needs this to fix a handful of buggy actors and to override the IWAD's MAPINFO which is not localizable.
2019-07-15 21:23:46 +02:00
Christoph Oelckers
8177583e2f - treat configurations which load a secondary WAD on top of a primary IWAD like SVE to consider the secondary WAD an actual IWAD as well.
This fixes localization of the SVE menu.
2019-07-15 20:48:00 +02:00
drfrag
416f5d03b7 - Fixed compilation with MinGW. 2019-07-15 19:26:25 +02:00
alexey.lysiuk
f25e5c738c
- fixed compilation of Linux targets
src/../libraries/gdtoa/gdtoa.h:67:19: fatal error: arith.h: No such file or directory
2019-07-14 22:29:38 +03:00
Christoph Oelckers
7346288bf5 - moved some more files. 2019-07-14 21:09:49 +02:00
Christoph Oelckers
4d35adbcd6 - unused macro removal. 2019-07-14 20:44:17 +02:00
Christoph Oelckers
7351a76404 - move sound files to sound folder. 2019-07-14 17:48:55 +02:00
Christoph Oelckers
293aa2e6da - There's really no need anymore to dynamically load RawInput, considering it has been in Windows since XP. 2019-07-14 17:41:25 +02:00
Christoph Oelckers
79ad3e6203 - define _WIN32_WINNT to 0x600 (Vista) in the CMake project instead of littering all files with inconsistent settings for the target version. 2019-07-14 16:55:01 +02:00
Christoph Oelckers
f50e402e92 - sorted sound backend code into subdirectories. 2019-07-14 16:07:18 +02:00
Christoph Oelckers
ed6ab39b2d - moved third party library projects to a subfolder to reduce size of the root. 2019-07-14 15:06:54 +02:00
Christoph Oelckers
ec52e90e54 - moved more files out of the root src directory. 2019-07-14 14:39:21 +02:00
Christoph Oelckers
2a16fb9d28 - moved most remaining playsim code into its proper folder. 2019-07-14 13:59:16 +02:00
Christoph Oelckers
9045615a7a - renamed g_shared folder to playsim. 2019-07-14 13:24:18 +02:00
Christoph Oelckers
cd7438c02e - made some adjustments to the text spacing on the level summary screen.
With the extended fonts some parts here caused too large gaps.
2019-07-14 12:44:42 +02:00
alexey.lysiuk
053736363d - extended list of predefined filenames for SDL2 shared object lookup
https://forum.zdoom.org/viewtopic.php?t=65348
2019-07-14 10:52:32 +03:00
Christoph Oelckers
2fd170b06e - allow setting the font used for the status screen's content text.
This was needed to give Hacx's screen the proper colors.
2019-07-14 09:08:19 +02:00
Christoph Oelckers
b087f3f4ed - added Hacx localization support.
Unlike the other games this required a bit of patching of the IWAD's data with a new MAPINFO so it needs to be in a separate .pk3 file loaded after the IWAD.
Since this needs to be loaded after the IWAD it was also possible to add a small DECORATE lump which fixes a few errors inherited from the original Dehacked patch, like monster counting bugs and unintentionally shootable decorations.
2019-07-13 20:29:29 +02:00
alexey.lysiuk
aba7132846 - cleaned up language detection leftovers 2019-07-13 15:47:43 +03:00
Christoph Oelckers
0eb9f18e9f - fixed: The countdown for the subtitles display was never counted down so the messages remained forever. 2019-07-12 20:13:45 +02:00