Commit graph

1409 commits

Author SHA1 Message Date
Christoph Oelckers
080333311c - removed polymost_dorotatespritemodel.
Models are inoperable right now anyway so this would never get called, but it does a few things that would cause problems with refactoring the backend code.
2020-06-01 11:28:07 +02:00
Christoph Oelckers
350acd2ac3 - scale the vertex coordinates that get output to the hardware by 1024.
This is needed to get a coordinate system that is compatible with GZDoom's so that its lighting code can be reused more easily.
2020-06-01 09:55:28 +02:00
Christoph Oelckers
ab2686db34 - camtex transition 2020-05-31 21:43:32 +02:00
Christoph Oelckers
c26b6cdf59 - backend sync with GZDoom. 2020-05-31 21:25:52 +02:00
Christoph Oelckers
611dad7f69 - added the softpoly and Vulkan backend code fron GZDoom.
Not hooked up yet.
2020-05-31 10:53:11 +02:00
Christoph Oelckers
1d15fe63a6 - another backend update, pulling in the sky renderer. 2020-05-31 10:32:10 +02:00
Christoph Oelckers
1e2a3da5fd - video base code unified.
# Conflicts:
#	source/core/rendering/v_video.cpp
2020-05-31 09:18:43 +02:00
nukeykt
714ed1ecdd Engine: fix sprite sorting issue that caused broken voxel rendering in polymost 2020-05-30 23:28:41 +02:00
Christoph Oelckers
5728241c1c - updated backend from GZDoom. 2020-05-30 23:10:17 +02:00
Christoph Oelckers
ea08fa0a4e - updated common code.
Most of what got added is still unused.

# Conflicts:
#	source/build/src/palette.cpp

# Conflicts:
#	source/build/src/palette.cpp

# Conflicts:
#	source/common/engine/i_interface.h
2020-05-30 22:28:24 +02:00
Christoph Oelckers
423f758314 - texture code restructuring. 2020-05-30 21:42:35 +02:00
Christoph Oelckers
cdcb25bc1f - use high level textures to render voxels. 2020-05-30 00:30:56 +02:00
Christoph Oelckers
cca4fc609f - texture code cleanup, mainly cppying layer data into the textures at startup to be able to use a real material system. 2020-05-29 23:33:26 +02:00
Christoph Oelckers
2c94b2bb6d - split texture selection from binding. 2020-05-29 21:53:28 +02:00
Christoph Oelckers
1bc744b77b - moved hictinting data into the lookup tables. 2020-05-29 20:15:42 +02:00
Christoph Oelckers
66809ca9f4 - fixed indexed display of 2D content. 2020-05-29 16:46:36 +02:00
Christoph Oelckers
87a87c155d - moved to GZDoom's gl_hwtexture.cpp. 2020-05-29 01:03:01 +02:00
Christoph Oelckers
381e53017d - some hackery to make the camera textures in DN3D work again.
They depend on a deleted texture not writing to the depth buffer, but other parts in the engine like ROR surfaces depend on them writing a proper depth buffer value, so for now there is a global variable that allows to exclude a single tile from ever getting rendered.
2020-05-29 00:44:13 +02:00
Christoph Oelckers
72889540a5 - use GZDoom's gl_samplers.cpp 2020-05-28 23:48:50 +02:00
Christoph Oelckers
362be65060 - removed FHardwareTexture's mSampler member.
This was a mostly unused relic of early development, the few places using it were static sampler settings.
2020-05-28 21:45:33 +02:00
Christoph Oelckers
5e93b8f3e7 - fixed transparent color. 2020-05-28 08:31:08 +02:00
Christoph Oelckers
a3e6829817 - fixed Exhumed menu by adding a proper layout mode to the drawer instead of hacking the broken tile offsets. 2020-05-27 23:30:36 +02:00
Christoph Oelckers
193b940eef - palette code cleanup. 2020-05-27 22:19:02 +02:00
Christoph Oelckers
7109ce4e30 - made some changes to the font and texture system to allow late loading of the palette.
The base palette can be set via .def files so that the engine has no access to it until the entire game state is set up.
This means that font translations and PNG palette remap tables cannot be built when the owning objects are created.
For PNGs this has the added advantage that they only get done when really required and not unconditionally - most of the time the remap table isn't even needed here.

Thid fixes the slider graphics in the option menus.

# Conflicts:
#	source/core/gamecontrol.cpp

# Conflicts:
#	source/core/gamecontrol.cpp
2020-05-26 21:43:32 +02:00
Christoph Oelckers
29db3febb8 - updated the platform code to be mostly identical with GZDoom 2020-05-26 00:08:26 +02:00
Christoph Oelckers
c4017de12f - updated to GZDoom's new texture management system. 2020-05-25 23:59:07 +02:00
Christoph Oelckers
55a3c62b59 - use GZDoom's 2D drawer.
Console and menu font colors are not ok yet, aside from that it works.
2020-05-25 17:11:32 +02:00
Christoph Oelckers
1d065085d4 - fixed some palette issues 2020-05-25 00:46:46 +02:00
Christoph Oelckers
94cb36ae53 - removed helper #ifdefs. 2020-05-25 00:33:25 +02:00
Christoph Oelckers
758e4ad7cb - stripped down the palette manager in the GL backend and let it use the data that's managed elsewhere.
This class is only needed to manage the palette textures used by the indexed render mode, all the rest is available globally.
2020-05-25 00:31:55 +02:00
Christoph Oelckers
6bd4f77c5b - fix compilation. 2020-05-25 00:31:55 +02:00
Christoph Oelckers
531c68edfe - use GZDoom's font code to fix the crash issues and moved around some files in the PK3.
This pulls in a lot of Doom specific font setup, this can be sorted out later as it won't get into the way.

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/glbackend/hw_draw2d.cpp

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/glbackend/gl_texture.cpp

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/build/src/palette.cpp
#	source/core/gamecontrol.cpp
2020-05-24 23:28:44 +02:00
Christoph Oelckers
a70b7fa698 - use the texture manager to handle texture data. 2020-05-24 23:26:47 +02:00
Christoph Oelckers
6bffdf80a1 - finally managed to merge in the original texture system commit.
Game compiles and runs but transparency doesn't work yet.

# Conflicts:
#	source/CMakeLists.txt
#	source/core/menu/menu.cpp
#	source/core/textures/buildtiles.cpp
2020-05-24 22:53:14 +02:00
Christoph Oelckers
53891004a0 - fixed compilation 2020-05-24 22:37:50 +02:00
Christoph Oelckers
7a84887fc4 - transitioned FTexture.
Mostly working. Note: Brightmaps must be per-translation!
2020-05-24 19:12:22 +02:00
Christoph Oelckers
e6b94d35ff - reorganized how BuildTiles stores its data.
Arrays of struct are better than struct of arrays.
2020-05-24 15:02:20 +02:00
Christoph Oelckers
266364fc2e - properly implement texture offsets 2020-05-24 13:26:45 +02:00
Christoph Oelckers
db4850a028 - added a reverse tile map so that the tile manager can retrieve special info even when a tile texture is passed by object to the render code and not by index. 2020-05-24 10:30:09 +02:00
Christoph Oelckers
0c029750b6 - moved hightile replacements out of the texture class. 2020-05-24 08:47:45 +02:00
Christoph Oelckers
498b19873d - split up textures.h. 2020-05-24 07:58:56 +02:00
Christoph Oelckers
da26d1cec4 - more trivial adjustments. 2020-05-24 00:38:10 +02:00
Christoph Oelckers
00e7b2fa25 - simple stuff from the texture manager inclusion commit.
To get this out of the way first...
2020-05-24 00:27:24 +02:00
Christoph Oelckers
ab6e87b5f8 - workaround for Ion Fury display glitches on the first map.
I have no idea why this needs to be different than in EDuke32, but without always clearing the depth buffer before rendering a scene viewpoint the game will glitch like crazy.
2020-05-23 22:43:06 +02:00
Christoph Oelckers
2703823ac4 - fixed palette setup. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
2d29d130c0 - fixed Blood startup. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
b8a289bf61 - move brightmap handling to the common code.
# Conflicts:
#	source/common/utility/basics.h

# Conflicts:
#	source/build/src/palette.cpp
2020-05-23 22:43:05 +02:00
Christoph Oelckers
ae6403a205 - added a level of abstraction to the lookup table code to ease later refactoring. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
f929419a0a - refactoring of the lookup tables. 2020-05-23 22:43:04 +02:00
Christoph Oelckers
daf77e55f7 - fixed compilation.
Much of this commit will have to be undone later, once the texture manager becomes available.
2020-05-23 22:43:04 +02:00
Christoph Oelckers
b971bc2717 - avoid using global palette settings when drawing 2D content with a custom palette.
Instead pass the palette info with the render call to avoid stale global state.
2020-05-23 22:43:01 +02:00
Christoph Oelckers
8d3199514d - removed some 'pragma' cruft. 2020-05-23 13:08:10 +02:00
Christoph Oelckers
d0406e27b6 - all base palette data has been transitioned to GPalette. 2020-05-23 12:31:05 +02:00
Christoph Oelckers
6f9ee4b60f - store palettes in the palette container. 2020-05-23 12:31:05 +02:00
Evan Ramos
8b0da35cb8 Avoid warnings when defining only extra in tilefromtexture
# Conflicts:
#	source/build/src/defs.cpp
2020-05-22 17:30:52 +02:00
nukeykt
1ef8df0a4c Blood: Fix model yoffset 2020-05-22 17:29:50 +02:00
sirlemonhead
19ab05655b Prevent invalid array index in polymost_spriteIsModelOrVoxel()
# Conflicts:
#	source/build/src/polymost.cpp
2020-05-22 17:22:18 +02:00
Richard C. Gobeille
e2d79b4682 engine: add yax_getflorzofslope() and yax_getceilzofslope() 2020-05-22 17:01:36 +02:00
Richard C. Gobeille
3ab314e95a engine: make cliptestsector() (used by clipmove(), etc) TROR aware
This is intended to help with issues where enemies get stuck in thin TROR layers.

# Conflicts:
#	source/build/src/clip.cpp
2020-05-22 17:00:55 +02:00
Richard C. Gobeille
f5788c331e Clarify clipupdatesector() log message a bit
# Conflicts:
#	source/build/src/clip.cpp
2020-05-22 16:52:08 +02:00
Richard C. Gobeille
94d098f8ef Fix a crash with tabledivide64()
Fixes #1.
2020-05-22 16:50:02 +02:00
Christoph Oelckers
bad17f29e0 - made some tweaks to the anti-z-fighting code in Polymost.
It now picks the minimum of the current formula and the one from before June 2017 - the current one was causing problems with sprites in the distance so now the old one is used as an upper bound.
2020-05-22 16:27:45 +02:00
NY00123
6fcb8f7a6a Add gethiq16angle and the getq16angle wrapper to the engine 2020-05-21 18:47:37 +02:00
Mitchell Richters
3749a89d6a Build: Change renderSetRollAngle() to take a float and not an int32_t. 2020-05-13 15:12:44 +02:00
Mitchell Richters
68a0ead5f0
- fix Linux builds following reset of master branch. (#44)
* - fix Linux builds following reset of master branch.

* - fix Linux Clang CI failure.

* - change '#ifdef __linux__' to '#ifndef _WIN32' as requested/required.

* - initialise batchrun in proper spot.
2020-05-05 10:45:21 +03:00
Christoph Oelckers
e6031654f2 - uncommented the compatibility case in updatesector.
In the RedNukem frontend this was causing view interpolation glitches, this probably should be disabled a bit more targeted but right now I do not know yet which call causes the problem
2020-05-04 00:03:51 +02:00
Mitchell Richters
1ce4081d37 - change 'refreshfreq' from int to double.
A double is already used in CalcSmoothRatio. Further to this, displays that use TV standard frequencies do not use perfect 60Hz frequencies, but frequencies such as 59.94Hz, 23.976Hz (precisely, 24*(1000/1001) = 23.9760239760239760...) etc.

Reference: 'https://www.ghacks.net/2010/04/28/59-hertz-refresh-rate/', 'http://www.paradiso-design.net/videostandards_en.html'.

# Conflicts:
#	source/build/include/baselayer.h
#	source/platform/posix/cocoa/i_main.mm
2020-04-16 00:03:00 +02:00
Mitchell Richters
4654fd648d Renderer: Disable models by default since they're not supported currently.
- Better to see sprites in HRPs than nothing on-screen.
2020-04-14 00:00:23 +02:00
Christoph Oelckers
156a225ff4 - renamed global palookup variable.
Since the same word gets used in text messages and local variables in the game code it is easier this way to search for it and facilitate its transition to the translation table management in PaletteContainer.
2020-04-13 23:58:46 +02:00
Christoph Oelckers
fda4293013 - draw the movie franes outside of the tile system to reduce the palette maintenance.
The movie code has always been the part causing the most issues because it alters the palettes - the rest treats them as static data.
2020-04-13 23:58:45 +02:00
Christoph Oelckers
fac004b4d2 - palette code cleanup 2020-04-13 23:58:44 +02:00
Christoph Oelckers
d46ea7481f - handle RRRA E1L2's fog in the shader instead of hacking the shade tables. 2020-04-12 08:30:43 +02:00
Christoph Oelckers
4d1d90d712 - use a global constant for the transparent palette index instead of hardcoding it to the 255 literal everywhere.
- added the needed glue to allow palettecontainer.cpp to compile.
2020-04-12 08:30:43 +02:00
Christoph Oelckers
8e87674d4c - backend code matching with GZDoom 2020-04-12 08:30:40 +02:00
Christoph Oelckers
5584c726ba - file system update and adjustment. 2020-04-12 08:30:40 +02:00
Christoph Oelckers
f671eb622f - migrated to GZDoom's utility code. 2020-04-12 08:30:39 +02:00
Christoph Oelckers
797640c494 - use ZDoom's memory allocation wrapper instead of EDuke's.
This simply plays nicer with the compiler's diagnostics.
2020-04-12 08:30:38 +02:00
Christoph Oelckers
66ecb05eb8 - use Printf as the only command to print to the console.
All uses of OSD_Printf, initprintf etc. have been renamed.
2020-04-12 08:30:38 +02:00
Christoph Oelckers
6ef93ba514 - match cmdlib.cpp/.h with GZDoom. 2020-04-12 08:30:36 +02:00
NY00123
3610609659 Add a workaround for possible rounding errors in calculations of
sintable and radarang. sintable[512] was different in a 32-bit build.

From-SVN: r8796
2020-04-08 00:38:48 +02:00
Christoph Oelckers
5af0217db7 - got rid of the software rendering blend tables. 2020-03-29 17:23:57 +02:00
Christoph Oelckers
41545b644a - cleaned out most of the software renderer's static global variables. 2020-03-29 16:59:49 +02:00
Christoph Oelckers
7392b699e4 - cleaning out a few more parts of the software renderer. 2020-03-29 15:54:02 +02:00
Christoph Oelckers
3f69044770 - removed all references to sdlayer.cpp as all that was left in there was only needed for software rendering.
- removed now unused a-c.cpp.
2020-03-29 15:22:07 +02:00
Christoph Oelckers
0de4b134da - stripped out most of the software renderer.
Now that the camera textures can be handled through the hardware renderer this isn't needed anymore.
2020-03-29 14:55:09 +02:00
Christoph Oelckers
621a9338e5 - render camera textures with the hardware renderer.
This removes the last active use case for the software renderer and allows rendering the camera views at a higher resolution.
For Shadow Warrior this necessitated a split of JS_DrawMirrors, because it processed cameras and mirrors in the same loop which cannot be done with the hardware renderer.
2020-03-29 14:01:46 +02:00
terminx
4bdffa4f0f Patch from Nuke.YKT to fix a y-flipped voxel rendering issue in Polymost
git-svn-id: https://svn.eduke32.com/eduke32@8727 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:34:48 +01:00
terminx
8def930980 Replace MERGE_NODES macro with vsmerge() function
git-svn-id: https://svn.eduke32.com/eduke32@8715 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2020-03-20 17:31:21 +01:00
Christoph Oelckers
73a4e0d1fe - made Blood's FullMap flag global and removed the hacks to show the full automap.
Also refactor show2dsector into a bit array to get rid of the bit shifting code at play here.
2020-03-07 19:30:18 +01:00
Christoph Oelckers
b3c1d5001e - used double frame buffering for VPX playback.
With a single buffer this tends to run into situations where an unrendered texture gets deleted before it is drawn.
2020-03-05 20:56:41 +01:00
Christoph Oelckers
f59bfa1224 - consolidation of screentext code 2020-03-05 00:58:38 +01:00
nukeykt
2bf65c9108 Exhumed: Use old ksqrt implementation 2020-03-04 17:57:15 +01:00
Christoph Oelckers
348325c879 - removed some editor-only code from engine.cpp 2020-03-01 19:12:18 +01:00
hendricks266
da6c7ddab5 Add mhkreset maphack command
Thanks to LeoD.

git-svn-id: https://svn.eduke32.com/eduke32@8644 1a8010ca-5511-0410-912e-c29ae57300e0
2020-02-29 10:05:47 +01:00
hendricks266
dc2d6a098e Fix mdpivxoff and mdpivyoff commands
Thanks to LeoD.

git-svn-id: https://svn.eduke32.com/eduke32@8643 1a8010ca-5511-0410-912e-c29ae57300e0
2020-02-29 10:05:23 +01:00
Christoph Oelckers
39c96d58c6 - fixed bug with wallsprite calculation trashing angles of voxel sprites.
Fix was missed from upstream due to a merge conflict.
2020-02-22 16:56:20 +01:00
Christoph Oelckers
a873dcf6e0 - fixed the pause key.
Apparently SDL maps this to a different scan code.
Since pause is hard coded in all games the corresponding menu option has been disabled.
2020-02-16 17:22:14 +01:00
Christoph Oelckers
cc872c79fc - removed some vertex fudging code in polymost_domost that was no longer present in upstream code.
This looks like it fixes a few render glitches.
2020-02-15 21:36:29 +01:00
Christoph Oelckers
7909f29691 - allow starting Duke, NAM and WW2GI with the RedNukem-based game code for Redneck Rampage.
This mainly required some rework of the menu setup to be less explicit about the frontend's menu classes.
2020-02-12 20:25:59 +01:00
Christoph Oelckers
4d45117ca5 - removed pointless and non-functional null check
clipmapinfo is a static global variable, its address is never null.
2020-02-12 00:42:34 +01:00