Commit graph

435 commits

Author SHA1 Message Date
Christoph Oelckers
74d8c929cc Give the clipper a reference to the current viewpoint
This is both for efficiency and encapsulation. At last on MSVC in 64 bit, accessing global variables is very inefficient and the clipper was doing it repeatedly in its worker functions.

It is also one less place where the global viewpoint gets checked.
2018-06-19 09:37:49 +02:00
Christoph Oelckers
496e6e2e8f - fixed: The vertex height updater was using the index buffer offsets to access the vertex buffer.
I missed this part when repurposing the vboindex members to store the index buffer offsets.
However, since both indices are needed, they need another set of variables.
2018-05-24 00:01:56 +02:00
Christoph Oelckers
b612e182b4 Merge branch 'indexbuffer'
# Conflicts:
#	src/gl/data/gl_vertexbuffer.h
#	src/gl/scene/gl_flats.cpp
#	src/hwrenderer/data/flatvertices.h
2018-05-22 22:10:21 +02:00
alexey.lysiuk
c6f7d92c76 - added forced automap style to linedef, UDMF only
https://forum.zdoom.org/viewtopic.php?t=59808
2018-05-19 17:09:26 +02:00
Christoph Oelckers
fd3681dae2 - use an indexed vertex buffer to render the flats.
Right now this has no advantage but it allows optimizing the data, e.g. rendering an entire sector in one go instead of per subsector.
2018-05-19 13:33:28 +02:00
Christoph Oelckers
5ec47d8b4f - removed some leftover data in sector_t. 2018-05-19 08:25:26 +02:00
Christoph Oelckers
9bdb0f2e49 - renamed the flag bits for sector_t::MoreFlags, so that they are easier to distinguish from sector_t::Flags.
- precalculate if a sector's floor and ceiling plane overlap. This avoids rechecking this for each single call of hw_FakeFlat.
- vertices must be marked dirty every time they change after map setup. That means that ChangePlaneTexZ must do this as well, because it cannot rely on interpolation taking care of it.
- Having a 'dirty' argument for SetPlaneTexZ's ZScript version makes no sense. If the value changes from the script side the vertices must always be marked to be recalculated.
2018-05-01 11:29:29 +02:00
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
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
52c5328412 - made the glow getter functions members of sector_t. 2018-04-02 13:36:28 +02:00
Christoph Oelckers
248a29bf06 - resorted portal render data.
Compiles but does not work...
2018-04-01 22:26:57 +02:00
Christoph Oelckers
65e7b6dfaa - moved the code in gl_data.cpp to better fitting places
* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals.
* RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp.
* the dumpgeometry CCMD has been moved to p_setup.cpp
2018-04-01 18:45:27 +02:00
alexey.lysiuk
f629678320 Fixed const correctness for secplane structure
https://forum.zdoom.org/viewtopic.php?t=59151
2018-01-18 15:34:56 +02:00
alexey.lysiuk
a670e79b8a Applied texture offsets and scales on animated doors
https://forum.zdoom.org/viewtopic.php?t=58892
2017-12-29 11:47:30 +02:00
Magnus Norddahl
bf4d7234e1 - Increase MAXWIDTH and MAXHEIGHT defines to support supersampled 5K monitors 2017-07-23 22:04:00 +02:00
Christoph Oelckers
96d328de9b - removed all Doom Source license and all default Raven copyright headers and replaced them with GPLv3. Also fixed the license in a few other files.
For some files that had the Doom Source license attached but saw heavy external contributions over the years I added a special note to license all original ZDoom code under BSD.
2017-04-17 13:33:19 +02:00
Christoph Oelckers
b416322032 - converted FInterBackground into a class so that the scripts can use it.
- fixed some issues with default value matching in savegames.
2017-03-18 13:25:22 +01:00
Christoph Oelckers
fea4079b7c - moved nodes into FLevelLocals. 2017-03-17 01:42:37 +01:00
Christoph Oelckers
f818d25542 - last commit deleted a small piece of code. 2017-03-17 00:31:15 +01:00
Christoph Oelckers
f201dab534 - moved the subsectors into FLevelLocals. 2017-03-17 00:22:52 +01:00
Christoph Oelckers
59b684bdbc - moved the segs array into FLevelLocals. 2017-03-16 21:34:04 +01:00
Christoph Oelckers
2b2c986bd0 - cleanup of GL renderer interface and improper header use in software renderer. 2017-03-16 21:34:03 +01:00
Christoph Oelckers
005e6871f9 - increased the snd_channels default and minimum.
The values were still 8 and 32 respectively which applied to hardware from last decade, but for modern mods these are simply too low. New values are 64 as minimum and 128 as default.

- added script access to a sector's colormap and specialcolors fields. (Writing only through dedicated functions because these fields are render state which may need to trigger some form of refresh if the renderer changes.)
2017-03-16 10:38:56 +01:00
Christoph Oelckers
9a24771a7d - refactored FDynamicColormap out of sector_t.
This has increasingly become an obstacle with the hardware renderer, so now the values are being stored as plain data in the sector, with the software renderer getting the actual color tables when needed. While this is a bit slower than storing the pregenerated colormap, in realistic situations the added time is mostly negligible in the microseconds range.
2017-03-15 22:04:59 +01:00
Christoph Oelckers
44a087554f - moved the OpenGL fog properties to FLevelLocals to simplify their handling.
- added access to the glow properties for ZSCript and ACS.
2017-03-14 13:54:24 +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
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
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
Rachael Alexanderson
cc9a2e5121 Merge https://github.com/coelckers/gzdoom 2017-03-08 21:25:24 -05:00
Christoph Oelckers
ad41b23506 - replaced the homegrown integer types in all p* sources and headers. 2017-03-08 18:55:52 +01:00
Christoph Oelckers
b8f7e305db - changed TObjPtr to take a pointer as its template argument and not the class it points to.
This addresses the main issue with TObjPtr, namely that using it required pulling in the entire class hierarchy in basic headers like r_defs which polluted nearly every single source file in the project.
2017-03-08 13:35:21 +01:00
Rachael Alexanderson
527a172fcd Merge https://github.com/coelckers/gzdoom 2017-03-07 22:03:56 -05:00
Christoph Oelckers
7a0c466b24 - fixed: For reflective floors, closed doors need to be considered an outer boundary, even if the floor below the door is reflective itself. 2017-03-07 18:59:48 +01:00
Rachael Alexanderson
2a847ca570 Merge https://github.com/coelckers/gzdoom 2017-02-27 01:06:00 -05:00
Christoph Oelckers
8cac2d8c84 - added a NOATTACK sector flag which prevents monsters from going to their attack states if present. 2017-02-26 20:27:02 +01:00
Rachael Alexanderson
226e5238fc Merge https://github.com/coelckers/gzdoom 2017-02-01 21:57:37 -05:00
Christoph Oelckers
6d28aa3541 - do not use strtol for parsing critical values that can get large.
This function will truncate everything that is larger than LONG_MAX or smaller than LONG_MIN to fit into a long variable, but longs are 32 bit on Windows and 64 bit elsewhere, so to ensure consistency and the ability to parse larger values better use strtoll which does not truncate 32 bit values.
2017-02-01 11:19:55 +01:00
Rachael Alexanderson
0c101102dc Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/r_bsp.cpp
#	src/r_main.cpp
#	src/r_segs.cpp
#	src/r_things.cpp
#	wadsrc/static/language.enu
#	wadsrc/static/menudef.txt
2017-01-28 17:39:55 -05:00
Christoph Oelckers
95afc97d48 - ok, that color_absolute option was pretty much redundant, considering that it is already possible to explicitly set a fog density per sector - it was only necessary to give that priority over standard depth fade calculations for fog-less sectors. 2017-01-28 21:42:58 +01:00
Christoph Oelckers
dbbd797baa - added the needed properties for Doom64 colors and a little FraggleScript hack to test it with existing maps. 2017-01-28 19:05:39 +01:00
Rachael Alexanderson
e52772745b Merge https://github.com/coelckers/gzdoom 2017-01-19 23:07:14 -05:00
Christoph Oelckers
c880b26d98 - scriptified MorphProjectile and CustomSprite.
This should for now conclude actor class scriptification. The remaining ten classes with the exception of MorphedMonster are all too essential or too closely tied to engine feature so they should remain native.
2017-01-20 01:11:36 +01:00
Magnus Norddahl
2848ca53dc Merge remote-tracking branch 'gzdoom/master' into qzdoom
# Conflicts:
#	src/r_things.cpp
#	src/r_things.h
2017-01-16 23:05:34 +01:00
Christoph Oelckers
d3ab691afb - scriptified APowerInvisibility.
- changed AlterWeaponSprite so that it doesn't expose renderer internals to the script code.
2017-01-16 20:34:12 +01:00
Magnus Norddahl
6c76c8534b Change visstyle_t back to how it was in ZDoom and stop using it internally in the swrenderer 2017-01-16 16:23:02 +01:00
Magnus Norddahl
1c3440e391 Merge remote-tracking branch 'gzdoom/master' into qzdoom
# Conflicts:
#	src/r_plane.cpp
#	src/r_plane.h
2017-01-16 06:03:21 +01:00
Christoph Oelckers
a9ef73528d - removed all skybox class types from code in preparation for exporting these classes.
- moved SectorPortal struct to FLevelLocals and exported it.
2017-01-14 16:05:40 +01:00
Rachael Alexanderson
2583c94444 Merge https://github.com/coelckers/gzdoom 2017-01-13 09:15:22 -05:00
Christoph Oelckers
d338ca3ec1 - scriptified the sector actions. 2017-01-13 13:51:47 +01:00