Christoph Oelckers
37f4843953
- changed evPostSector to receive a sector pointer instead of index.
2021-12-25 21:29:07 +01:00
Christoph Oelckers
292f100114
- pass an array of wall pointers to GetClosestSpriteSectors
2021-12-25 21:29:06 +01:00
Christoph Oelckers
d5e660a40c
- converted gHitInfo.hitwall to a pointer.
2021-12-25 21:29:06 +01:00
Christoph Oelckers
2f6bd64746
- SetWallState parameters
2021-12-25 21:29:06 +01:00
Christoph Oelckers
79da890c6e
- TranslateSector cleanup.
2021-12-25 21:29:06 +01:00
Christoph Oelckers
3f46507313
- some wall[] replaced.
2021-12-25 21:29:06 +01:00
Christoph Oelckers
378bf40143
- got rid of the mostly redundant GetWallType function.
2021-12-25 21:29:05 +01:00
Christoph Oelckers
1fc99d4733
- Blood: use wall pointers in wall utilities exclusively.
2021-12-25 21:29:05 +01:00
Christoph Oelckers
93cdaee9f0
- Blood: simplify GetWallAngle
2021-12-25 21:29:05 +01:00
Christoph Oelckers
7a7537961b
- Blood: remove GetWallAngle variant with index parameter
2021-12-25 21:29:05 +01:00
Christoph Oelckers
40ae38c173
- calcChaseCamPos.
2021-12-25 21:29:03 +01:00
Christoph Oelckers
c2613d9720
EventObject
2021-12-25 21:28:57 +01:00
Christoph Oelckers
2247509a67
- Blood baseWall optimzation
2021-12-25 21:28:51 +01:00
Christoph Oelckers
d5c27e6239
- unlimited the bit arrays for the automap and the bunch drawer, removed some leftover constants/declarations.
2021-12-25 21:28:50 +01:00
Christoph Oelckers
d30bf8c8bb
- fixed Blood's mirror render hack for Polymost.
...
This adds 4 walls and 1 sector without counting them, so we must adjust allocations and array access to handle OOB access and temporarily increase the counter for the mirror render pass.
The new renderer does not need this stuff.
2021-12-25 21:28:50 +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
e034635e12
- migrated Blood's xsector and got rid of the static global array.
2021-12-25 21:28:48 +01:00
Christoph Oelckers
993821b75f
- migrated Blood's other non-X sector properties.
2021-12-25 21:28:48 +01:00
Christoph Oelckers
f7e61eeef7
- migrated Blood's portal links into sectortype.
2021-12-25 21:28:48 +01:00
Christoph Oelckers
14907a9a97
- sector extension basics.
2021-12-25 21:28:48 +01:00
Mitchell Richters
46f4f17644
- Blood: Fix linker error under POSIX compilation environments.
2021-12-25 21:28:47 +01:00
Christoph Oelckers
94a37dfcdc
- extended walltype to directly manage Blood's XWALL.
...
Unfortunately this had to be done in the base class so that we can still maintain the walls in a global array.
The tradeoffs of better abstractions would be far too costly here than the added 16 bytes to the wall struct.
2021-12-25 21:28:47 +01:00
Christoph Oelckers
6217623c24
- Blood: removed unused/redundant functions.
2021-12-25 21:28:47 +01:00
Christoph Oelckers
a6bf9c7208
- use proper owner interface in nnext sound check.
2021-12-25 21:28:45 +01:00
Christoph Oelckers
72da21a7e3
- renamed variable for clarification.
2021-12-25 21:28:45 +01:00
Christoph Oelckers
bee70155d2
- make XSPRITE::target a pointer
2021-12-25 21:28:45 +01:00
Christoph Oelckers
d576e8f438
- removed a few of the remaining shorts.
2021-12-25 21:28:44 +01:00
Christoph Oelckers
28f7303af3
- a few automatic replacements.
2021-12-25 21:28:44 +01:00
Christoph Oelckers
93f5a111bf
- all direct references to xsector have been removed.
2021-12-25 21:28:44 +01:00
Christoph Oelckers
c54137766c
- iterator loops in sectorfx.cpp.
2021-12-25 21:28:44 +01:00
Christoph Oelckers
b3bf1bc037
- some simple replacements, mostly search & replace.
2021-12-25 21:28:44 +01:00
Christoph Oelckers
8f5b9d2f03
- nXSector is gone.
2021-12-25 21:28:43 +01:00
Christoph Oelckers
a0ef54cb54
- remove XSECTOR::reference.
2021-12-25 21:28:43 +01:00
Christoph Oelckers
4ed1ee77c7
- several more xsector references removed.
2021-12-25 21:28:43 +01:00
Christoph Oelckers
adaa132515
- lots of boilerplate sections to get a pXSector pointer replaced.
...
Looks like this was originally an inline function, judging from how this was repeated all over again.
2021-12-25 21:28:43 +01:00
Christoph Oelckers
2e8e5544c5
- ActionScan internals cleaned up.
2021-12-25 21:28:43 +01:00
Christoph Oelckers
1a8cf9b2f9
- removed pX... parameter from ActionScan.
2021-12-25 21:28:42 +01:00
Christoph Oelckers
f06697ed29
- removed pX... parameter from from trTriggerSector.
2021-12-25 21:28:42 +01:00
Christoph Oelckers
ccd6af6272
- Blood: transitioned several functions in actor.cpp to the new method to acces the x() data.
2021-12-25 21:28:42 +01:00
Christoph Oelckers
32f141ad39
- XSECTOR::reference is gone.
2021-12-25 21:28:42 +01:00
Christoph Oelckers
576a473ec8
-XWALL::references is not needed anymore.
2021-12-25 21:28:42 +01:00
Christoph Oelckers
db9d12d19f
- evrListRedirectors
...
The wall/sector parts of this look currently unused,
2021-12-25 21:28:42 +01:00
Christoph Oelckers
b23a2865b8
- useSectorLightChanger
2021-12-25 21:28:41 +01:00
Christoph Oelckers
1472d021f6
- use regular indices instead of xindices for the SEQ list.
...
This also fixes incorrect use of walls in the nnext sector checks for sequences.
2021-12-25 21:28:41 +01:00
Christoph Oelckers
c019e118a5
- cleanup of shadeList, panList and wallPanList.
...
Made them TArrays and let them store pointers to the contained objects instead of xoffsets.
2021-12-25 21:28:41 +01:00
Christoph Oelckers
c182900425
- cleanup of trTriggerWall's API.
2021-12-25 21:28:41 +01:00
Christoph Oelckers
59312c42bb
- eliminated ca. half of the xwall references.
2021-12-25 21:28:41 +01:00
Christoph Oelckers
9cad3196ed
- getSourceBusy
2021-12-25 21:28:40 +01:00
Christoph Oelckers
4cfc1577e2
- some simple xwall[] replacements.
2021-12-25 21:28:40 +01:00
Christoph Oelckers
70da9e2526
- first xwall[] removal in Blood.
2021-12-25 21:28:40 +01:00
Christoph Oelckers
19f3365efc
- Blood: add x-access functions to spritetype and walltype.
...
This is merely a refactoring aid to get everything in a state that later allows merging these into one.
2021-12-25 21:28:40 +01:00
Christoph Oelckers
47e207f158
- eliminated spritetype::index.
...
# Conflicts:
# source/games/sw/src/swactor.h
2021-12-25 21:28:38 +01:00
Christoph Oelckers
b9602bbb05
- store owner outside the sprite.
2021-12-25 21:28:38 +01:00
Christoph Oelckers
10e6486744
- fixed typo in GenDudeExtra save check.
2021-12-25 21:28:38 +01:00
Christoph Oelckers
77a23e39c5
- Blood: added closing EndObject() call to DUDEEXTRA serializer.
2021-12-25 21:28:38 +01:00
Christoph Oelckers
6705e8e51e
- moved xsprite into DBloodActor and save all relevant parts of DBloodActor.
...
This completes Blood's transition.
2021-12-25 21:28:37 +01:00
Christoph Oelckers
766d87106a
- we do not need XSPRITE::reference anymore.
2021-12-25 21:28:37 +01:00
Christoph Oelckers
3d22bfa362
- do not crunch condition info to an int.
...
Once the global sprite array is gone we need full actor info here.
2021-12-25 21:28:37 +01:00
Mitch Richters
c6f2aaf1b7
- Miscellaneous fixes to commit to change sector checks over to validSectorIndex()
.
...
* Fix missed changeover in Blood's `actSpawnSprite()`.
* Fix non-negated check on a `validSectorIndex()` call in Blood's `debrisMove()`.
* Removed a superfluous terminator in Duke's `actor.cpp`.
* Fixed bad call to `validSectorIndex()` in Exhumed's `AIAnim::Tick()`.
2021-12-25 21:28:37 +01:00
Christoph Oelckers
999ec3c95a
use validSectorIndex checks where appropriate.
...
Let’s hope that this sloppiness doesn’t have negative effects with broken maps.
# Conflicts:
# source/games/sw/src/sprite.cpp
# Conflicts:
# source/games/duke/src/prediction.cpp
# source/games/duke/src/render.cpp
2021-12-25 21:28:37 +01:00
Christoph Oelckers
a94f298600
- print new errors in red.
2021-12-16 11:56:26 +01:00
Christoph Oelckers
d011f3c201
- Blood: validate upper/lower sector links before starting a level.
...
Originally this just performed an OOB memory access, but with Raze's setup it would dereference a null pointer so these must be eliminated.
2021-12-16 11:54:55 +01:00
Christoph Oelckers
4daad25e5c
- use WORDS_BIGENDIAN directly in place of B_BIG_ENDIAN
2021-12-14 12:27:41 +01:00
Christoph Oelckers
7c4233bcf7
- replaced fallthrough__ with [[fallthrough]] as we are requiring C++17 and don't need workarounds for that.
2021-12-14 12:27:28 +01:00
Christoph Oelckers
7daa501a4d
- removed all #include "compat.h" except the one in build.h
...
Still all compiles fine.
2021-12-14 12:24:10 +01:00
Christoph Oelckers
6e43f1a15a
- Blood: refine picnum 0 filter to apply to face sprites only.
2021-12-13 17:58:11 +01:00
Christoph Oelckers
498abf25f3
- Blood: make sure that invalid sprites don't get rendered at all.
...
Seems the game may have depended on them being clipped by the floor or ceiling.
2021-12-13 11:45:28 +01:00
Christoph Oelckers
81268cb9b6
partial Revert of "- optimized vector math."
...
This reverts commit 826fd7ddb2
.
Looks like there's dependencies on the intermediate variables. The optimized code gave the same result but did not work anymore.
2021-12-02 23:32:20 +01:00
Christoph Oelckers
71dfe7ecfe
- fixed handling for cl_capfps and cl_nointerpolate to never use any smoothratio value other than 1.0.
2021-11-29 00:57:11 +01:00
Christoph Oelckers
b54e52330c
- Blood: don't play the same looped sound multiple times on the same actor.
...
This caused some strong echoing on E4M6.
2021-11-29 00:57:11 +01:00
Christoph Oelckers
1de9c63d45
- fixed center aligned rendering of 2D content.
...
This calculates the centered pivot point in integer texel coordinate space so for odd numbers it must round down instead of using a fractional position.
2021-11-29 00:57:10 +01:00
Mitch Richters
73c5bef580
- Blood: Remove duplicated code from render3DViewPolymost()
that's already performed in viewDrawScreen()
.
2021-11-29 00:56:33 +01:00
carnivoroussociety
61cafc7d57
[Blood] Fix self collisions for lifeleech projectiles
2021-11-29 00:56:33 +01:00
carnivoroussociety
958d004119
[Blood] Match view height clamping behavior to 1.21
2021-11-29 00:56:32 +01:00
Christoph Oelckers
cd3288860a
- fixed automap player drawing for follpw mode off in all games.
2021-11-29 00:56:32 +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
7126aa22f4
- preparations in the map loader for dynamically sized data storage.
...
This also consolidates these parts for Blood with the other games.
2021-11-29 00:56:25 +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
1bbbeb8f4c
- Blood: reworked GetClosestSpriteSectors to use dynamic arrays, deleted unused GetClosestSectors.
...
# Conflicts:
# source/games/blood/src/aibeast.cpp
# Conflicts:
# source/games/blood/src/aibeast.cpp
# source/games/blood/src/gameutil.h
2021-11-29 00:55:43 +01:00
Christoph Oelckers
28eca1a023
‚char‘ review in Blood - part 2
2021-11-29 00:55:42 +01:00
Christoph Oelckers
5422bff683
‚char‘ review in Blood - part 1
2021-11-29 00:55:42 +01:00
Christoph Oelckers
53998c9cb7
- Blood: remove unneeded replacement functions.
...
changespritesect is the only one called from the engine.
2021-11-29 00:55:42 +01:00
Christoph Oelckers
e9c79292ff
- Blood: use wider integer types for a few more things
...
Mainly removing shorts from all function signatures, except the engine replace interface, replacing them either with int or bool, depending on the use case.
2021-11-29 00:55:41 +01:00
Christoph Oelckers
b685163ab1
- Blood: extend all 16 bit fields holding sector or wall indices to 32 bit.
2021-11-29 00:55:41 +01:00
Christoph Oelckers
499dc9953b
- reduction of 'short' noise in Blood.
...
Mainly using int16_t for deliberately sized struct fields, auto for temporary saves of global data and making several local variables full int.
This changes nothing substantial.
2021-11-29 00:55:41 +01:00
Mitch Richters
974ca7bd1d
- Remove a lot of reference values on primitive data types from Blood's QAV interpolation system. Also use move assignments on the ignoredata
TMap when we're adding it to the game-side after processing it.
2021-11-29 00:55:31 +01:00
Christoph Oelckers
01abe7b2ac
- addressed most unused/uninitialized variable warnings from MSVC.
2021-11-29 00:55:30 +01:00
Christoph Oelckers
c6bd5c04c7
- fixed most warnings GCC pointed out in game code.
2021-11-29 00:55:29 +01:00
Mitch Richters
e491d15ff9
- Move InputScale()
out of inputstate.cpp and into i_time.cpp
as I_GetInputFrac()
to make it available to GZDoom for potential future requirements.
...
* As part of this, feed the output of `I_GetInputFrac()` to `gi->GetInput()` instead of having each game's virtual override calling it locally.
2021-11-29 00:55:01 +01:00
Christoph Oelckers
08bc31e6e2
- use GetIndex function where appropriate.
2021-11-29 00:55:00 +01:00
Christoph Oelckers
ad95033c64
- removed temporary workaround
2021-11-29 00:55:00 +01:00
Christoph Oelckers
40b22a90e9
- Blood: cleaned out some crutches needed to deal with the broken vanilla savegame code.
...
Raze has fixed its savegame format so that it can fully restore a game session from it.
As a result, nnExtInitModernStuff was never called with 'saveload' set to true and none of this code ever executed.
2021-11-29 00:55:00 +01:00
Christoph Oelckers
b6d00667de
- something insignificant that was missed.
2021-11-29 00:55:00 +01:00
Christoph Oelckers
433764fd91
- mark all places using a sprite index that needs addressing with a GetSpriteIndex function.
2021-11-29 00:55:00 +01:00
Christoph Oelckers
c40266625b
- moved gInterpolateSprite into DBloodActor
2021-11-29 00:55:00 +01:00
Christoph Oelckers
bac40ddb05
- viewBackupSpriteLoc calls
2021-11-29 00:54:59 +01:00
Christoph Oelckers
98a3564ee6
- use GetIndex for error messages and deleted several unused index variables.
2021-11-29 00:54:59 +01:00
Christoph Oelckers
21a208e59e
- eliminated most references to spritetype::extra
...
This was all places that could have been done earlier but had been overlooked.
2021-11-29 00:54:59 +01:00