Commit graph

14643 commits

Author SHA1 Message Date
Christoph Oelckers
f49c6cbde2 - use sector_t::GetHeightSec consistently and optimize it.
This was all over the place, with half of it using the function and half doing incomplete checks on the underlying variables.
Also did some optimization on the IGNOREHEIGHTSEC flag: Putting it on the destination sector instead of the model sector makes the check even simpler and allows to precalculate the effect of 3D floors on the heightsec, which previously had to be run on every call and made the function too complex for inlining.
2018-05-01 09:47:09 +02:00
Christoph Oelckers
3c49804c6c - some Transfer_Heights related optimizations.
* only call hw_CheckViewArea if the result is not known yet.
* check the map up front if it even contains heightsecs. This allows to shortcut the above check entirely for maps without sector transfers and will allow further optimizations.
2018-05-01 09:02:24 +02:00
Christoph Oelckers
b35213741f - don't force the renderer to remain active in windowed mode when in the background.
It's ok to have this as an option, but not as an unconditional forced feature.
2018-05-01 07:48:59 +02:00
Christoph Oelckers
af76e9a9c4 - allow animated title pics.
This also applies to all other images shown in the title loop as well.
2018-04-30 23:48:59 +02:00
Christoph Oelckers
7aea010892 - added a sector index to the subsector struct.
This will be used to process dynamic lights for flats in the processing pass, allowing to remove the lights-only pass entirely.
2018-04-30 23:48:16 +02:00
Christoph Oelckers
ecb1578a7a - changed model lighting setup to be done in the processing pass.
This eliminates the different code paths for GL3 and GL4.5.
2018-04-30 23:06:48 +02:00
Christoph Oelckers
fbbf2f8346 - fixed a few things in the weapon drawer. 2018-04-30 21:42:36 +02:00
Christoph Oelckers
2b5019ea6e - fix for rendering a brightmapped 2D texture with ColorIsFixed render style.
This must disable the brightmap.
2018-04-30 21:28:06 +02:00
Christoph Oelckers
1baf3ccbf6 - removed obsolete readme. 2018-04-30 19:10:33 +02:00
alexey.lysiuk
c821b9c2d6 Updated JPEG library to version 9c
Reestablished a few initially removed features to use library's source code without modifications and updated readme file accordingly

http://www.ijg.org/
http://www.ijg.org/files/jpegsrc.v9c.tar.gz
2018-04-30 18:21:41 +02:00
Hisymak
07586af6d1 Fix OPL Synth note cutoffs and issues after removal of MusLib
This should fix bug reported in https://forum.zdoom.org/viewtopic.php?
f=104&t=56682.
There were two problems:
1. Algorithm to select a free voice was not appropriate. Changed to a
simple "least-recently-freed voice" algorithm.
2. Sustained voices were treated as used voices and never got replaced.
Now sustained voices are preferentially replaced when there are no free
voices.
2018-04-30 18:21:30 +02:00
alexey.lysiuk
76ed80fe56 Fixed randomly colored weapons 2018-04-30 10:35:18 +03:00
Christoph Oelckers
ebc1c5741b - some more weapon code extracted. 2018-04-30 00:09:42 +02:00
Christoph Oelckers
c2ac985357 - split off the utility functions from gl_weapon.cpp.
Meaning there's only half as much code left to clean up.
2018-04-29 23:38:26 +02:00
Christoph Oelckers
d904fba05b - trying to clean up the weapon renderer.
Some of the data generation has been offloaded to subfunctions to get the main function down to something manageable for refactoring.
2018-04-29 22:30:52 +02:00
Christoph Oelckers
67cb6e63b5 - cleanup of the 2D interface.
Lots of this was still laid out for DirectDraw. This removes most of Begin2D so that it can be done more cleanlz.
Note that this commit renders weapon sprites and screen blends incorrectly. Those will be fixed in an upcoming commit.
2018-04-29 20:15:19 +02:00
Christoph Oelckers
1345c8e7b4 - fixed: NewDecal should not be called unless it is guaranteed that the decal will be rendered.
This left partially initialized items in the render list.
2018-04-29 19:28:13 +02:00
Christoph Oelckers
4d72214fd5 - fixed a memory leak in the FileReader. 2018-04-29 19:09:51 +02:00
Christoph Oelckers
852c42bbd4 - fixed dynamic lights in legacy mode.
Since they mess around with the texture coordinates, these need to be backed up and restored afterward.
There was also an issue with the ValidNormal check that was suffering from imprecisions that cause walls to be skipped, so the check was removed because it was mostly pointless.
2018-04-29 19:00:17 +02:00
Christoph Oelckers
6cd8b1b3eb - With dynamic light data creation being done in the preparation pass, the light buffer must be mapped while this is running for it to work on older hardware. 2018-04-29 17:36:51 +02:00
Christoph Oelckers
f91511bd84 - removed the leftover code for running walls through GLPASS_LIGHTSONLY.
Unless in legacy mode, all dynamic light setup is now being done in the preparation pass, for both LM_DEFERRED and LM_DIRECT.
2018-04-29 17:27:28 +02:00
alexey.lysiuk
e9d84b8820 Fixed compilation of non-Windows targets
src/hwrenderer/dynlights/hw_aabbtree.h:45:2: error: no template named 'TArray'
src/hwrenderer/dynlights/hw_aabbtree.h:48:2: error: no template named 'TArray'
2018-04-29 16:12:33 +03:00
Christoph Oelckers
06d20e13b8 - cleaned up the gamma correction code.
This had accumulated quite a bit of cruft by now and parts of it should be in non OpenGL code.
2018-04-29 13:45:53 +02:00
Christoph Oelckers
9e6f3787c6 - moved PTM_BestColor to v_palette.cpp and removed its dependencies on CVARs. 2018-04-29 13:10:30 +02:00
Christoph Oelckers
9350eee0c0 - GLDrawList moved to hwrenderer/. 2018-04-29 12:56:06 +02:00
Christoph Oelckers
77b301612a - some refactoring of GLDrawList to remove implementation-specific parts from this class. 2018-04-29 12:32:21 +02:00
Christoph Oelckers
ec13b77717 - removed empty gl_wall.h. 2018-04-29 11:40:47 +02:00
Christoph Oelckers
634b3cf413 - moved gl_spritelight out of gl/. This required a few more changes:
* split gl_shadowmap.cpp into a GL dependent and an API independent part.
* gl_drawinfo must be kept around for the HUD sprite because it connects the renderer with the hardware indpendent part of the engine.
2018-04-29 11:00:34 +02:00
Christoph Oelckers
819ea8f937 - reduced gl_spritelight.cpp to pure data setup so that it can be moved out of gl/.
- added thread_local to some static arrays being used for setting up dynamic lights.

Right now it's of little consequence but these will have to be maintained per thread if the render data setup is done by worker tasks.
2018-04-29 09:33:36 +02:00
Christoph Oelckers
64b108ff44 - hw_sprites extracted
- moved the variables for OpenGL's special textures to the texture manager because it is far better suited as a container than the GLRenderer.
2018-04-29 00:09:44 +02:00
Christoph Oelckers
d1720ad790 - GLSprite rework. 2018-04-28 20:02:17 +02:00
alexey.lysiuk
6d308ca67e Fixed walkthrough blocker in Sin City 2 via compatibility entry
It was impossible to complete Sin City 2 The Satan Complex without cheating since ZDoom 2.6.0
Change in applying of DeHackEd patches from 77a4b9a29b broke triggering of important linedef that pushes friendly marine to exit switch

https://www.doomworld.com/idgames/levels/doom2/Ports/s-u/satanx
2018-04-28 17:45:15 +02:00
Christoph Oelckers
243e12bd8f - split gl_flats.cpp 2018-04-28 13:24:45 +02:00
Magnus Norddahl
5cdea39b35 - add the missing header files in the vs solution explorer 2018-04-28 13:11:55 +02:00
Christoph Oelckers
c5641a0e72 - GLFlat split into API-dependent and -independent data.
No resorting of the files yet.
2018-04-28 12:34:09 +02:00
Christoph Oelckers
d694e19f01 - split off the data generation parts of gl_skydome.cpp 2018-04-28 00:50:42 +02:00
Christoph Oelckers
785a6c2ce5 - moved gl_sky.cpp 2018-04-28 00:22:25 +02:00
Christoph Oelckers
cc926dec1e - removed gl dependencies from gl_sky.cpp by moving some data into other places. 2018-04-28 00:18:49 +02:00
Christoph Oelckers
59477362d9 Merge branch 'wallwork' 2018-04-27 20:37:54 +02:00
Christoph Oelckers
c2333db725 Merge branch 'master' of https://github.com/coelckers/gzdoom 2018-04-27 20:37:44 +02:00
Christoph Oelckers
fe2bfc6f11 - moved the API-independent parts of the decal code to hwrenderer/. 2018-04-27 20:34:20 +02:00
Christoph Oelckers
678ac40b72 - cleaned up includes for gl_decal.cpp 2018-04-27 20:28:59 +02:00
Christoph Oelckers
383ff0d8b8 - moved code around. 2018-04-27 20:21:22 +02:00
Christoph Oelckers
0d7c2527f2 - finished decal render refactoring.
Decals will now be processed into a list in the processing pass, allowing to use the vertex buffer even on GL3 hardware and to offload this part of the work to a multithreaded worker task.
2018-04-27 20:18:52 +02:00
Christoph Oelckers
1ae2f06161 Merge branch 'wallwork' of https://github.com/coelckers/gzdoom into wallwork 2018-04-27 18:53:08 +02:00
Christoph Oelckers
58c0431396 - copied gl_SetupLights to hw_walls.cpp. 2018-04-27 18:53:01 +02:00
alexey.lysiuk
2ae8b0c093 Added startup song definition for custom IWADs
https://forum.zdoom.org/viewtopic.php?t=60314
2018-04-27 13:32:38 +03:00
Christoph Oelckers
200848a487 Decal work. Not finished yet. 2018-04-27 11:40:23 +02:00
alexey.lysiuk
c8eefd84fa Enabled playing of *gasp sound by default
https://forum.zdoom.org/viewtopic.php?t=60361
2018-04-27 11:04:21 +03:00
alexey.lysiuk
8dfd1e6490 Removed unsupported versions of macOS from detection list 2018-04-27 11:04:19 +03:00