Commit Graph

1323 Commits

Author SHA1 Message Date
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