Commit graph

56 commits

Author SHA1 Message Date
Christoph Oelckers
183f554733 - hitscan cleanup.
Also removed a bit of leftover TROR code.
2021-12-26 23:09:52 +01:00
Christoph Oelckers
f9b1164747 - use point2Wall wherever possible. 2021-12-26 23:09:48 +01:00
Christoph Oelckers
12f6b05cbe - use access functions, all done by search & replace. 2021-12-26 23:09:44 +01:00
Christoph Oelckers
6748a39c8f - deprecate the sector index variant of pushmove 2021-12-26 23:09:43 +01:00
Christoph Oelckers
4788c7ba5e - made Collision derive from a common base class and refactored clipmove to a single engine-side entry point.
Done for Doom so far.
2021-12-26 23:08:57 +01:00
Christoph Oelckers
063e3fb34e - changed parameters of several modern action functions. 2021-12-25 21:29:11 +01:00
Christoph Oelckers
40ae38c173 - calcChaseCamPos. 2021-12-25 21:29:03 +01:00
Christoph Oelckers
5e01841f1e - MoveSector et.al. 2021-12-25 21:29:00 +01:00
Christoph Oelckers
3bd1272e08 - sectnum removal step 2021-12-25 21:28:56 +01:00
Christoph Oelckers
22b2f64016 dukeplayer stuff 2021-12-25 21:28:55 +01:00
Christoph Oelckers
323b5441d5 — New utilities for better abstraction added. 2021-12-25 21:28:54 +01:00
Christoph Oelckers
8cca55c24a - made wall a TArray. 2021-12-25 21:28:50 +01:00
Christoph Oelckers
7d2404ce76 - made sector a TArray. 2021-12-25 21:28:49 +01:00
Christoph Oelckers
baf36a321b - inside, haskey and removed unused processmove functions. 2021-11-29 00:56:30 +01:00
Christoph Oelckers
9b6d6eb7f9 - sector[] in render interface 2021-11-29 00:56:30 +01:00
Christoph Oelckers
adf3133fdc - use sectnum and wallnum to get an index from pointers instead of subtracting the array base. 2021-11-29 00:56:26 +01:00
Christoph Oelckers
4e31360fe4 - cleaned up dragpoint
This still contained some code for EDuke32's TROR and used a shared static global array.
It now uses the BFSSearch class to manage its bit array to unlimit the size of its working set and to avoid reallocation.
2021-11-29 00:56:25 +01:00
Christoph Oelckers
7111b2470c - SW: use BFSSearch in TraverseBreakableWalls 2021-11-29 00:55:45 +01:00
Christoph Oelckers
2a51e5eca3 - fixed: BFSSearch did not mark its start sector as added.
As a result it could be added twice.
2021-11-29 00:55:44 +01:00
Christoph Oelckers
6fc43287b3 - redid Exhumed's BelowNear function.
Use BFSSearch, only run one iteration of the search and only run the search if the result is actually used.
2021-11-29 00:55:44 +01:00
Christoph Oelckers
12c26976f0 - GetClosestSpriteSectors: replace distance calculation with proper math.
No need to sample multiple points along the wall if we can just properly calculate the actual distance. :)
2021-11-29 00:55:44 +01:00
Christoph Oelckers
d2f0934726 - Blood: cleaned up GetClosestSpriteSectors
using BFSSearch now and avoiding pointless loop to avoid setting the checked bit.
The entire outcome was just as if the bit was never checked inside the loop, so do just that when not running in compatibility mode.
This simplifies the remaining code quite a lot because it now just needs to run over all walls with no special case considered.
2021-11-29 00:55:44 +01:00
Christoph Oelckers
5bb805663e - Duke/RR: cleaned up the rest of hitradius* as well
Using wallsofsector iterator plus defining local variables more locally.
2021-11-29 00:55:40 +01:00
Christoph Oelckers
821f341e03 - use BFSSearch in hitradius_d 2021-11-29 00:55:39 +01:00
Christoph Oelckers
a29e6c084a - BFSSearch class added
This was prompted by a bug that was recently introduced in one of the ad-hoc implementations of such a search.

Let’s better use a helper class to deal with the problems and help unify memory usage.
2021-11-29 00:55:39 +01:00
Christoph Oelckers
01abe7b2ac - addressed most unused/uninitialized variable warnings from MSVC. 2021-11-29 00:55:30 +01:00
Christoph Oelckers
b7465ab67b - spriteGetSlope/spriteSetSlope take spritetype pointer arguments. 2021-11-29 00:53:41 +01:00
Christoph Oelckers
a79f7a3784 - SW: use a dynamic array to track already visited sectors in TraverseBreakableWalls. 2021-11-11 21:57:55 +01:00
Christoph Oelckers
6b6c3f26a5 - use wallsofsector in a few more places. 2021-11-07 18:08:22 +01:00
Christoph Oelckers
59df3b0e19 - added a little utility that allows iterating over the walls of a sector with C++ for's. 2021-11-07 17:27:05 +01:00
Christoph Oelckers
ae08ae1d8d - some leftover shorts plus utilities that ended up unused but may be useful later. 2021-11-07 16:46:23 +01:00
Christoph Oelckers
d20aa47adf - made sector parameter of updatesectorz an int and deprecated the short version. 2021-11-06 19:27:51 +01:00
Christoph Oelckers
ff0c4359e0 - deleted unused inlines. 2021-10-11 23:03:11 +02:00
Mitchell Richters
4a70f6efd0 - Allow ticrate to be specified to timer code, while still defaulting to GameTicRate. Move out I_GetBuildTime() from common code to gamefuncs.h as part of this.
* Allow specification of floating point ticrates as it's possible Blood's QAVs could have a fractional ticrate.
2021-08-05 14:52:55 +10:00
Christoph Oelckers
5556756d43 - map fix for Hickston Swamp (RR mod) E1L3:
Wall sprite is placed in the wrong sector which makes the new renderer's far stricter checks to reduce sprite flicker fail to position it correctly.
2021-06-13 09:32:30 +02:00
Christoph Oelckers
1cea743536 - restrict lookup of engine/engine.def to the main game files.
Mods should not use this to load their data.
2021-06-09 08:38:40 +02:00
Christoph Oelckers
207298aeb4 - fixed compilation (again.) 2021-06-02 21:00:39 +02:00
Christoph Oelckers
783b94f922 - more warning fixes in 'core'. 2021-05-12 21:48:14 +02:00
Christoph Oelckers
1168341d5a - fixed more warnings in 'core'. 2021-05-12 21:47:32 +02:00
Mitchell Richters
27767f61ae - Move for (auto& m : *userConfig.AddDefs) loop from loaddefinitionsfile() into LoadDefinitions() and rework debug timer code to accommodate.
* Change also reverts 5af7be42a2.
2021-04-22 16:33:45 +10:00
Christoph Oelckers
1ea25e5d0e - reworked the def parser's main loop. 2021-04-21 18:15:25 +02:00
Christoph Oelckers
aaad546729 - palookup. 2021-04-20 20:21:51 +02:00
Christoph Oelckers
d078b511b8 - flip backwards oriented wall sprites before submitting them to the render list.
Backwards orientation will break the translucent object sorter so this needs to be sorted out beforehand.
2021-04-20 14:30:22 +02:00
Christoph Oelckers
e30dc82676 - Cleanup of the voxel code.
* moving polymost_voxdraw into polymost.cpp.
* consolidated all remaining voxel code in hw_voxels.cpp. All original Build voxel code is completely gone now, except for polymost_voxdraw, so this got moved out of the build/ folder.
* integrate Blood's voxel init code into the main function.
* some further cleanup was allowed as a result of this, so engineInit is gone now because these parts can now be done outside the games' app_init functions.
2021-04-05 18:05:43 +02: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
168b0385cf - moved shadeToLight out of build.h. 2021-03-25 09:13:59 +01:00
Christoph Oelckers
0c7f05a416 - let the clipper work exclusively on Build coordinates. 2021-03-22 23:40:25 +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
d42ce0ee7e - WIP 2021-03-20 23:01:16 +01:00