Christoph Oelckers
f2dd4ceaab
- always ensure that the global index buffer is not empty.
...
This needs to be valid for Vulkan, even if it isn't used.
2021-04-05 18:00:02 +02:00
Christoph Oelckers
96fb96617f
- backend update from GZDoom.
2021-04-05 17:59:54 +02:00
Mitchell Richters
ba90f444dd
- PlayerAngle: Repair issues with addadjustment()
method following changes in 4ffe004483
that were affecting negative input.
2021-04-05 21:41:11 +10:00
Christoph Oelckers
87efc84c84
- enable palette emulation for the new renderer.
2021-04-05 13:05:31 +02:00
Mitchell Richters
be8df3488d
- build.h: Remove function prototypes for now static functions within engine.cpp
.
2021-04-05 20:28:57 +10:00
Christoph Oelckers
090b52f783
- fixed animatesprites call in Duke.
...
This passed z instead of angle.
2021-04-05 12:25:09 +02:00
Christoph Oelckers
de2df926e1
- fixed render timing.
2021-04-05 11:54:28 +02:00
Mitchell Richters
172e3996bb
- HWSprite::Process()
: Added x-off-by-one-fix for sprites similar to yspans from b7bad558da
.
2021-04-05 19:37:00 +10:00
Christoph Oelckers
ba2defeb14
Merge branch 'master' into newrenderer2
2021-04-05 10:34:34 +02:00
Christoph Oelckers
ba41bb4c61
- fixed the viewport setup.
...
There were two problems here - the math for calculating the rect was wrong and the initial aspect ratio was also not correct.
2021-04-05 10:34:03 +02:00
Christoph Oelckers
008391a2ad
- license correction for ct_chat.cpp
...
This was supposed to get the same treatment as d_net.cpp, i.e get the old license restored and be released under a duplicate GPL/Doom Source license but it was somehow missed when it got added. Also removed all leftover Doom specific parts.
2021-04-05 08:59:06 +02:00
Christoph Oelckers
658712d893
- removed duplicate d_gui.h file.
2021-04-05 08:56:44 +02:00
Christoph Oelckers
eb2e77fb75
- Apply fix from EDuke32 commit 7225643e.
...
Fix undefined behavior/potential OOB access in ST_21_FLOOR_DOOR. g_AnimateGoal does not take a sector number, it takes an animation index, and caps at 1024, not 4096.
2021-04-05 00:14:15 +02:00
Christoph Oelckers
8e31c34b06
- fixed tileImportFromTexture.
...
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:02:04 +02:00
Christoph Oelckers
8055ff1d86
- fixed tileImportFromTexture.
...
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:00:41 +02:00
Christoph Oelckers
6315a8b039
- removed now obsolete #define.
2021-04-04 20:41:44 +02:00
Christoph Oelckers
c303884274
- better handling for Duke's scrolling cloudy skies.
...
* Using the Doom-style dome here because it looks better.
* this necessitated changes to the backend to allow both types of sky domes at the same time
* do not clamp panning fields for cloudy sky with the new renderer because this makes the texture jump.
2021-04-04 20:35:38 +02:00
Christoph Oelckers
39c457bbf2
- removed a few unused CVARs carried over from GZDoom.
2021-04-04 19:35:12 +02:00
Christoph Oelckers
ea91b5ba5d
- added a map patch for SW:WT's 'skyline' map.
...
This contains a badly tagged sky sector that makes the new renderer glitch out.
2021-04-04 18:57:03 +02:00
Christoph Oelckers
1201cc71ef
- fixed voxel rendering.
...
No, that 'while' was even pointless in Polymost, much more here where it runs within another loop.
2021-04-04 13:45:43 +02:00
Christoph Oelckers
d76c2ccc34
- voxel rotation.
2021-04-04 13:24:33 +02:00
Christoph Oelckers
55ad51ee1f
Merge branch 'master' into newrenderer2
2021-04-04 13:23:51 +02:00
Christoph Oelckers
9828cd7129
- this better have a null check...
2021-04-04 13:02:26 +02:00
Christoph Oelckers
6ebbf1288d
- Duke/RR: Don't delete master switch sprites.
...
The sound system may play sounds on them after their deletion - this resulted in undefined behavior. To ensure properly defined behavior the sprite needs to be retained at least as long as the sound controller may still need it - which cannot be reliably determined so it has to be kept around forever. This would be easier if the sound controller code had proper start and stop events instead of inferring what to do from secondary information.
Fixes #288 .
2021-04-04 13:01:32 +02:00
Christoph Oelckers
97a0cb2a10
- handle voxel rotation in the backend to enable it for all games.
...
This was previously only present in the Blood module and missed in Exhumed from upstream so the entire option was rather pointless.
Fixes #290
2021-04-04 10:33:29 +02:00
Christoph Oelckers
a298a3d3df
- disabled 'isRunning' in Blood entirely.
...
After discovering yet another misbehaving place in the game I think it can be safely concluded that this is better left off unconditionally.
The only remaining place where this still gets checked is in nnexts, but I wouldn't expect this to work either.
Fixes #292
2021-04-04 09:35:05 +02:00
Christoph Oelckers
ebac57fb4f
- fixed music in Blood's menu
...
This is only supposed to play for the fade-in of the background but needs to stop when the menu appears.
Fixes #291
2021-04-04 09:25:41 +02:00
Christoph Oelckers
d71ebace97
- fixed fog density of the new renderer.
...
The actual value needs to be a lot lower than for Polymost due to the different projection.
2021-04-03 22:51:31 +02:00
Christoph Oelckers
952bccbf5f
- added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back.
2021-04-03 21:49:28 +02:00
Christoph Oelckers
d7a13fc9f2
- same for the new renderer.
2021-04-03 21:40:32 +02:00
Christoph Oelckers
9c95c902c7
- added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back.
2021-04-03 21:40:16 +02:00
Christoph Oelckers
ab36b86a59
- sky tweaking
...
* Build skies need a different mesh for the dome - the one from GZDoom distorts them too much.
* made adjustment to the positioning math after redoing the mesh
* Exhumed abuses some strange effect of the original sky placement math which means the y-offsetting must be disabled for this game.
* RRRA sky initialization fixed. It must be done after setting up the tiles.
2021-04-03 21:06:02 +02:00
Christoph Oelckers
82bcd90755
- fixed some remaining triangulation issues.
2021-04-03 15:10:06 +02:00
Christoph Oelckers
f7dd0ec4a2
- use ZDoom's node builder for triangulating sectors that fail the simple approach.
...
As it turned out, the triangulator only works fine for regular polygons, but creates incomplete meshes for sectors with multiple sections or some degenerate areas, which are quite common with swinging doors.
The node builder is more costly and creates wall splits, of course, but it does not create broken output for degenerate sectors so it's a good fallback.
2021-04-03 12:44:30 +02:00
Christoph Oelckers
3ff3c6f50e
- fixed: stale, but still active interpolations for wall positions should not trigger sector retriangulation.
2021-04-03 10:26:02 +02:00
Christoph Oelckers
dc234ea72d
- implemented RR's geometry effect.
...
The grossest of all gross render hack that were ever done with Build...
2021-04-02 22:52:46 +02:00
Christoph Oelckers
54eee347a6
- do y-flipping of wall textures correctly.
...
1.f - h is not correct for NPOT texures due to hpw they tile.
2021-04-02 22:50:53 +02:00
Christoph Oelckers
7446d0441b
- use LGPLv2 for all Raze specific render code.
2021-04-02 18:22:54 +02:00
Christoph Oelckers
638f19172a
- voxel rendering.
...
The stock voxels of Blood and SW seem to work so far, but not all edge cases have been tested.
2021-04-02 18:20:07 +02:00
Mitchell Richters
e3c2757f1c
- sethorizon(): Ensure SB_CENTERVIEW
bit is always cleared if horizon target is set.
2021-04-02 23:23:24 +11:00
Mitchell Richters
9c01bde44e
- gameinput.cpp: Block player input within sethorizon()
and applylook()
if target for each has been set by the ticker.
...
* Stops players having the ability to provide input and fight the system trying to set an input.
2021-04-02 22:47:19 +11:00
Mitchell Richters
4ffe004483
- Further work within PlayerAngle
and PlayerHorizon
structs following 39fe9efaff
and bf2d8078a4
.
...
* Reduce code repetition.
* Clamp incoming horizon when using `settarget()` methods.
* Eliminate double calculation that was occurring in `processhelpers()`.
2021-04-02 22:47:17 +11:00
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
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
Christoph Oelckers
d1c23d1ad0
- fixed wall sprite rendering.
2021-03-27 14:18:33 +01:00
Christoph Oelckers
efe0d57fca
- removed all the decal stubs.
...
Build has wall sprite for decals so this is redundant and ultimately not usable.
2021-03-27 13:26:11 +01:00
Christoph Oelckers
d0f38d7362
- wall sprite WIP.
2021-03-27 13:22:34 +01:00
Christoph Oelckers
1dfb2672a8
- flat sprite rendering!
2021-03-26 20:28:44 +01:00
Christoph Oelckers
fd0e9824b6
- call the game specific analyzesprites functions.
2021-03-26 15:06:14 +01:00
Christoph Oelckers
098db655ab
- did some fudging on the scene viewport until thinks looked right again.
...
I have no idea, though, why it has to be this particular formula, though. It doesn't seem to make any sense.
2021-03-26 01:55:24 +01:00
Christoph Oelckers
be7bca8e9e
- expose animatesprite set of functions to new renderer as a callback.
2021-03-26 10:05:01 +01:00
Christoph Oelckers
0b1e81023f
- added sprite collection loop to ProcessSector and did a bit of cleanup on the TSprite code.
2021-03-25 23:16:32 +01:00
Christoph Oelckers
f6568fee0c
- rewrote SW portal setup to use static data instead of ad-hoc setup.
...
This was by far the messiest game, there's two reasons for this.
First, the portal links do not need to be in an actual portal sector, so they cannot be used to detect portal sectors.
Second, the game moves portals in place, so all offsets are (0,0,0) so that not even these can be used for detection.
The only working method is the super-complicated original way to look up portals at run time, just being done at map start.
Having static portal links should reduce the render glitches quite significantly because the renderer knows now which sectors belong to a portal and can use this information to ensure proper processing.
2021-03-25 21:21:48 +01:00
Christoph Oelckers
af54cf3a3c
- made SW's sector portals operational.
...
Unlike the other games these are so poorly defined that the engine has to rely on the original fudging to pick the proper portal to link to. As a result they are just as limited as they always were.
In addition all the portal search code had to be reinstated.
2021-03-25 16:45:40 +01:00
Christoph Oelckers
168b0385cf
- moved shadeToLight out of build.h.
2021-03-25 09:13:59 +01:00
Mitchell Richters
957f7e9487
- Accept binangle, fixedhoriz and lookangle classes in SetupViewpoint()
vs. Q16.16 variables.
...
* Allows for more precision than Q16.16.
* Used as opportunity for `rollang` to be set using the `asdeg()` method, not `asbuildf()`.
2021-03-25 19:06:01 +11:00
Christoph Oelckers
463dbc4c4f
- fixed issue with empty voxel slots.
2021-03-25 08:37:44 +01:00
Christoph Oelckers
13bbf0a4f9
- sector portals in RRRA are working.
2021-03-24 23:55:10 +01:00
Christoph Oelckers
dbbdfaa4ba
- sector portals in Blood are working.
2021-03-24 23:11:06 +01:00
Christoph Oelckers
368b2319f2
- replaced 'static FORCE_INLINE' globally with 'inline'.
...
I have no idea what kind of compiler needs such a construct, it's totally not how C++ should be written.
2021-03-24 21:43:36 +01:00
Christoph Oelckers
b7e8815133
- some further lightening of compat.h.
2021-03-24 21:13:36 +01:00
Christoph Oelckers
8993095bc0
- got rid of pow2char
2021-03-24 20:37:20 +01:00
Christoph Oelckers
d8627a2b3f
- removed all remains of projection math weirdness from the automap code in the games plus a bit more cleanup of the engine code.
2021-03-24 20:28:58 +01:00
Christoph Oelckers
022edd2dc2
- cleaned engine.cpp off all code exclusive to the Polymost renderer.
2021-03-24 19:45:42 +01:00
Christoph Oelckers
e47b4507e4
- serialize the sector portal offset table.
...
Due to where this happens, the init code for these portals cannot be run when loading a savegame so it has to be saved.
2021-03-24 18:42:00 +01:00
Christoph Oelckers
1297e4ed02
- SW's line to sprite portals are working now.
...
Also fixed a clipper issue with Blood's line to line portals.
2021-03-24 10:33:50 +01:00
Christoph Oelckers
9903b39cf5
- make Blood's line to line portal operational.
...
Note that these portals cannot be rotated, so to preserve bad setups this limitation needs to be replicated.
If we want proper line to line portals for all games they need to be made a different portal type.
2021-03-24 09:04:48 +01:00
Christoph Oelckers
829be9b56b
- use value parameters for arguments in binaryangle.h.
2021-03-24 09:02:07 +01:00
Christoph Oelckers
087da46522
- finally got mirrors working.
2021-03-23 21:23:49 +01:00
Christoph Oelckers
c681fa6699
- use Build math for mirror transitions.
2021-03-23 20:30:19 +01:00
Christoph Oelckers
46e0b16370
- fixed ordering issues in drawer
...
* do not check the clipper in the collection pass to reduce number of bunches. Clipping here brings no performance gain.
* fixed the loop reset in FindClosestBunch to actually process the array's first element.
2021-03-23 19:20:06 +01:00
Christoph Oelckers
0c7f05a416
- let the clipper work exclusively on Build coordinates.
2021-03-22 23:40:25 +01:00
Christoph Oelckers
096ce5e025
- initial sky fixes.
2021-03-22 16:02:52 +01:00
Christoph Oelckers
a12f277846
- fixed uninitialized clear color variable.
2021-03-22 12:07:51 +01:00
Christoph Oelckers
e884a418f8
- portal WIP
2021-03-22 12:07:29 +01:00
Christoph Oelckers
cecfbb76e8
- fixed uninitialized clear color variable.
2021-03-22 12:07:15 +01:00
Christoph Oelckers
63f057d93f
- portal and sky WIP.
2021-03-21 22:48:01 +01:00
Christoph Oelckers
75159e06c0
- uncommented the portal code in hw_walls.cpp.
2021-03-21 19:36:55 +01:00
Christoph Oelckers
9fe462d358
- adapted GZDoom's portal framework.
...
Not tested yet and somewhat stripped down, as the portals this needs to support are a lot less complex - plus some of the issues in Doom do not apply here.
2021-03-21 18:41:23 +01:00
Christoph Oelckers
98e4a3035d
- updated the earcut.hpp triangulator.
...
The old one wasn't triangulating the bathroom sector in DUKEDC2 properly, the bug got fixed upstream in the mean time.
2021-03-21 17:18:15 +01:00
Christoph Oelckers
09a9e14feb
- set up engine portals for SW.
...
Also moving more code to _polymost.cpp which is only needed for ad-hoc lookup of portals with a client side implementation of a two-layer renderer.
2021-03-21 17:04:06 +01:00
Christoph Oelckers
a36377111c
- engine-side portal setup for Blood and RRRA.
2021-03-21 14:48:35 +01:00
Christoph Oelckers
b91441f849
- same render interface rework for Shadow Warrior.
2021-03-21 12:22:50 +01:00
Christoph Oelckers
757d7be18b
- updated the earcut.hpp triangulator.
...
The old one wasn't triangulating the bathroom sector in DUKEDC2 properly, the bug got fixed upstream in the mean time.
2021-03-21 11:54:39 +01:00
Christoph Oelckers
ecd6e68d69
- made render call adjustments to Exhumed.
...
This one was easy - no special cases at all. :)
2021-03-21 11:48:18 +01:00
Christoph Oelckers
6f7e7459ea
- did some cleanup on Duke's render code to prepare for the new way of handling portals.
...
Like for Blood, the Polymost-only code has been moved aside.
Closer examination of the preparations the engine is doing for rendering SE40/150-portals shows that all this was merely done to avoid glitches with a two-phase rendering setup - nothing of this will be needed for doing it properly.
They can just be treated as run-of-the-mill stacked sectors. when using hardware rendering capabilities for clipping.
2021-03-21 10:58:11 +01:00
Christoph Oelckers
9f36ef69e6
- fixed variable name clash caused by viewUpdateShake's global variables.
...
removed the redundant call in the Ticker, because all its results are discarded.
Use arguments instead of global variables to pass data around.
2021-03-21 08:58:38 +01:00
Christoph Oelckers
d42ce0ee7e
- WIP
2021-03-20 23:01:16 +01:00
Christoph Oelckers
4109a256ac
- Blood: cleanup of render code.
...
Renaming of disassembly variables and moving of disabled Crystal Ball renderer to a separate function.
2021-03-20 19:20:42 +01:00
Christoph Oelckers
f30a568858
- moved wallfront function into polymost.cpp.
...
This was one of the few functions left in engine.cpp that accesses the global scene state.
2021-03-20 19:10:46 +01:00
Christoph Oelckers
91957e40f1
- moved some original Raze code out if the Build folder.
2021-03-20 17:08:55 +01:00
Christoph Oelckers
fedfc2cfa4
- removed global variables that were only being used by the automap drawer plus a few other obsolete things.
2021-03-20 16:46:06 +01:00
Christoph Oelckers
30f4e2b29d
- replaced the engine automap drawer with one leveraging the newly added sector geometry data.
...
This eliminates a lot of code depending on Build's projection math.
2021-03-20 16:20:48 +01:00
Christoph Oelckers
88706e8e13
- added a cache for the sector geometry.
...
Now it only needs recreation if the sector changes.
2021-03-19 23:18:09 +01:00
Christoph Oelckers
5a0c8da6bf
- Duke: fixed some incorrect assignments in CON parser
2021-03-19 23:18:09 +01:00
Christoph Oelckers
3df5c440f9
- added some helpers to make it easier to determine if a sector's geometry has been altered.
...
Walls had no sector reference so this was added for marking the sector as altered when a vertex gets dragged around.
2021-03-19 23:18:09 +01:00
Mitchell Richters
895b875453
- Invert rollang
in hw_entrypoint.cpp:SetupView().
2021-03-20 08:35:17 +11:00
Christoph Oelckers
93bb774573
- flat alignment.
...
This still gets redone each frame for each sector and needs to be buffered
2021-03-19 19:53:55 +01:00
Christoph Oelckers
a5b3a1dd3e
- removed some unused things from engine.cpp.
2021-03-19 15:12:54 +01:00
Christoph Oelckers
76682c72e3
- removed krecipasm.
...
Analyzing the results, this is not needed as its precision is virtually the same as floating point math, so its one use got replaced.
2021-03-19 14:23:41 +01:00
Christoph Oelckers
dd15fc54c1
- top texture means RENDERWALL_TOP, not that it matters much at the moment...
2021-03-19 12:02:20 +01:00
Christoph Oelckers
ff8ca99e2b
- fixed y alignment of bottom textures.
...
Despite other settings, they will always take the panning info from their backside.
2021-03-19 11:51:38 +01:00
Christoph Oelckers
f8de712b81
- fixed horizontal panning for bottom textures.
2021-03-19 11:22:24 +01:00
Christoph Oelckers
385cc8cbbd
- NPOT texture alignment fixes.
...
The checks in CheckTexturePosition were not correct and caused unwanted texture shifting.
Also inlined GetYPanning into DoTexture because the pow2size value is needed there and the rest is a simple one-liner to scale the panning.
2021-03-19 10:29:38 +01:00
Christoph Oelckers
9406e6d2ad
- fixed the biggest issues with flat rendering
2021-03-18 23:22:51 +01:00
Christoph Oelckers
7dd5b508c8
- flat rendering WIP.
...
Still buggy triangulation and no texture alignment, but it renders something.
2021-03-18 21:50:02 +01:00
Christoph Oelckers
0579368626
- removed render.cpp, now that everything is in its proper place.
2021-03-18 17:24:58 +01:00
Christoph Oelckers
547ed4e415
- route everything through the full backend, now completely bypassing the intermediate GLInstance layer.
2021-03-18 17:18:03 +01:00
Christoph Oelckers
4cf2493cfd
set up the entry point for the renderer.
2021-03-18 14:49:36 +01:00
Christoph Oelckers
c4b3523f05
- moving utilities to more appropriate places.
2021-03-18 12:49:33 +01:00
Christoph Oelckers
6068427270
- port the bunch drawer to the backend's core.
2021-03-18 12:32:31 +01:00
Christoph Oelckers
af6c6c8ef0
- added the DrawInfo class.
2021-03-18 10:23:53 +01:00
Christoph Oelckers
e9dd1c104b
- started adding the draw list code from GZDoom.
2021-03-18 10:19:13 +01:00
Christoph Oelckers
0f28069f96
- fixed NPOT shader parameters. RR E1L1's hedges render properly now.
...
- fixed a few places where wall[0] was accessed.
2021-03-18 09:20:38 +01:00
Christoph Oelckers
2d958745b4
- fixed: Polymost must set the viewpoint if renderers are switched.
...
- fixed coordinate order in renderSetViewpoint
- fixed backwall checks accidentally testing wall 0 instead of the current wall.
2021-03-18 00:28:38 +01:00
Christoph Oelckers
493294909b
- fixed texture alignment
...
Most cases should be correct now.
2021-03-17 23:29:13 +01:00
Christoph Oelckers
47dce8de8c
- partially fixed y-panning and removed the aspect factor.
...
y-panning is still not correct for all cases but better than before. The aspect factor is not needed, it looks like an artifact of both the software renderer and Polymost.
We get the same dimensions with proper matrices by setting this to 1.
2021-03-17 20:02:50 +01:00
Christoph Oelckers
65097c4098
- set proper visibility factor and viewport.
2021-03-17 19:07:00 +01:00
Christoph Oelckers
b492cbcebb
- ported my old Build-style renderer for Doom from 2008 and the wall renderer from GZDoom to work with Build data.
...
It renders walls, but y-panning is still broken.
2021-03-17 16:54:36 +01:00
Christoph Oelckers
9ebd8fd4a5
- put all of Polymost in a namespace.
...
So that its static variables are properly separated from the rest.
2021-03-17 15:55:25 +01:00
Christoph Oelckers
c6f83fa8bd
- added GZDoom's clipper.
2021-03-15 19:11:18 +01:00
Christoph Oelckers
a484e39e05
- removed integer square root code.
...
On modern systems using the sqrt function with a cast to int has no relevant performance disadvantage anymore so there's no need for all of this.
2021-03-15 19:02:08 +01:00
Christoph Oelckers
7c68261fbf
- redirect Exhumed's shareware exit to the main menu.
2021-03-15 18:58:28 +01:00
Christoph Oelckers
ac82838859
- removed unused 'wallvisible' function.
2021-03-15 18:58:14 +01:00
Christoph Oelckers
8aa59f2385
- use clamp instead of bit masking to handle out of range interpolation factors for models.
2021-03-15 11:35:39 +01:00
Christoph Oelckers
60979ee478
- fixed: G_BuildTiccmd needs to clear the command struct.
...
This could otherwise pick up some stray data from earlier calls and create bogus input.
Fixes #97
2021-03-15 10:11:49 +01:00
Christoph Oelckers
834da8b83b
- Exhumed: refresh the status bar after loading a saved game.
...
It is actually not necessary to save the state - but the RefreshStatus function must be called to update all current values.
Fixes #282
2021-03-14 12:57:23 +01:00
Christoph Oelckers
90cb82d244
- disable the player specific volume modifiers if replay gain is enabled.
...
These two functions would get into the way of each other otherwise.
2021-03-14 09:05:28 +01:00
Christoph Oelckers
aa789c7605
- adapt to changed value range of module master volume in ZMusic.
...
The default was far too quiet and had to be increased to let the player have comparable output to the rest of the music system.
2021-03-14 08:51:59 +01:00
Christoph Oelckers
8ae5d0b30e
- backend update from GZDoom.
2021-03-13 01:21:38 +01:00
Christoph Oelckers
f4b27bbd27
- sort the game selection list by definition order in grpinfo.txt.
...
This is to have consistent ordering, independent of where the files are found.
Game order is: Duke, Blood, Shadow Warrior, Redneck Rampage, Nam, WW2GI, Exhumed, all the official mission packs are grouped below the game they belong to.
2021-03-12 23:45:03 +01:00
Christoph Oelckers
25bf0854cf
- allow game specific music names for all games supporting an Ogg-format CD audio soundtrack.
...
New names are:
REDNECKxx.ogg for Redneck Rampage
REDNECKRIDESxx.ogg for RR Rides Again.
SHADOWxx.ogg for Shadow Warrior.
The motivation here is to allow copying all this music to a single folder or .zip file and reference it from all games.
2021-03-12 23:15:34 +01:00
Christoph Oelckers
d7f720664a
- Exhumed: fixed uninitialized variables in Queen boss when reloading a savegame.
2021-03-09 22:18:43 +01:00
Christoph Oelckers
df742d25db
- Exhumed: Replace asserts for range checks with if's.
...
Asserts are mere debugging aids, the code was still trashing valid date in release builds.
2021-03-09 20:02:08 +01:00
Christoph Oelckers
e375c799ce
- CommonLoon102's weapon fixes from NBlood:
...
Fix bug when switching to another weapon from the spray while firing with primary fire won't switch to the new weapon. And telling Caleb not to put away his lighter if the spray is being switched to TNT.
Do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray.
Do not put away lighter if TNT was selected while throwing a spray can.
Fix next/prev weapon
2021-03-09 09:31:04 +01:00
Christoph Oelckers
ee5950e7ad
- backend update from GZDoom.
2021-03-07 13:21:15 +01:00
Christoph Oelckers
ad8654ed06
- fixed maphack loader.
...
The duplicate 'currentSprite' variable prevented it from doing anything.
Also cleaned up the interface a bit to avoid using a global variable for parameter passing.
Fixes #279
2021-03-07 09:39:16 +01:00
Christoph Oelckers
9104fba3ec
- moved colormap constants to backend.
2021-03-06 23:06:26 +01:00
Christoph Oelckers
5b85105762
- re-added the fix for the inverted card reader in Twin Dragon's Map 10.
...
This accidentally got lost when the one-sided key fix was generalized.
2021-03-06 12:20:03 +01:00
Christoph Oelckers
57a6bfcdcd
- Blood: fixed typo in map loader that overwrote the floor y panning offset with its fractional part.
2021-03-03 13:26:58 +01:00
Christoph Oelckers
cb14e3023e
- fixed "roll" in maphack parser
2021-03-02 21:47:43 +01:00
Christoph Oelckers
bbd5c0ac8b
- transitioned voxel rendering to use the backend's implementation.
2021-03-02 17:10:34 +01:00
sinisterseed
8d5682fa97
- version bump.
...
We're past 0.8 for some time now, and slowly approaching 1.0 :) .
2021-03-02 17:53:25 +02:00
Christoph Oelckers
4b59acd251
- Blood: Check the sound's internal loop flag when playing a sound.
...
Fixes #275
2021-03-02 11:59:20 +01:00
Mitchell Richters
e0f1a83f40
Revert "- SW: Alt implementation for preparing a nuke."
...
This reverts commit 4fcec5f6d3
.
Functionality wasn't working properly, most players will never use it and care only for 100% originality. Was a nice idea, though.
# Conflicts:
# source/core/gamecvars.cpp
# source/games/sw/src/panel.cpp
2021-03-02 20:02:20 +11:00
Christoph Oelckers
b9050b1a35
- Blood: properly clip the gauge for throwing dynamite force instead of stretching it.
2021-03-02 03:31:10 +01:00
Christoph Oelckers
a7dc86583f
- Blood: commented out cultist code that should not be entered due to the 'isrunning' bug.
2021-03-02 03:04:14 +01:00
Christoph Oelckers
34bda2c962
- address excessive view swaying in Blood.
...
It is totally unclear what happened here in the original code, but the info apparently never reached the place where it's being checked. BloodGDX just ignores it so we do now, too.
2021-03-01 19:28:47 +01:00
Christoph Oelckers
2f2d0443f2
- fixed size setup for most menus.
...
All of Raze's menus scale to 320x200 and to get proper mouse coordinates the definitions must reflect that as well.
Fixes #271
2021-03-01 13:08:10 +01:00
Christoph Oelckers
80404558f6
- RR: Fixed the drink and eat meters on the status bar.
...
Turned out that the status bar's DrawGraphic cannot handle it with its coordinate hackery, this needs a separate, cleaner interface function that does not mess around with the pivot which needs to be passed unaltered to the backend to properly rotate around it
2021-02-28 22:34:52 +01:00
Christoph Oelckers
fa8ca81460
- SW: added persistent copy of oz.
...
The door movement code uses oz for its position checks so we need a persistent version of it that survives uncontrolled changes from the engine side.
2021-02-28 12:35:34 +01:00
Christoph Oelckers
d31fe01b6d
- skill stuff for Exhumed.
...
Just for fun. ;)
2021-02-27 14:08:08 +01:00
Christoph Oelckers
ce87e18f90
- block Escape to toggle the console while AppActive is false.
...
This is for testing #174 - this is the only place in the code where the escape key is explicitly checked.
2021-02-27 13:47:30 +01:00
Christoph Oelckers
d28d5a5e1f
- use real fog, even in palette emulation mode.
...
Using the palette to apply fog is just far too broken and cannot be kept in check with all the hacks the Build engine allows.
This only works if all elements on screen use the identity translation lookup which is basically never the case.
Real fog, on the other hand, can easily be applied to everything.
2021-02-27 13:30:52 +01:00
Christoph Oelckers
1e8ebf2306
- removed unused variables in Exhumed's status bar code.
2021-02-27 12:37:25 +01:00
Christoph Oelckers
d0cf9d65e7
- use 2D size in 2D code, not the engine's screen dimensions.
2021-02-27 12:33:47 +01:00
Christoph Oelckers
2094b6420f
- use local screen size variables in automap code.
2021-02-27 12:30:20 +01:00
Christoph Oelckers
783328c5fa
- removed some unused declarations.
2021-02-27 12:29:07 +01:00
Christoph Oelckers
e470c59263
- Exhumed: Set opos for all dynamically spawned sprites.
...
Fixes #253
Let's hope this covers everything, the code is a bit scattered...
2021-02-27 00:16:03 +01:00
Christoph Oelckers
ba5ede65b8
- backend update from GZDoom.
2021-02-26 19:06:10 +01:00
Christoph Oelckers
b15810e173
- SW: fixed crash with credits screen and CD tracks missing.
2021-02-26 18:58:13 +01:00
Christoph Oelckers
4c915180da
- fixed stale pointer access in Unix version of D_AddFile.
...
Pointer was assigned a buffer of a local variable that went out of scope before checking its content.
Fixes #268 (hopefully)
2021-02-26 13:28:02 +01:00
Christoph Oelckers
a46792e519
- fixed SE21 handler.
...
This one is most prominently noticeable in WW2GI's first map where blowing up a crack has no effect.
This must have happened when removing all those dangerous pointer to long casts that were so popular back in the bad old days.
Fixes #266
2021-02-26 13:14:44 +01:00
Christoph Oelckers
99f1f0952a
- little bit of engine cleanup.
2021-02-25 12:16:21 +01:00
Mitchell Richters
4589f6f26d
Merge remote-tracking branch 'public/chasecam_unification'
2021-02-25 20:33:36 +11:00
Rachael Alexanderson
4c0591a25b
- port over -noautoexec
that I did from GZDoom
2021-02-21 11:12:19 -05:00
Mitchell Richters
1d48ac537a
- Exhumed: Replace original chasecam code with calcChaseCamPos()
within game.
2021-02-18 22:14:39 +11:00
Mitchell Richters
cff97c9cf3
- calcChaseCamPos(): Restore original algorithms for new position via GameInterface struct.
...
* Averaging out the values was a net negative for all games. Each games' original value is tuned to the specific games.
2021-02-18 21:47:39 +11:00
Mitchell Richters
ba57429ac6
- Blood, Duke & SW: Create new backend chasecam function and replace game-specific versions with it.
...
* Based off SW's implementation.
2021-02-18 21:47:37 +11:00
Mitchell Richters
2abda0e27d
- All Games: Migrate each game's clock counter to backend solution.
2021-02-18 21:47:33 +11:00
Christoph Oelckers
c96e04e6c9
- backend update from GZDoom.
2021-02-12 14:44:54 +01:00
Christoph Oelckers
5b6aa372ea
- fixed autoaim check and adjusted presentation in the menu to be correct for all games.
...
Fixes #264
2021-02-06 10:56:11 +01:00
Christoph Oelckers
ba22df2a2a
- removed unused I_GetBuildTimeFrac function.
2021-02-03 12:18:58 +01:00
Christoph Oelckers
8e0c50c22c
- fixed: F2DDrawer::AddPoly was missing a texture validation check.
...
This caused problems when the automap wanted to render portal planes, which normally use an invalid texture as marker.
Fixes #263
2021-02-02 23:13:40 +01:00
Christoph Oelckers
cf672b508f
- removed unused 'updatesectorexclude' function.
2021-02-02 23:13:40 +01:00
Mitchell Richters
b1290448c5
- Duke: Slightly tune texty
in FullscreenHUD1()
to line it up perfectly.
2021-02-01 18:42:41 +11:00
Christoph Oelckers
8ffda1c9d1
- Duke: Calculate the true font height of the numbers for alignment in the Statusbar.
...
The original tiles are all 15 pixels tall, but depending on the games can vary in their true height, so use CheckRealHeight on them to get their true dimensions.
Fixes #250
2021-02-01 00:09:22 +01:00
Christoph Oelckers
30e8111979
- fix inventory selector positioning in WW2GI.
...
This must have abused some quirk of the original code to be this far off...
2021-01-30 23:51:50 +01:00
Christoph Oelckers
40593b866f
- WW2GI: fixed event numbering.
...
There is a typo in the CON files that assigns EVENT_AIMUP and EVENT_AIMDOWN the same number. The source did not replicate this which caused several events to call the wrong handler.
Fixes #252
2021-01-30 23:42:44 +01:00
Christoph Oelckers
a0be30facb
Revert "- Exhumed: Tune x offset alignment in DrawStatusAnims()
following changes in 220283d1ec3cba03f455bd96bcf130df777b5635."
...
This reverts commit c08583ebc1
.
This does not work as intended.
Fixes #261
# Conflicts:
# source/games/exhumed/src/status.cpp
2021-01-30 10:55:58 +01:00
sinisterseed
19e7419896
- Exhumed: Fixed key offsets.
...
An int can't store a float, effectively truncating to 0 and not holding the 0.5. Thanks MJ :) .
Partially addresses #262 - The Torch icon bouncing in the HUD still remains.
2021-01-30 11:50:33 +02:00
Mitchell Richters
f11501883d
- Exhumed: Make 3rd person camera properly interpolated.
2021-01-30 11:23:38 +11:00
Mitchell Richters
e66960d9fc
- Exhumed: Ensure ox/oy/oz sprite positions are set when warping to coordinates.
2021-01-30 11:22:46 +11:00
Christoph Oelckers
e7ab4cd176
- backend update from GZDoom.
2021-01-29 13:20:00 +01:00
Christoph Oelckers
7b72fccfa2
- fixed hires replacement code not to destroy the intended translation in case there is no replacement.
2021-01-29 13:08:26 +01:00
Mitchell Richters
c08583ebc1
- Exhumed: Tune x offset alignment in DrawStatusAnims()
following changes in 220283d1ec
.
2021-01-29 22:11:03 +11:00
Christoph Oelckers
52ba0461bc
- fixed hires lookup for tiles using special palettes.
...
In these cases the palette needs to be ignored and the base version picked. The proper handling for this case was undefined, working in some cases and not in others.
Fixes #247
2021-01-29 11:48:32 +01:00
Mitchell Richters
ff0be3079e
- m_fixed.h: Fix incorrect return type for MulScaleF()
originating from 8cf2588bad
.
2021-01-29 21:19:15 +11:00
Mitchell Richters
c267c214c2
- Duke: Repair jumping zvel issue originating from 5e45f988e3
for Duke and 1c5c90d00f
for RR.
...
* Thanks for backtracing, Graf :)
* Fixes #259 .
2021-01-29 20:00:15 +11:00
Christoph Oelckers
26c5d5aa32
- SW: fixed issue with autoselecting single episode entries with non-empty subtitles.
...
This case needs different offsets.
2021-01-27 23:53:26 +01:00
Christoph Oelckers
3163e4a799
- check for invalid tiles being passed to the 2D renderer.
...
Since mods can actually replace valid tiles with invalid ones, the low level render code needs to check this case.
2021-01-27 23:52:40 +01:00
Christoph Oelckers
8cf3e50ade
- removed bad 'pos' setup in PreDrawStackedWater
...
This was a) supposed to set 'opos' not 'pos' and is b) redundant because here both Users point to the same sprite.
Fixes #261
2021-01-25 18:07:49 +01:00
Christoph Oelckers
981a2c7e5c
- Exhumed: restored old static switch array.
...
There's side effects in here that broke the door logic and made doors automatically open sometimes.
2021-01-24 14:49:51 +01:00
Christoph Oelckers
1ab11a02e2
- RR: fixed player input for diving.
...
Fixes #260
2021-01-24 08:59:08 +01:00
Christoph Oelckers
7f75b2274f
- code updates from PCExhumed.
2021-01-19 09:44:16 +01:00
Rachael Alexanderson
47f0370512
- add some 21:9 presets
2021-01-18 06:25:04 -05:00
Rachael Alexanderson
3f30d91323
- 21:9 improvements
...
- vid_aspect is now set to change to 21:9's ACTUAL aspect - 64:27
- screen elements now scale to 64:27 properly. to restore classic behavior, set cvar `vid_allowtrueultrawide` to false
2021-01-17 11:45:12 -05:00
Christoph Oelckers
042795612e
- Exhumed: Refined sector movement code so that pickups get always moved even when not touching the floor.
...
... because it seems to be inevitable that games have to exploit some implementation shortcomings...
2021-01-16 23:42:34 +01:00
Christoph Oelckers
c342594691
- Exhumed: fixed wall scrollers.
2021-01-14 23:55:45 +01:00
Christoph Oelckers
91f8df48c6
- Exhumed: changed MoveSectorSprites so it only moves sprites that actually stand on the sector's floor.
...
Since this had no check for z it even moved things floating above a lift or players hanging over a dropoff with the lift below.
2021-01-12 20:57:28 +01:00
Christoph Oelckers
fc11f537f7
- project cleanup
...
* moved all games into the 'games' folder.
* fixed project to include all sources and move them to the proper folders.
2021-01-10 20:31:32 +01:00
Christoph Oelckers
a74419f5e7
- Exhumed: removed opos entirely.
2021-01-10 18:30:56 +01:00
Christoph Oelckers
b0e5e9fc72
- Exhumed: fixed camera position interpolation.
...
This was still using old the old game-specific method.
Moving up a lift now interpolates properly, but there's still an unrelated issue when moving down.
2021-01-10 18:15:28 +01:00