Commit graph

985 commits

Author SHA1 Message Date
Christoph Oelckers
b063e19980 - gFX.fxSpawnActor and a few other simple replacements. 2021-12-25 21:29:14 +01:00
Christoph Oelckers
d99542a678 - get*slope and sfxPlay3DSound 2021-12-25 21:29:14 +01:00
Christoph Oelckers
9343e3f9c4 - handle most cansee calls. 2021-12-25 21:29:13 +01:00
Christoph Oelckers
c8f4caf364 - animatesprite.cpp. 2021-12-25 21:29:13 +01:00
Christoph Oelckers
a34e89c8b7 - debrisMove + getting rid of the index based ClipMove variant. 2021-12-25 21:29:13 +01:00
Christoph Oelckers
94671c5b05 - MoveMissile + GetZRangeXYZ 2021-12-25 21:29:13 +01:00
Christoph Oelckers
9a85ff9bad - MoveThing 2021-12-25 21:29:13 +01:00
Christoph Oelckers
611d35222e - MoveDude 2021-12-25 21:29:13 +01:00
Christoph Oelckers
6ee9ae7ec6 - actFloorBounceVector 2021-12-25 21:29:12 +01:00
Christoph Oelckers
38c0bc915d - get rid of '.sectnum'. 2021-12-25 21:29:12 +01:00
Christoph Oelckers
669aa033e9 - wrap the bit tests for GetClosestSpriteSectors's return.
They need to check spritenum which is supposed to go away, so this function avoids keeping obsolete references.
2021-12-25 21:29:12 +01:00
Christoph Oelckers
368a21f75e - useDataChanger + setDataValueOfObject 2021-12-25 21:29:12 +01:00
Christoph Oelckers
a7fc5d2193 - refactored most wall[] references.
What's left is in either setup code or the mirror setup.
2021-12-25 21:29:12 +01:00
Christoph Oelckers
dd1e7dd94f - use HITINFO to let ActionScan return its result. 2021-12-25 21:29:11 +01:00
Christoph Oelckers
6fcc652111 - usePictureChanger + useIncDecGen
# Conflicts:
#	source/games/blood/src/nnexts.cpp
2021-12-25 21:29:11 +01:00
Christoph Oelckers
96b6bb21ef - several smaller places.
This gets rid of the less frequent names to look for.
2021-12-25 21:29:11 +01:00
Christoph Oelckers
063e3fb34e - changed parameters of several modern action functions. 2021-12-25 21:29:11 +01:00
Christoph Oelckers
759a8428fa - dragPoint 2021-12-25 21:29:11 +01:00
Christoph Oelckers
7bffcad49f - trMessage* functions.
# Conflicts:
#	source/games/blood/src/eventq.cpp
2021-12-25 21:29:10 +01:00
Christoph Oelckers
45a8654fc2 - use EventObject in SEQINST 2021-12-25 21:29:10 +01:00
Christoph Oelckers
2721a59dc4 - use wall pointers in gib code. 2021-12-25 21:29:10 +01:00
Christoph Oelckers
f07fafea9c - use EventObject for OBJECTS_TO_TRACK. 2021-12-25 21:29:10 +01:00
Christoph Oelckers
dbbca2972a - use EventObject for condition serials. 2021-12-25 21:29:10 +01:00
Christoph Oelckers
da4ec51782 - convert info to an event object in condCheckMixed before doing any checks. 2021-12-25 21:29:09 +01:00
Christoph Oelckers
2b2a8c3ec8 - condPush cleanup in nnexts.cpp. 2021-12-25 21:29:09 +01:00
Christoph Oelckers
2c3d2f4850 - remove the RXBUCKET alias 2021-12-25 21:29:09 +01:00
Christoph Oelckers
9e02da6380 - alias RXBucket to EventObject. 2021-12-25 21:29:09 +01:00
Christoph Oelckers
483b28b258 - uses bucket interface in evSend. 2021-12-25 21:29:09 +01:00
Christoph Oelckers
1de75d2c0f - use wrapper stuff in GetBucketChannel. 2021-12-25 21:29:09 +01:00
Christoph Oelckers
042520e447 - variants of nnExtTriggerObject and getDataFieldOfObject that work directly on an RXBUCKET element. 2021-12-25 21:29:08 +01:00
Christoph Oelckers
10dc47a9bf - some remaining RXBUCKET access in nnexts.cpp 2021-12-25 21:29:08 +01:00
Christoph Oelckers
f775fe577c - use RXBUCKET interface in nnext's fight code. 2021-12-25 21:29:08 +01:00
Christoph Oelckers
f0c74981fe - use the new RXBUCKET interface for nnext's wind code. 2021-12-25 21:29:08 +01:00
Christoph Oelckers
546dee2724 - added accessors to RXBUCKET to match EventObject and renamed some of its members.
As a first preparation for replacement.
2021-12-25 21:29:08 +01:00
Christoph Oelckers
5787ec9618 - use EventObject as storage in EVENT. 2021-12-25 21:29:07 +01:00
Christoph Oelckers
5bec3be5e9 - abstracted access to event target objects. 2021-12-25 21:29:07 +01:00
Christoph Oelckers
32874414fd - evSendSector, too. 2021-12-25 21:29:07 +01:00
Christoph Oelckers
0472c78ddc - same for walls. 2021-12-25 21:29:07 +01:00
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
Christoph Oelckers
3d63c44aae - GCC warned about this. 2021-11-29 00:54:59 +01:00
Christoph Oelckers
fb95f0fff7 - store an actual actor pointer in PLAYER.
# Conflicts:
#	source/games/blood/src/player.cpp
2021-11-29 00:54:58 +01:00
Christoph Oelckers
812b18e49a - some xsprite cleanup 2021-11-29 00:54:58 +01:00
Christoph Oelckers
3e452994d8 - handle all of gUpper/gLowerLink.
This completes the removal of all access to the global arrays outside of setup code.
2021-11-29 00:54:58 +01:00
Christoph Oelckers
5b9152abfd - eliminated the last access to playerActors in trigger.cpp and made AimTargets a pointer array. 2021-11-29 00:54:58 +01:00
Christoph Oelckers
6dd7cbe8fa - GetCrushedSpriteExtents and leftover bloodActors references. 2021-11-29 00:54:58 +01:00
Christoph Oelckers
d2bc254e03 - the rest of triggers.cpp. 2021-11-29 00:54:57 +01:00
Christoph Oelckers
9349e7bcb1 - several simple functions.
Also two fixes involving trTriggerSprite.
2021-11-29 00:54:57 +01:00
Christoph Oelckers
0ae664e9ca - SetSpriteState 2021-11-29 00:53:57 +01:00
Christoph Oelckers
7e8fc3fe65 - target in UpdateAimVector, teslaHit. 2021-11-29 00:53:56 +01:00
Christoph Oelckers
7d1c81626e - changed all naked Stat/SectIterator loops to use the Blood... variants. 2021-11-29 00:53:56 +01:00
Christoph Oelckers
9016256ac2 - savegame hackery for sequences. 2021-11-29 00:53:56 +01:00
Christoph Oelckers
4e1e9ca0c9 - proper actor managements in SEQINST. 2021-11-29 00:53:56 +01:00
Christoph Oelckers
7204b8e026 - deal with QAV::nIndex.
This was totally redundant. Since the player already gets passed as 'Data', we can just make that pointer a PLAYER type and use it instead to retrieve the playing actor for sound purposes.
2021-11-29 00:53:56 +01:00
Christoph Oelckers
70cd4d9466 - minor sprite[] stuff. 2021-11-29 00:53:55 +01:00
Christoph Oelckers
8f974dc1d8 - the remaining functions of player.cpp. 2021-11-29 00:53:55 +01:00
Christoph Oelckers
fddc213fa8 - made PLAYER::fragger an actor pointer. 2021-11-29 00:53:55 +01:00
Christoph Oelckers
abee5c5eaa - parameters in Pickup functions, getting rid of all (x)sprite[] references in player.cpp. 2021-11-29 00:53:55 +01:00
Christoph Oelckers
07e88e36f6 - ActionScan cleanup plus smaller bits in player.cpp
# Conflicts:
#	source/games/blood/src/player.cpp
2021-11-29 00:53:55 +01:00
Christoph Oelckers
e95936efd6 - made PLAYER::used2 an actor array and renamed it to match its purpose.
Note: Renaming this for savegames is fine, as it's not relevant in singleplayer.
2021-11-29 00:53:54 +01:00
Christoph Oelckers
165b2f29ff - removed last remaining accesses to sprite[] and xsprite[] from nnexts.cpp. 2021-11-29 00:53:54 +01:00
Christoph Oelckers
85c4b96177 - removed all access to sprite[] from mirrors.cpp. 2021-11-29 00:53:54 +01:00
Christoph Oelckers
826fd7ddb2 - optimized vector math. 2021-11-29 00:53:54 +01:00
Christoph Oelckers
50f9b67598 - removed all sprite[] references from gameutil.cpp. 2021-11-29 00:53:54 +01:00
Christoph Oelckers
7a2c661ff9 - GetZRange 2021-11-29 00:53:54 +01:00
Christoph Oelckers
626deed960 - VectorScan 2021-11-29 00:53:53 +01:00
Christoph Oelckers
0466186440 - HitScan 2021-11-29 00:53:53 +01:00
Christoph Oelckers
c2916259d7 - CheckProximity
# Conflicts:
#	source/games/blood/src/aibeast.cpp
2021-11-29 00:53:53 +01:00
Christoph Oelckers
db75e4d2bf - moved basePath into XSECTOR.
# Conflicts:
#	source/games/blood/src/nnexts.cpp
2021-11-29 00:53:53 +01:00
Christoph Oelckers
0d2da892e8 - made marker0 and marker1 actor pointers. 2021-11-29 00:53:52 +01:00
Christoph Oelckers
f4b900c540 - moved velocity data into DBloodActor. 2021-11-29 00:53:52 +01:00
Christoph Oelckers
6a8f59e991 - removed remaining direct access to the velocity arrays. 2021-11-29 00:53:52 +01:00
Christoph Oelckers
ff9a86b7b4 - proper way to get player actor. 2021-11-29 00:53:52 +01:00
Christoph Oelckers
1cb98593f1 - removed compatible savegame handling for SPRITEHIT.
This does not need to be preserved, unlike the other refactored global arrays.
2021-11-29 00:53:51 +01:00
Christoph Oelckers
54f70ec1bb - moved baseSprite into DBloodActor. 2021-11-29 00:53:51 +01:00
Christoph Oelckers
14ace49c3e - owner stuff.
This reduces the number of direct references to spritetype.owner by half in the Blood code.
2021-11-29 00:53:51 +01:00
Christoph Oelckers
3b1ba88a41 - gib stuff. 2021-11-29 00:53:51 +01:00
Christoph Oelckers
344e7e840e - remove leftover index dependencies for sprite events. 2021-11-29 00:53:51 +01:00
Christoph Oelckers
245581e00d - cleanup 2021-11-29 00:53:50 +01:00
Christoph Oelckers
b2de1e5209 - added BloodSpriteIterator and BloodLinearSpriteIterator to get rid of explicit loops over the sprite array. 2021-11-29 00:53:50 +01:00
Christoph Oelckers
484d016172 - cleaned up burn code. 2021-11-29 00:53:50 +01:00
Christoph Oelckers
c0b013ac0c - moved gSpriteHit into DBloodActor. 2021-11-29 00:53:50 +01:00
Christoph Oelckers
c34c9deb4e - deleted old condPush variant. 2021-11-29 00:53:50 +01:00
Christoph Oelckers
be0e2a9b93 - todo markers 2021-11-29 00:53:49 +01:00
Christoph Oelckers
3e9bcacc22 - condUpdateObjectIndex + nnExtTriggerObject 2021-11-29 00:53:49 +01:00
Christoph Oelckers
9965245449 - condCheckSprite 2021-11-29 00:53:49 +01:00
Christoph Oelckers
0ff9afde61 - condCheckPlayer + condCheckDude 2021-11-29 00:53:49 +01:00
Christoph Oelckers
9205556b4e - condCheckSector + condCheckWall 2021-11-29 00:53:49 +01:00
Christoph Oelckers
f6e7c5f440 - condCheckMixed + condCheckGame. 2021-11-29 00:53:48 +01:00
Christoph Oelckers
69395383a4 - fix condPush
- better abstraction of the condition storage.

Hiding targetX/Y as much as possible for easier refactoring later.
2021-11-29 00:53:48 +01:00
Christoph Oelckers
f84e2343ca - formatting only. 2021-11-29 00:53:48 +01:00
Christoph Oelckers
9062eb5996 - condError 2021-11-29 00:53:48 +01:00
Christoph Oelckers
fb4fcef2c2 - cleanup 2021-11-29 00:53:48 +01:00
Christoph Oelckers
aef95b52bc - the remaining functions in nnexts.cpp 2021-11-29 00:53:47 +01:00
Christoph Oelckers
ca13a35ccf - formatting
# Conflicts:
#	source/games/blood/src/nnexts.cpp
2021-11-29 00:53:47 +01:00
Christoph Oelckers
cc4309f7eb - aiPatrolThink + aiPatrolFlagsMgr 2021-11-29 00:53:47 +01:00
Christoph Oelckers
9004b102fe - formatting 2021-11-29 00:53:47 +01:00
Christoph Oelckers
a67da5003a - made voodooTarget a pointer and removed most direct references to target_i. 2021-11-29 00:53:47 +01:00
Christoph Oelckers
bf424b6439 - aiPatrolSearchTargets 2021-11-29 00:53:46 +01:00
Christoph Oelckers
c2ff8b0941 - formatting 2021-11-29 00:53:46 +01:00
Christoph Oelckers
a1d01d5419 - spritesTouching, readyForCrit 2021-11-29 00:53:46 +01:00
Christoph Oelckers
5ff17fec35 - patrolalarm 2021-11-29 00:53:46 +01:00
Christoph Oelckers
ffdb976f5b - marker stuff. 2021-11-29 00:53:46 +01:00
Christoph Oelckers
af7164c91d - partial rework of aiPatrolSetMarker 2021-11-29 00:53:45 +01:00
Christoph Oelckers
f8a4ecc90f - findNextMarker + markerIsNode 2021-11-29 00:53:45 +01:00
Christoph Oelckers
a76f2feb63 - aiPatrolStop API changed to actors. 2021-11-29 00:53:45 +01:00
Christoph Oelckers
7175439496 - aiPatrolStop cleaned up. 2021-11-29 00:53:45 +01:00
Christoph Oelckers
5c1b2bee37 - minor cleanup. 2021-11-29 00:53:45 +01:00
Christoph Oelckers
e11f118d3c - formatting 2021-11-29 00:53:45 +01:00
Christoph Oelckers
2f5be23171 - validate actors before processing them in the event queue. 2021-11-29 00:53:44 +01:00
Christoph Oelckers
118b3e1d70 - all calls to CheckSpriteSect/Stat handled. 2021-11-29 00:53:44 +01:00
Christoph Oelckers
48073a2cd6 - sanitized the abuse of using XSPRITE's target field to pass along some info with explosions.
This is neither safe nor future proof, so now it uses a separate variable.
2021-11-29 00:53:44 +01:00
Christoph Oelckers
146de69169 - some more patrol code. 2021-11-29 00:53:44 +01:00
Christoph Oelckers
4ae32fb223 - first part of patrol code. 2021-11-29 00:53:44 +01:00
Christoph Oelckers
2044f591f2 - formatting and cleanup. 2021-11-29 00:53:43 +01:00
Christoph Oelckers
3928407eae - several is...() functions. 2021-11-29 00:53:43 +01:00
Christoph Oelckers
49879af921 - usePictureChanger 2021-11-29 00:53:43 +01:00
Christoph Oelckers
088fa6690c - reformatting only. 2021-11-29 00:53:43 +01:00
Christoph Oelckers
94ae3c22d5 - final part and cleanup of useTargetChanger. 2021-11-29 00:53:43 +01:00
Christoph Oelckers
6c465dff3c - the fourth block 2021-11-29 00:53:42 +01:00
Christoph Oelckers
dc4c632b08 - the third block. 2021-11-29 00:53:42 +01:00
Christoph Oelckers
ff29570675 - second block. 2021-11-29 00:53:42 +01:00
Christoph Oelckers
c3a1e8f46b - targetactor in the first block of useTargetChanger 2021-11-29 00:53:42 +01:00
Christoph Oelckers
17bd466801 - first pass over useTargetChanger
using 'actor' wherever easily doable.
2021-11-29 00:53:42 +01:00
Christoph Oelckers
d59f78a5f0 - formatting only 2021-11-29 00:53:41 +01:00
Christoph Oelckers
a60617c688 - more use* functions. 2021-11-29 00:53:41 +01:00
Christoph Oelckers
c54dd079fb - formatting only. 2021-11-29 00:53:41 +01:00
Christoph Oelckers
e3b8980ecd - sprite2sectorSlope + useSlopeChanger 2021-11-29 00:53:41 +01:00
Christoph Oelckers
b7465ab67b - spriteGetSlope/spriteSetSlope take spritetype pointer arguments. 2021-11-29 00:53:41 +01:00
Christoph Oelckers
c32ff483a9 - formatting only 2021-11-29 00:53:41 +01:00
Christoph Oelckers
ca131f2dcf - fixed a few oversights. 2021-11-29 00:53:40 +01:00
Christoph Oelckers
c2f6084988 - merged genDudeExtra into DBloodActor. 2021-11-29 00:53:40 +01:00
Christoph Oelckers
017bcb056f - useIncDecGen + setDataValueOfObject 2021-11-29 00:53:40 +01:00
Christoph Oelckers
ab41ac9e05 - formatting only. 2021-11-29 00:53:40 +01:00
Christoph Oelckers
239faad4c5 - useSoundGen 2021-11-29 00:53:39 +01:00
Christoph Oelckers
a8ee9b3969 - useUniMissileGen 2021-11-29 00:53:39 +01:00
Christoph Oelckers
c65c936d27 - useCondition + 2021-11-29 00:53:39 +01:00
Christoph Oelckers
24a11b3f2f - txIsRanged and several of its callers. 2021-11-29 00:53:39 +01:00
Christoph Oelckers
174783e57b - formatting only 2021-11-29 00:53:39 +01:00
Christoph Oelckers
a4f7fabbfa - modernTypeOperateSprite 2021-11-29 00:53:39 +01:00
Christoph Oelckers
fe3da5eaab - split off formatting 2021-11-29 00:53:38 +01:00
Christoph Oelckers
766999118c - sectorKillSounds + useDudeSpawn 2021-11-29 00:53:38 +01:00
Christoph Oelckers
3761424501 - the remaining AIFight stuff. 2021-11-29 00:53:38 +01:00
Christoph Oelckers
a5471b1079 - aiFightDudeIsAffected + aiFightGetDudesForBattle 2021-11-29 00:53:38 +01:00
Christoph Oelckers
55716c9409 - aiFightGet(Fine)TargetDist 2021-11-29 00:53:38 +01:00
Christoph Oelckers
baf4bb0785 - formatting only. 2021-11-29 00:53:37 +01:00
Christoph Oelckers
57c3571555 - several aiFight functions. 2021-11-29 00:53:37 +01:00
Christoph Oelckers
ca3d7c9bdf - formatting only 2021-11-29 00:53:37 +01:00
Christoph Oelckers
78cbb4ed0a - aiFightGetTargetInRange 2021-11-29 00:53:37 +01:00
Christoph Oelckers
a449d97b86 - modernTypeTrigger 2021-11-29 00:53:37 +01:00
Christoph Oelckers
ea8166871a - formatting only. 2021-11-29 00:53:36 +01:00
Christoph Oelckers
43e9e07910 - 2 modernType functions. 2021-11-29 00:53:36 +01:00