Commit graph

264 commits

Author SHA1 Message Date
Christoph Oelckers
58dcf0586b - scale weapons down to the original tile's size.
Needed because hires replacements contain no scaling info.
2020-10-04 15:33:12 +02:00
Christoph Oelckers
3210dd5782 - fixed the noisiest value truncation warnings after shortly re-enabling them in the compiler, plus a few places where the warning pointed to incorrect code. 2020-09-26 11:59:24 +02:00
Christoph Oelckers
f106f35598 - fixed interpolation of palette emulation. 2020-09-23 18:18:23 +02:00
Christoph Oelckers
28c5c72605 - fixed: black fog does not mean FogColor == 0 because its alpha component is non-0 2020-09-22 22:38:08 +02:00
Christoph Oelckers
78be8f866b - always use the containing sector's fog when rendering sprites.
This is for consistency, otherwise sprites with a palette translation would stand out. Also use shade dependent fog density instead of a single global value.
Currently this only has an effect in true color rendering mode.
2020-09-20 20:39:11 +02:00
Christoph Oelckers
bac357a6be - disable the weapon in SW's savepics.
The way the weapon drawer is implemented does not work well with save pictures.
2020-09-19 21:31:35 +02:00
Christoph Oelckers
2bf5933923 - fixed weapon sprite translation index when in paletted mode. 2020-09-19 00:06:07 +02:00
Christoph Oelckers
29a10cabcb - fixed most issues with palette emulation.
Brightness is now correct - I have no idea why this factor of 1/0.85 is needed - something must reduce the brightness of the entire scene but I have no idea what.
2020-09-18 22:29:13 +02:00
Christoph Oelckers
cf6b497d02 - fixed animation of weapon sprites
This also disables palette emulation for weapons because it's too buggy right now. Will be re-enabled once fixed.
2020-09-14 22:16:33 +02:00
Christoph Oelckers
4485587088 - removed the palette remapping in the lookup texture generators because it is no longer needed.
Fixes #396
2020-09-14 21:54:29 +02:00
Christoph Oelckers
c61a2c3486 - enable palette emulation for HUD weapon drawing.
Not correct yet but the basics are in.
2020-09-13 23:14:44 +02:00
Christoph Oelckers
fe329b0870 - fixed voxel rendering in palette emulation mode. 2020-09-13 21:08:10 +02:00
Christoph Oelckers
9e81fa89a8 - fixed some of the issues with palette emulation
* the palette shader was not bound.
* the palette textures were not bound.
* palette mode still used regular lighting on top of the palette emulation

This works a lot better than before but is still not complete.
2020-09-12 21:23:14 +02:00
Christoph Oelckers
222f82304d - fixed savegame image generation.
There were two errors:
1. The postprocessor was not run on the generated scene so that the target framebuffer never got set.
2. The generated PNG was not finalized and failed the integrity check of the savegame menu.

Fixes #48
2020-09-12 01:11:32 +02:00
Christoph Oelckers
f4bd30b972 - Duke: Fixed noclip cheat message. 2020-09-10 21:50:22 +02:00
Christoph Oelckers
59eb923c11 - fixed replacement of hires textures.
Fixes #107
2020-09-10 20:52:40 +02:00
Christoph Oelckers
dc0968bf61 - fixed fog on RRRA E2L1
Fixes #183
2020-09-05 23:20:48 +02:00
Christoph Oelckers
763be58134 - tinkering with the savepic code.
This was definitely missing but it's not the cause of the empty savepic.
2020-09-01 19:21:00 +02:00
Christoph Oelckers
765f211e05 - things are mostly working again.
Rendering produces an image again, input gets properly processed, but unsynchronised mouse input isn't properly applied yet.
2020-08-30 19:59:46 +02:00
Christoph Oelckers
0c455acaa2 - more work to switch over to the new loop.
Mainly separation of ticker and render calls
2020-08-30 10:42:44 +02:00
Christoph Oelckers
367b4ce051 - this should be all we need from GZDoom to hook up the main loop. 2020-08-30 09:32:34 +02:00
Christoph Oelckers
847fa48724 - cleaned out the remaining parts of baselayer.h
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend.

The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
2020-08-28 09:06:49 +02:00
Christoph Oelckers
3455610031 - base palette cleanup.
Avoid passing this anywhere in the client code. It should only be set right before rendering the 3D view and the only code using the base palette should be the 3D renderer and hud_drawsprite.
Also make the palette override CVARs 3D view only in debug mode.
2020-08-14 21:18:14 +02:00
Christoph Oelckers
66cb7f61a4 - fixed rendering on narrow screens with an aspect ratio less than 4:3 and removed some parts that are no longer needed. 2020-08-14 21:01:27 +02:00
Mitchell Richters
80291f9cb7 - For RR, pass vehicle TiltStatus through to backend as the double that it is. 2020-08-03 11:06:23 +10:00
Christoph Oelckers
b120bade95 - fixed scuba gear display.
Fixes #37.
2020-07-26 18:35:47 +02:00
Christoph Oelckers
f67d3270d8 - fixed a few cheat issues.
Fixes #29.
2020-07-26 17:04:02 +02:00
Christoph Oelckers
efb73d04a0 - re-fixed the fix: Turned out that flipped offsetting is a bit more tricky.
Due to how this works it cannot be done automatically, it must be passed as a parameter because at the point where the offset gets applied, all information about how it was specified is lost.
This must be enabled as a specific parameter to DrawTexture.
2020-07-26 08:31:54 +02:00
Christoph Oelckers
bcb6c36ef2 - fixed bad parameter for EnableFog 2020-07-24 23:46:52 +02:00
Christoph Oelckers
3d36e4839f - implemented rotation for HUD sprites. 2020-07-24 23:23:19 +02:00
Christoph Oelckers
55feadd11c - render the weapons with the DrawTexture interface and properly handle rotatesprite's alignment modes 2020-07-16 13:23:26 +02:00
Christoph Oelckers
8a1206edbc Merge remote-tracking branch 'remotes/origin/master' into back_to_basics2 2020-07-05 11:55:41 +02:00
Mitchell Richters
dae1506182 - change std::max() to std::min() in glbackend.h. Fixes issue in coelckers/Raze#83. 2020-07-05 09:05:19 +02:00
Mitchell Richters
30300bf3b2 - allow shade in glbackend.h to accept negative values, but still at a max of numshades-1.
* This fixes some issues with distance lighting issues in Duke3D as reported at https://forum.zdoom.org/viewtopic.php?f=341&t=68838&start=75#p1158417.
2020-07-05 08:57:21 +02:00
Mitchell Richters
bb57590d34 - add gl_texture CVAR to glbackend à la GZDoom.
* Will be useful for further debugging of the lighting to determine whether Build actually did/does do different visibility for floor/walls/ceilings, etc.
* Idea inspired by Gez: https://forum.zdoom.org/viewtopic.php?f=341&t=68838&start=75#p1158294
2020-07-04 18:26:11 +02:00
Christoph Oelckers
d6e021a63d - statistics output 2020-07-03 21:44:57 +02:00
Christoph Oelckers
34c3838e62 - logo. 2020-06-26 22:49:56 +02:00
Christoph Oelckers
1993642ce8 - fixed precacher. 2020-06-22 01:07:19 +02:00
Christoph Oelckers
4c00e4cf7c - got rid of the old precaching code.
# Conflicts:
#	source/games/duke/src/zz_premap.cpp
2020-06-22 00:07:25 +02:00
Christoph Oelckers
16bad04da8 - premap stuff.
# Conflicts:
#	source/glbackend/glbackend.cpp
2020-06-22 00:06:51 +02:00
Christoph Oelckers
83a760874b - removed some Build related includes from core code. 2020-06-20 18:01:02 +02:00
Christoph Oelckers
95b4340eec - initial palette shader work. 2020-06-17 12:26:01 +02:00
Christoph Oelckers
b753ea5db7 - preparations for passing palette lookup textures through the low level texture code. 2020-06-17 12:26:01 +02:00
Christoph Oelckers
d4b32bf79f - fully synchronized the backend code with GZDoom.
The camera texture code couldn't be done earlier.
2020-06-14 21:13:22 +02:00
Christoph Oelckers
5effc95ae1 - updated startup dialog and fixed multisampling not active in the 3D scene. 2020-06-14 20:59:26 +02:00
Christoph Oelckers
67b1963e7c - fixed render state management.
There are effectively two states - the one in the backend and a local one in the drawer for the render list which is supposed to eliminate some of the more costly repeated calls.
This higher level state was cached globally, which did not work anymore because the real render state could be changed elsewhere without this code realizing it.
All this means that the render list drawer must create a new state cache for each call and also must apply its current pending render state before leaving to ensure that everything is properly reset.
2020-06-12 22:32:49 +02:00
Christoph Oelckers
9b03537f3a - fixed shadows in Shadow Warrior.
They use a shade of 127 which wasn't clamped to a valid range in the backend.
2020-06-12 21:40:49 +02:00
Christoph Oelckers
60b18c7ec9 - Blood: use the 2D drawer to clear the screen for 2D display. 2020-06-12 20:31:23 +02:00
Christoph Oelckers
6a9f1e9da1 - removed the old OpenGL interface. 2020-06-12 00:25:52 +02:00
Christoph Oelckers
ba397f5ca1 - always draw floors opaque 2020-06-11 23:55:23 +02:00