Commit graph

15684 commits

Author SHA1 Message Date
Christoph Oelckers
d5a6be3d96 - cleaned up Duke's spawn code.
The paths for initializing a map placed sprite and spawning a new actor at run time are now fully separate aside from the actual initialization of the actor.
2021-11-29 00:56:31 +01:00
Christoph Oelckers
4c7662b4ea - Duke/RR: guard all calls to EGS with a null pointer check.
Spawning sprites into the void will crash the engine so these must be blocked which requires a failure check here.
With this pressing fire while in the void no longer crashes the game - it won't fire anything, either, though.
2021-11-29 00:56:31 +01:00
Christoph Oelckers
fcbb7320a8 - Duke/RR: added all checks needed for not letting Duke crash with noclip when not accepting -1 as a valid sector pointer.
All places that were causing a crash are now guared by calling 'insector()'.
2021-11-29 00:56:31 +01:00
Christoph Oelckers
8972dbe5da - actorstayput 2021-11-29 00:56:31 +01:00
Christoph Oelckers
4a81d45630 - the remaining sector[] stuff in Duke/RR.
What remains is either engine interface code or not easily replaced.
2021-11-29 00:56:31 +01:00
Christoph Oelckers
5e66a3331d - getanimationgoal. 2021-11-29 00:56:30 +01:00
Christoph Oelckers
baf36a321b - inside, haskey and removed unused processmove functions. 2021-11-29 00:56:30 +01:00
Christoph Oelckers
3970c9a757 - use sector pointers in actors_lava.cpp 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
db96e93adc - animatesect, setanimation and related stuff. 2021-11-29 00:56:30 +01:00
Christoph Oelckers
b0ced98d5e - changed main EGS function. 2021-11-29 00:56:29 +01:00
Christoph Oelckers
09c2677fe7 - lots of EGS calls. 2021-11-29 00:56:29 +01:00
Christoph Oelckers
876d1dbe1f - operatesectors and activatebysector. 2021-11-29 00:56:29 +01:00
Christoph Oelckers
c57c007010 - do the remaining st handlers. 2021-11-29 00:56:29 +01:00
Christoph Oelckers
2aec8f47d3 - more st functions. 2021-11-29 00:56:29 +01:00
Christoph Oelckers
2a290dec48 - handle_st15 / handle_st16. 2021-11-29 00:56:29 +01:00
Christoph Oelckers
da4df04e7d - sector[] in handle_st09. 2021-11-29 00:56:28 +01:00
Christoph Oelckers
45519f67c1 - Duke: let neartag return pointers 2021-11-29 00:56:28 +01:00
Christoph Oelckers
a9aadfd63d - neartag cleanup in checksectors. 2021-11-29 00:56:28 +01:00
Christoph Oelckers
3d05020f4c - checkhitceiling + ceilingglass are sector[] free. 2021-11-29 00:56:28 +01:00
Christoph Oelckers
747fc11eb7 - Duke: use sector pointer in movement code 2021-11-29 00:56:28 +01:00
Christoph Oelckers
931c71a78c - use sector iterator for cheatUnlock 2021-11-29 00:56:27 +01:00
Christoph Oelckers
a7634c4cad - Duke: use pointers in interpolation interface. 2021-11-29 00:56:27 +01:00
Christoph Oelckers
0d8b380b05 - use wallsofsector for all remaining iterations over a sector's walls. 2021-11-29 00:56:27 +01:00
Christoph Oelckers
ac5425a545 - extended player_orig.os to full int.
This was the last remaining short variable in Duke/RR that holds a sector index.
2021-11-29 00:56:27 +01:00
Christoph Oelckers
a0950081ad - fixed bad sector use in handle_st18 2021-11-29 00:56:27 +01:00
Christoph Oelckers
5c9327a788 - use pointer variant of nextsectorneighborz. 2021-11-29 00:56:27 +01:00
Christoph Oelckers
0f2f46ec35 - made one_parallax_sectnum a pointer 2021-11-29 00:56:26 +01:00
Christoph Oelckers
bc199d00c7 - made 'clouds' a pointer array. 2021-11-29 00:56:26 +01:00
Christoph Oelckers
7a9e39a96b - delete some inactive code. 2021-11-29 00:56:26 +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
3a259c9c46 - use BFSSearch in cansee and deleted the old variant originally used by Exhumed.
This old variant is only useful for demo compatibility, its main difference is that it does not handle slopes, which even for Exhumed is wrong with some custom maps.
2021-11-29 00:56:25 +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
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
33a3e0d8bf - deleted some unused global variables, code simplification plus extended wall index field in Trap
Todo: give fields more meaningful names!
2021-11-29 00:56:25 +01:00
Christoph Oelckers
c1c59006bc - Exhumed: cleaned up disassembly-like code in SnapSectors 2021-11-29 00:56:25 +01:00
Christoph Oelckers
e6682f4489 - Exhumed: some simple wall stuff 2021-11-29 00:56:25 +01:00
Christoph Oelckers
7b1345d3e5 - Exhumed: wall stuff in AddFlash 2021-11-29 00:56:24 +01:00
Christoph Oelckers
c31d8a93fd - a few more
Enough of this - Duke is clearly clean of bad storage now
2021-11-29 00:56:24 +01:00
Christoph Oelckers
53122355fe - more sectors in spawn.cpp 2021-11-29 00:56:24 +01:00
Christoph Oelckers
c79dace730 - eliminated sector[] in position checkers 2021-11-29 00:56:24 +01:00
Christoph Oelckers
27af8a52e9 - the final walls
What is left now of wall[] and wallnum() needs to remain.
2021-11-29 00:56:24 +01:00
Christoph Oelckers
a26dc25e97 - lotsofpopcorn 2021-11-29 00:56:24 +01:00
Christoph Oelckers
35eb94b89a - lotsofcolourglass 2021-11-29 00:56:23 +01:00
Christoph Oelckers
344041167e - add setanimation variant taking a wall pointer
Mainly to get rid of wallnum()calls elsewhere.
2021-11-29 00:56:23 +01:00
Christoph Oelckers
83344818fd - pass wall pointer to breakwall 2021-11-29 00:56:23 +01:00
Christoph Oelckers
567a360092 - store wall pointers in animwall 2021-11-29 00:56:23 +01:00
Christoph Oelckers
6b73a37b56 - made mirrorsector a pointer array 2021-11-29 00:56:23 +01:00
Christoph Oelckers
58cd8bd6b9 - make mirrorwall a pointer array 2021-11-29 00:56:23 +01:00
Christoph Oelckers
caa9ef6dd3 - make access_wallnum a pointer 2021-11-29 00:56:22 +01:00