Commit graph

11064 commits

Author SHA1 Message Date
ZZYZX
bd889cc8f1 Fixed various virtualscope oddities; set scope for DECORATE classes to play. 2017-03-12 20:27:38 +01:00
Christoph Oelckers
438b983ab1 - inlined the 4 remaining short functions of the Plane class and removed gl_geometric.cpp.
# Conflicts:
#	src/CMakeLists.txt

# Conflicts:
#	src/CMakeLists.txt
2017-03-12 20:11:57 +01:00
Christoph Oelckers
b52d1c3d50 - some cleanup. 2017-03-12 20:04:46 +01:00
Christoph Oelckers
4cd0d3d454 - removed the Vector class in the GL renderer and replaced all its uses with FVector3.
- optimized the math to get a plane equation from a linedef. The original code used a generic algorithm that knew nothing about the fact that Doom walls are always perfectly vertical. With this knowledge the plane calculation can be reduced to a lot less code because retrieving the normal is trivial in this special case.
- use the SSE2 rsqrtss instruction to calculate a wall's length, because this is by far the most frequent use of square roots in the GL renderer. So far this is only active on x64, it may be activated on 32 bit later as well, but only after it has been decided if 32 bit builds should be x87 or SSE2.

# Conflicts:
#	src/gl/dynlights/gl_dynlight.cpp

# Conflicts:
#	src/g_shared/a_dynlightdata.cpp
2017-03-12 19:59:45 +01:00
Christoph Oelckers
ef3421eee5 - moved dynamic lights out of the GL code into the common game code.
Since the true color software renderer also handles them there is no point keeping them on the GL side.
This also optimized how they are stored, because we no longer need to be aware of a base engine which doesn't have them.
2017-03-12 19:57:06 +01:00
Magnus Norddahl
6788b19e89 - stop using PORTSF_INSKYBOX flag in software renderer as it is not thread safe 2017-03-12 19:43:40 +01:00
Magnus Norddahl
3113db798d Debug build compile fix 2017-03-12 19:10:52 +01:00
Magnus Norddahl
5bcdc7d889 Fix compile error on Linux 2017-03-12 18:56:48 +01:00
Magnus Norddahl
5fdbbc4f9e Remove usage of r_viewpoint and r_viewwindow globals from software renderer and poly renderer 2017-03-12 18:54:39 +01:00
alexey.lysiuk
23130678a1 Fixed compilation errors and warnings in Mac PowerPC target
Tested with GCC 5.2 on 10.4 (32-bit only) and Clang from Xcode 8.2 on 10.12 (64-bit only)
2017-03-12 16:27:02 +02:00
alexey.lysiuk
b398c7458c Do not draw crosshair on automap with alternative HUD enabled 2017-03-12 08:57:25 -04:00
Christoph Oelckers
e7330cfa03 - all main functions in gl_scene.cpp now belong to the new GLSceneDrawer class. 2017-03-12 12:51:26 +01:00
Christoph Oelckers
e4d7d9de8b - moved several more functions from FGLRenderer to GLSceneDrawer. 2017-03-12 12:03:54 +01:00
Christoph Oelckers
90c42519b7 - fixed changed variable inside an assert that apparently got overlooked because it got only compiled as release. 2017-03-12 01:59:41 +01:00
Christoph Oelckers
64183fc3cd - moved GL texture precaching to gl_texture.cpp. 2017-03-12 01:49:44 +01:00
Christoph Oelckers
9b33d1dd18 Merge branch 'scene_multithreaded' of https://github.com/raa-eruanna/qzdoom into 3.0_work
# Conflicts:
#	src/gl/scene/gl_clipper.cpp
#	src/gl/scene/gl_portal.cpp
#	src/gl/scene/gl_scene.cpp
#	src/swrenderer/scene/r_scene.cpp
2017-03-12 00:38:55 +01:00
Rachael Alexanderson
0f61197bae - Forbade return scripts from triggering on save load. 2017-03-12 00:22:59 +01:00
Magnus Norddahl
c79051126e Fix ssao being applied to skybox portals 2017-03-12 00:22:58 +01:00
Christoph Oelckers
0aa0db637c - started adding a SceneDrawer class to the OpenGL renderer.
This will eventually hold all the global variables for the rendering.
2017-03-12 00:19:20 +01:00
Rachael Alexanderson
bfc8c614a0 - Forbade return scripts from triggering on save load. 2017-03-11 17:39:57 -05:00
Magnus Norddahl
0c9014b984 - move r_utility globals into r_viewpoint and r_viewwindow
- change r_utility functions to only work on FRenderViewpoint and FViewWindow
2017-03-11 23:28:07 +01:00
Christoph Oelckers
8e2ebe15fe - removed several unused variables from OpenGLFrameBuffer.
- removed the LastCamera logic in RenderView. This code predates the first GZDoom release and apparently was only added because back then R_SetupFrame was not fully compatible with the hardware renderer. Today it is not needed anymore.
2017-03-11 21:10:21 +01:00
Christoph Oelckers
9e70771da3 - Added a check to allow shader storage buffers on GL 4.3 Intel drivers. It doesn't work if GLSL version is set to 4.0 and the feature activated via extension. 2017-03-11 20:14:18 +01:00
Christoph Oelckers
9eae422dab Merge branch 'shadowmaps' of https://github.com/raa-eruanna/qzdoom into 3.0_work
# Conflicts:
#	src/CMakeLists.txt
#	wadsrc/static/language.enu
2017-03-11 19:55:43 +01:00
Christoph Oelckers
28aba3469d - missed 2 includes 2017-03-11 19:18:31 +01:00
Christoph Oelckers
921abc404d - fixed GCC warnings and errors
(Is there anyway to tone down GCC's warning level? It outputs too many false positives for potentially uninitialized variables in which the genuine errors get drowned.)
2017-03-11 19:02:35 +01:00
Magnus Norddahl
77a388e908 Fix default palette for voxel BGRA slab data and support translated 8-bit slab data in true color mode 2017-03-11 18:31:53 +01:00
Christoph Oelckers
756e6432c0 - missed a typo. 2017-03-11 18:26:56 +01:00
Christoph Oelckers
7d6cd2ac83 - fixed some issues with the AudioToolboxMIDIDevice interface that got broken by yesterday's changes. 2017-03-11 18:17:08 +01:00
Magnus Norddahl
38ad6ce6b7 Fix ssao being applied to skybox portals 2017-03-11 17:20:06 +01:00
Rachael Alexanderson
d868f79413 - fixed: Froze on startup on Linux. 2017-03-11 11:04:37 -05:00
Rachael Alexanderson
81291e6892 - fixed: Clang on Linux compile 2017-03-11 11:01:30 -05:00
Christoph Oelckers
355bbf4829 - removed debug output from recent translation additions. 2017-03-11 14:58:59 +02:00
alexey.lysiuk
b8ba2d20e5 Do not draw crosshair on automap with alternative HUD enabled 2017-03-11 14:58:33 +02:00
Christoph Oelckers
72da1fed7e - removed many 'extern "C"' declarations, now that assembly is no longer a concern.
- some concepts about building a RenderViewpoint struct. No actual work yet.
2017-03-11 11:31:09 +01:00
Christoph Oelckers
56986ba843 - removed debug output from recent translation additions. 2017-03-11 09:56:05 +01:00
Christoph Oelckers
daacaa961e - removed Windows includes from two more files. 2017-03-10 23:30:30 +01:00
Christoph Oelckers
5eb9587135 - moved the various music format files into their own directory. 2017-03-10 22:26:02 +01:00
Christoph Oelckers
95b181e618 -added missing file. 2017-03-10 22:19:36 +01:00
Magnus Norddahl
b407ea2164 Change gl_light_shadowmap to default to being off 2017-03-10 22:12:13 +01:00
Magnus Norddahl
59ec97d2d5 Fix shadow map acne and the attenuate flag 2017-03-10 22:08:55 +01:00
Christoph Oelckers
5cc525cd54 - renamed Timidity++ device source file for consistency. 2017-03-10 21:34:42 +01:00
Christoph Oelckers
c8bfef039a - removed dependency on windows.h for music_fluidsynth_mididevice.cpp. It just accesses a single function from Windows so let's manually define this so that this file can use precompiled headers.
- enable precompiled headers for all non-system-specific MIDI devices.
- moved the native Windows and Mac MIDI devices into their respective sections in the project file so that they won't get compiled on the other ones.
2017-03-10 21:18:15 +01:00
Christoph Oelckers
0b645dc42d - reorganized sound related code. 2017-03-10 20:53:03 +01:00
Christoph Oelckers
343db41b63 - changed the #defines in ddstexture.cpp into an enum
(because #defines suck...)
2017-03-10 20:08:39 +01:00
Christoph Oelckers
fec958cc0a - finally managed to get rid of the DWORD type.
This one was particularly nasty because Windows also defines a DWORD, but in Windows it is an unsigned long, not an unsigned int so changing types caused type conflicts and not all could be removed.
Those referring to the Windows type have to be kept, fortunately they are mostly in the Win32 directory, with a handful of exceptions elsewhere.
2017-03-10 19:46:22 +01:00
Christoph Oelckers
2b0e9650bb - forgot to add the new header. 2017-03-10 19:11:30 +01:00
Magnus Norddahl
b660493051 Add menu option for disabling shadow maps and detecting if storage buffers are available or not 2017-03-10 19:10:40 +01:00
Christoph Oelckers
5374eed06d - cleaned up the interdependencies between the MIDIStreamer and the WinMIDIDevice classes.
A major part of this device's implementation details about how to handle the callback were not encapsulated by the device class at all, they were #ifdef'd into the streamer class.
This puts everything into the device class which now exposes a clean interface to the rest of the game with no special handling aside from calling two additional virtual functions that are empty for the other devices
2017-03-10 19:08:37 +01:00
Christoph Oelckers
8d6fe24945 cleanup of MIDI code dependencies
* make the critical section local to the respective platform instead of polluting everything with system specific symbols.
* moved system specific class declarations into the source file instead of having them in the global header.

This commit temporarily disables the Windows system device because it cannot be done without polluting the global header and still needs a bit of refactoring.
2017-03-10 19:08:36 +01:00
Magnus Norddahl
d75e09f545 Fix span dynamic light rendering glitch 2017-03-10 12:25:18 -05:00
Magnus Norddahl
1e7ea1c7ff Fix crash HOM effect when vid_hw2d is off 2017-03-10 12:25:05 -05:00
Magnus Norddahl
b6ea5944d3 Fix crash when vid_hw2d is off 2017-03-10 12:24:09 -05:00
Christoph Oelckers
86d8f9ca83 - removed all dependencies on Windows-defined constants, rename the ones for non-Windows platforms and use those througout.
This should remove all dependencies on Windows definitions from the music interface, what remains is some cleanup.
2017-03-10 12:39:23 +01:00
Christoph Oelckers
f1630cebf3 - backported Line_Align... fix. 2017-03-10 12:09:15 +01:00
Rachael Alexanderson
9d5f8ba250 - fixed: P_AlignFlat's y-offset data was ignored when calculating plane offsets for the final render 2017-03-10 12:04:43 +01:00
Rachael Alexanderson
bb1d29d491 - Fixing r_voxel's license. 2017-03-10 12:04:43 +01:00
Christoph Oelckers
bfd968a88c - uncoupled the MIDI player from Windows system structures.
The approach being used here caused the entire sound system to be infested by windows.h, just to avoid copying around a handful of variables in one place, effectively preventing any compiling optimization.
Windows will now use the same internally defined structure for all MIDI processing which only for actual submission to the system player will be converted to the internal format.
2017-03-10 12:01:29 +01:00
Christoph Oelckers
bc63c664f2 Merge branch 'master' into 3.0_work 2017-03-10 10:39:12 +01:00
Christoph Oelckers
5b9fece062 - fixed bad definition of FBlockThingsIterator.Next(). When implementing the BlockLinesIterator apparently some incorrect code got modified.
- fixed an uninitialized variable in P_CheckSight.
2017-03-10 10:38:30 +01:00
Christoph Oelckers
4ed5b91b0f - added a few missing includes which were not triggered as error in a debug build. 2017-03-10 09:57:10 +01:00
Christoph Oelckers
96fa38bdc6 - make GCC happy. 2017-03-10 02:29:03 +01:00
Christoph Oelckers
bd7476fb8d - untangled r_defs.h from actor.h
Both files can now be included independently without causing problems.
This also required moving some inline functions into separate files and splitting off the GC definitions from dobject.h to ensure that r_defs does not need to pull in any part of the object hierarchy.
2017-03-10 02:22:42 +01:00
Christoph Oelckers
ea0a9b537b - removed the dobject.h include from s_sound.h. This isn't needed and only increased compile times of files with no relation to the actual game that need the sound system. 2017-03-10 01:10:14 +01:00
Rachael Alexanderson
7dc70b636f - enable multiprocessor compilation with MSVC++ using /MP for MSBuild
- Target NEON processors for ARM.
2017-03-10 00:49:26 +01:00
Rachael Alexanderson
0d5cb0536e - enable multiprocessor compilation with MSVC++ using /MP for MSBuild
- Target NEON processors for ARM.
2017-03-10 00:44:25 +01:00
Christoph Oelckers
4de0f8b1fa - compile both poly and sw renderer as one unit, because due to the includes this gets really slow otherwise. Lumping these together saves 50 seconds per build on my system with a 3.4 GHz Core i7 and an SSD for storage, so on other systems it may be even more. 2017-03-10 00:43:36 +01:00
Christoph Oelckers
a4710bcdb0 - did a bit of header cleanup to reduce the dependency on dobject.h. 2017-03-09 23:30:42 +01:00
Christoph Oelckers
1c81c40c59 - moved several files for which fastmath is mostly irrelevant into the PCH group.
Because reducing compile time is more important than some microscopic performance gain in non-time-critical code.
2017-03-09 20:56:33 +01:00
Christoph Oelckers
6325fbc491 - did a bit of cleanup on the MIDI callback interface, made the function type a typedef and removed the two unused parameters. Only the native Windows player passed something, but it wasn't used by the callback. 2017-03-09 20:28:57 +01:00
Christoph Oelckers
9b87a167d7 - replaced a large batch of DWORDs.
Most of those which still rely on ZDoom's own definition should be gone, unfortunately the code in files that include Windows headers is a gigantic mess with DWORDs being longs there intead of ints, so this needs to be done with care. DWORD should only remain where the Windows type is actually wanted.
2017-03-09 20:19:55 +01:00
Christoph Oelckers
a17685f3fd - removed some long longs, to reduce that type's use to the necessary minimum
.
2017-03-09 20:05:22 +01:00
Christoph Oelckers
d2beacfc5f - except for DWORD, all homegrown integer types are gone - a handful were left where they represent genuine Windows types. 2017-03-09 19:54:41 +01:00
Christoph Oelckers
c008ddaf66 - replaced homegrown SWORD, SBYTE and uint32_t types. 2017-03-09 19:31:45 +01:00
Christoph Oelckers
cc1241a4b8 Merge branch 'make-qzdoom-gzdoom-again' of https://github.com/raa-eruanna/qzdoom into 3.0_work
# Conflicts:
#	src/win32/win32gliface.h
#	src/win32/win32iface.h

This compiles but no guarantees otherwise.
2017-03-09 19:09:13 +01:00
Christoph Oelckers
609e4c78b4 - fixed: NOINFIGHTSPECIES checked the wrong target actor. 2017-03-09 18:44:32 +01:00
Rachael Alexanderson
536e8fad19 - Make QZDoom GZDoom again! 2017-03-09 11:51:42 -05:00
Christoph Oelckers
878e6015df - made all iterator classes natively abstract so that they do not get a ConstructNative method so that OP_NEW can refuse creating them without the need to mark them as abstract.
- block creation of actors with the 'new' instruction. Unlike the above these cannot be made abstract because without ConstructNative they cannot be serialized.
2017-03-09 17:21:37 +01:00
Christoph Oelckers
20c56f6dda - added SectorTagIterator and LineIDIterator script classes. 2017-03-09 17:05:51 +01:00
Christoph Oelckers
420f71fc4f - added a BlockLinesIterator script class. 2017-03-09 16:45:48 +01:00
ZZYZX
4dd1910d6d Fixed the size of the local params array for WorldTick/UiTick 2017-03-09 15:38:49 +01:00
ZZYZX
5eb20b7877 Removed Create, CreateOnce, Register, Unregister from the C++ side as well 2017-03-09 15:38:49 +01:00
ZZYZX
01561eb768 Added: UiTick in EventHandlers, a callback that executes at 35fps on every handler in ui scope;
Removed: RenderOverlay, RenderFrame (commented out), Create, CreateOnce, Register, Unregister (completely)
2017-03-09 15:38:49 +01:00
Christoph Oelckers
e080f0cf89 - removed Windows.h include from gl_system.h and cleaned up that file. This means that most OpenGL sources can now be compiled without any Windows dependencies, which is significantly faster. 2017-03-09 13:19:51 +01:00
Christoph Oelckers
396c570a96 - moved Win32GLVideo's definition into the .cpp file, because it isn't needed anywhere else. 2017-03-09 13:09:38 +01:00
Christoph Oelckers
05919a2926 - remove Windows includes from gl_load.h
This is one of two places that unconditionally pulled in all Windows headers into the GL code.
We also do not need the cruft for defining the standard integer types. GZDoom is C++11 which means that stdint.h will be present. So the madness with the definitions should be avoided to ensure that the types are always the same.
2017-03-09 13:03:49 +01:00
Christoph Oelckers
03e1cbcfc0 - removed Windows types from several files which don't need them.
- split out the software renderer's video classes into their own file because they got included by all OpenGL sources.
2017-03-09 12:52:31 +01:00
Christoph Oelckers
8bd9c5a983 - moved some ACS enums from p_acs.h to p_acs.cpp.
There is really no point including this in multiple files if only one of them actually uses these constants.
2017-03-09 09:49:07 +01:00
Christoph Oelckers
77bac4f6fa - fixed code generation for min/max when the first operand was a local variable or constant.
The code for constants was not optimal because the first operand of the instructions cannot be constant. This was solved by swapping it with the second choice which will always be non-constant.
The code for local variables did not allocate a new destination register and would overwrite the first parameter's variable.
2017-03-09 09:36:12 +01:00
Rachael Alexanderson
4d70b01da5 - followed through with GZDoom's SQWORD removals. 2017-03-08 21:35:20 -05:00
Rachael Alexanderson
cc9a2e5121 Merge https://github.com/coelckers/gzdoom 2017-03-08 21:25:24 -05:00
Magnus Norddahl
279fa7e886 Non-SSE version of the sky drawers 2017-03-08 23:35:13 +01:00
Christoph Oelckers
a632fae33f - for some reason the change to c_expr.cpp got lost.
- moved NO_SANITIZE to autosegs.h, because it's the only place where it is used.
2017-03-08 21:14:21 +01:00
Christoph Oelckers
b513b32bcf - reduced missing texture messages in the menu to warnings. 2017-03-08 19:04:35 +01:00
Christoph Oelckers
f341e7fb6a - removed SQWORD, there were only a handful of occurences. 2017-03-08 19:02:50 +01:00
Christoph Oelckers
ba0f5a3f94 - most WORD and SWORD are gone. 2017-03-08 18:55:55 +01:00
Christoph Oelckers
8ab562ef13 - the fourth. 2017-03-08 18:55:54 +01:00
Christoph Oelckers
6dee9ff566 - replaced another large batch of homegrown type use. 2017-03-08 18:55:53 +01:00
Christoph Oelckers
6c6bab73ad - more of the same. 2017-03-08 18:55:53 +01:00
Christoph Oelckers
ad41b23506 - replaced the homegrown integer types in all p* sources and headers. 2017-03-08 18:55:52 +01:00