Christoph Oelckers
c8a75a8664
- give each DrawInfo its own list of tsprites.
...
Since these do not fully get processed sequentially the contents need to be preserved until needed.
This required getting rid of the global tsprite array. Polymost still uses a static vatiable, though, but this is only accessed in polymost-exclusive code.
2021-04-02 10:28:40 +02:00
Christoph Oelckers
6afbb82e66
- fixed one-sided wall sprite checks.
2021-04-02 09:04:13 +02:00
Christoph Oelckers
80e5cd0dc5
- fixed some automap issues:
...
* Blood's automap was not drawn at all.
* SW's automap always showed all sectors
* SW's player sprite was not rendered.
* Non-automap: Forward gotsector to the game code because there's still a few places in Blood that need it.
2021-04-01 20:47:05 +02:00
Christoph Oelckers
85020b374a
- use texture clamping on non-tiled walls.
2021-04-01 19:21:24 +02:00
Christoph Oelckers
e1df17964e
- fixed handling of SW's shadows.
...
An out of range shade will only work without fog.
2021-04-01 19:10:43 +02:00
Mitchell Richters
88695ef554
Merge branch 'master' into newrenderer2
2021-04-01 16:49:07 +11:00
Mitchell Richters
612b8b3350
- Fix Linux GCC 7
continuous integration target.
2021-04-01 13:59:31 +11:00
Mitchell Richters
c076310e34
- InputState::ClearAllInput()
: Only clear crouch_toggle
bool if outside of a level, and resend SB_CROUCH
sync bit if inside a level and crouch_toggle
is true.
...
* Fixes #287 .
2021-04-01 13:46:16 +11:00
Mitchell Richters
4321efa21c
- Re-arrange swaddons[]
const char array so that /gameroot
is picked up first following changes in f4b27bbd27
.
...
* Since f4b27bbd27
, `D:/Program Files (x86)/Steam/steamapps/common/Shadow Warrior Classic/gameroot/addons/Sw.grp` was being picked up instead of `D:/Program Files (x86)/Steam/steamapps/common/Shadow Warrior Classic/gameroot/SW.GRP`.
* Fixes #289 .
2021-04-01 12:25:57 +11:00
Mitchell Richters
029f8807df
- Make 360. / 2048.
a constant expression and replace all uses throughout code.
2021-04-01 10:42:22 +11:00
Mitchell Richters
aa35b6a479
- binaryangle.h: Fix constexpr issue on GCC builds following bf2d8078a4
.
2021-04-01 08:32:07 +11:00
Christoph Oelckers
3c4429f2a8
- fixed sector mesh generator to allow sectors with non-continuous wall loops.
...
Blood has a few such sectors.
2021-03-31 21:26:57 +02:00
Christoph Oelckers
4cc0afe587
- fixed texture coordinate generation for sloped planes.
...
Since these depend on the slope, the sector's ceiling and floorz need to be the same as for the mesh when creating them.
2021-03-31 20:20:19 +02:00
Mitchell Richters
c630ad9110
Revert "- subjective fix to Duke 3D's RPG harsh recoil."
...
This reverts commit 839a7bcbe4
.
Revert "- Duke: Restore RPG harsh recoil behind a CVAR."
This reverts commit 88a49b0d22
.
# Conflicts:
# source/core/gamecvars.cpp
# source/core/gamecvars.h
2021-03-31 20:35:18 +11:00
Mitchell Richters
760c918e75
- Duke: Remove unnecessary int casts from gameexec.cpp
.
...
* Incoming vars are already int and called functions only accept an int so really just no need at all.
2021-03-31 20:07:36 +11:00
Mitchell Richters
16886895b0
- Duke: DoPlayer()
: Ensure SB_CENTERVIEW
bit is cleared when setting a horiz target from CON.
...
* Repairs horizon issues raised in https://forum.zdoom.org/viewtopic.php?f=340&p=1185365 .
2021-03-31 19:48:38 +11:00
Mitchell Richters
bf2d8078a4
- PlayerHorizon: Replicate changes to settarget()
and processhelpers()
methods from 39fe9efaff
.
2021-03-31 19:44:50 +11:00
Mitchell Richters
39fe9efaff
- PlayerAngle: Adjust how settarget()
methods store angle for unsynchronised angle adjustments and adjust processhelpers()
method accordingly.
...
* Repairs angle issues raised in https://forum.zdoom.org/viewtopic.php?f=340&p=1185365 .
2021-03-31 19:43:41 +11:00
Christoph Oelckers
7bea8ad6ba
- fixed texture overlays for SW's sector portals.
2021-03-30 23:27:11 +02:00
Christoph Oelckers
a84060fda7
- SW: mark sector as dirty in wallmove.
2021-03-30 21:51:37 +02:00
Christoph Oelckers
15fb89d08f
- workaround for SO interpolation potentially writing bad values to wall positions.
...
That messed up interpolation code really needs to be thrown away and replaced later, for now this has to suffice.
2021-03-30 21:30:12 +02:00
Christoph Oelckers
f6984314b7
- SW: let sector objects properly invalidate the sector they are in.
2021-03-30 21:28:27 +02:00
Christoph Oelckers
a4174352c7
- keep separate sector compare data for floor and ceiling.
...
Otherwise there can be problems if floor and ceiling change at the same time.
2021-03-30 20:43:52 +02:00
Christoph Oelckers
9cccd6f89b
- store plane meshes without height information.
...
This avoids retriangulation when just the plane's z changes.
2021-03-30 20:30:35 +02:00
Christoph Oelckers
6239734bdc
- always create geometry for flat sprites in the collection pass.
...
This still depends on Build's tsprite array which is global so its contents are too volatile for delayed geometry generation.
This needs to be refactored later but it can only be done when Polymost is gone.
2021-03-30 19:58:42 +02:00
Christoph Oelckers
4647a0b2bc
- fixed cases of small textures being used for the sky.
...
Case in Point: DukeDC uses a 64x64 texture with palette remap for the sky.
2021-03-29 23:25:43 +02:00
Christoph Oelckers
6fcb6fa1d5
- sky positioning tweaks.
...
It does not use the panning info of the wall and needs a texture height relative adjustment.
2021-03-29 22:34:46 +02:00
Christoph Oelckers
92bb9c5319
- fixed display of player in mirrors.
2021-03-29 21:48:23 +02:00
Christoph Oelckers
d2a1f9ea88
- fixed issue with constantly regenerating sector ceiling triangle meshes.
2021-03-29 20:29:09 +02:00
Christoph Oelckers
ab9c7de147
- use texture clamping for all sprites.
2021-03-29 20:18:49 +02:00
Christoph Oelckers
2d0360fa55
- apply depth bias to translucent geometry.
...
This is necessary to handle wall and floor sprites placed on actual walls and floors work as intended.
2021-03-29 19:45:04 +02:00
Christoph Oelckers
b93502f0d0
- fixed bad assignments for vertex compare data in sector triangulator.
2021-03-29 10:15:06 +02:00
Christoph Oelckers
e0fe8d2ed9
- fixed interpolation issues with sector objects in SW.
...
SO's vertex interpolation does not use the common framework so it got missed by the sector retriangulation checks.
We need to check two wall positions as well to make sure that sector movement is properly detected.
2021-03-29 09:25:26 +02:00
Christoph Oelckers
389d61d086
- fixed texture selection for one-sided walls with the one-way flag set.
2021-03-29 09:11:38 +02:00
Christoph Oelckers
18cf208b7d
- fixed SW shadows in new renderer.
...
shade clamping and full sprite sort was missing,
2021-03-28 22:29:13 +02:00
Christoph Oelckers
0ae93318e3
- flip camera textures to have the correct orientation.
2021-03-28 21:00:24 +02:00
Christoph Oelckers
e8edb32e0d
- fixed camera texture setup.
...
They still are upside-down but aside from that work as expected.
2021-03-28 19:22:51 +02:00
Christoph Oelckers
d9ff2fd1e2
- used display size for all texture positioning.
2021-03-28 18:22:30 +02:00
Christoph Oelckers
81a690970b
- SW: hide the player sprite before calling the renderer.
2021-03-28 15:28:08 +02:00
Christoph Oelckers
d3e0a9590c
- renderDrawMasks may only be called for Polymost.
2021-03-28 15:14:32 +02:00
Mitchell Richters
6f65eb2270
- Duke: Amend 7e8ef99ec9
to adjust view height where it was originally adjusted.
...
* Doing this in `renderView()` unconditionally isn't correct as it can lead to a double adjustment if `p->spritebridge == 0 && p->newOwner == nullptr`.
2021-03-28 23:21:07 +11:00
Christoph Oelckers
7e8ef99ec9
- fixed view height in Duke.
2021-03-28 13:38:27 +02:00
Christoph Oelckers
83760d4974
- fixed a few wall sprite rendering issues.
...
* masked walls were inserted into the sprite render list, causing sorting issues and depth fighting (see Duke's cameras and the 'closed' sign in Route66/Carnival.map)
* vertical and horizontal wall sprites needed their sorting functions swapped.
* plane clipping for wall sprites used bad coordinates.
2021-03-28 13:09:26 +02:00
Christoph Oelckers
b7bad558da
- added y-off-by-one-fix for y-centered sprites.
2021-03-28 12:05:29 +02:00
Mitchell Richters
ffb956749d
- HWSprite::Process()
: Fix yoff
adjustment when spr->cstat & CSTAT_SPRITE_YCENTER
.
2021-03-28 20:46:50 +11:00
Christoph Oelckers
9f48b36627
- redid sprite projection math.
2021-03-28 10:49:34 +02:00
Christoph Oelckers
fa44d75e98
- draw regular sprites.
...
Mostly functional, but the projected size is off.
2021-03-27 23:12:41 +01:00
Christoph Oelckers
7c991d59ac
- fixed bad return in sprite processing code.
2021-03-27 15:52:20 +01:00
Christoph Oelckers
0da33096c6
- fixed some wall sprite flickering issues.
2021-03-27 15:24:09 +01:00
Christoph Oelckers
e7d73fd8e7
- fixed clipping code.
...
This seems to require the old code as-is - the latest refactoring broke some stuff again and had to be reverted.
2021-03-27 15:04:16 +01:00