Commit graph

861 commits

Author SHA1 Message Date
Christoph Oelckers
e82565373f - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
2019-12-16 23:52:39 +01:00
alexey.lysiuk
194dd3e4cf - fixed debugger visualization for FSoundID 2019-12-10 16:38:37 +02:00
Magnus Norddahl
0f6aec5e99 Some vid_preferbackend compile fixes 2019-12-02 20:12:27 +01:00
Magnus Norddahl
a9e6592feb Switch to the D3DSWAPEFFECT_FLIPEX swap model 2019-12-02 20:05:13 +01:00
Rachael Alexanderson
bdc7329d32 - replace vid_enablevulkan with vid_preferbackend - disabled startup window selector for this (will replace when the startup screen changes are done) 2019-12-01 16:06:36 -05:00
Magnus Norddahl
4a25c9f69b Merge remote-tracking branch 'origin/master' into polybackend 2019-12-01 20:09:19 +01:00
Rachael Alexanderson
20e61ead49 - add Vulkan to the startup box in Windows 2019-11-05 08:57:50 -05:00
alexey.lysiuk
4ae16c27e2 - added Visual Studio debugger visualization for several types 2019-10-23 20:15: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
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
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
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
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
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
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
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
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
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
Magnus Norddahl
a410324084 Merge remote-tracking branch 'origin/master' into polybackend 2019-08-25 11:54:45 +02:00
Christoph Oelckers
66db894866 - split off all music code from s_sound.cpp 2019-08-23 17:15:19 +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
Magnus Norddahl
9da46d0e0a - force this branch to always use the poly backend 2019-07-24 21:45:37 +02:00
Magnus Norddahl
e6f6f10e81 Merge remote-tracking branch 'origin/master' into polybackend 2019-07-24 21:39:07 +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
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
alexey.lysiuk
aba7132846 - cleaned up language detection leftovers 2019-07-13 15:47:43 +03:00
Christoph Oelckers
953e388e1c Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-07-07 08:09:14 +02:00
Magnus Norddahl
259909b6dd - fix querying for the wrong interface when the UNICODE define is set 2019-06-30 21:13:56 +02:00
Magnus Norddahl
6e29d81502 - remove dead code 2019-06-30 21:13:15 +02:00
Christoph Oelckers
1081338af2 - removed a few obsolete definitions from basictypes.h 2019-06-26 22:13:12 +02:00
Christoph Oelckers
e93de62f98 - eliminated dependency of CVar code on AActor.
As a low level feature, the CVAR management should not access game structures like actors, just to retrieve a player index. The index should be calculated by the calling code instead and passed into the function.

# Conflicts:
#	src/win32/i_specialpaths.cpp
2019-06-26 21:28:45 +02:00
Magnus Norddahl
706bc0b7c6 Merge remote-tracking branch 'origin/master' into polybackend 2019-06-23 20:29:04 +02:00
Christoph Oelckers
3030a6d389 - set Visual C++ compiler to use /permissive- mode and fixed the one error this generated.
This also means that Visual Studio 2015 is no longer supported as it has no proper standard conforming compile mode.
2019-06-20 20:25:34 +02:00
Magnus Norddahl
bb47230f79 Merge remote-tracking branch 'origin/master' into polybackend 2019-06-10 22:46:32 +02:00
Christoph Oelckers
2766303cfc - consolidated the 3 atterm implementations.
Each platform had its own copy. Why?
2019-06-10 12:01:01 +02:00
Magnus Norddahl
4a7824c380 - implement vsync and letterbox 2019-05-31 05:22:06 +02:00
Magnus Norddahl
4bbab49e04 - present using direct3d 9 2019-05-30 23:31:39 +02:00
Magnus Norddahl
4fd4bfa092 Merge remote-tracking branch 'origin/master' into polybackend 2019-05-24 19:21:36 +02:00