Commit graph

409 commits

Author SHA1 Message Date
Christoph Oelckers
82fb03e399 - another batch of search&replace, with smaller results. 2021-12-30 09:56:48 +01:00
Christoph Oelckers
c5ae454207 - another big batch of automatic replacements. 2021-12-30 09:56:48 +01:00
Christoph Oelckers
5b65e214e0 - global search & replace of the more frequent sprite flag patterns. 2021-12-30 09:56:48 +01:00
Christoph Oelckers
b0e3c6b5ec - some remaining sector flag stuff 2021-12-30 09:56:45 +01:00
Christoph Oelckers
d0a06ae961 - deal with most of CSTAT_SECTOR_SKY and CSTAT_SECTOR_SLOPE 2021-12-30 09:56:45 +01:00
Christoph Oelckers
8d0013128e - Exhumed: use symbolic constant CSTAT_SPRITE_INVISIBLE 2021-12-30 09:56:45 +01:00
Christoph Oelckers
dddf48fd3e - cleaned up and renamed buildtypes.h.
Content was reordered so that the file can contain the inlines belonging to the map data types that previously had to be stored elsewhere.
Also moved out of the Build folder because virtually everything in here can be traced to content available in Duke Nukem 3D's and Shadow Warrior's source releases.
2021-12-30 09:53:46 +01:00
Christoph Oelckers
46d7487a3b - SW: clear all pointer variables the player may still hold when terminating a level. 2021-12-30 09:53:10 +01:00
Christoph Oelckers
d1f088a858 - SW/Exhumed fixed sound relinking on actor destruction.
This still passed the sprites instead of the actors. Moved the relinking code to DCoreActor::Destroy because it is the same for all games.
Also did a little bit of sound cleanup to ensure the sound backend does not hold stale actor pointers.
2021-12-30 09:53:10 +01:00
Mitchell Richters
2f567bdb74 - Exhumed: Fix two signed/unsigned comparison warnings in PlayFX2().
* Lines in question:
** 606 | if (chan->SoundID == nSound + 1)
** 621 | if (chan->SoundID == nSound + 1)
* All data sent to `PlayFX2()` and functions that wrap `PlayFX2()` are signed values, so keep signed all the way through.
2021-12-26 23:10:06 +01:00
Christoph Oelckers
d8ccfa1a5f - cleaned up nextsectorneighborz, added a safe variant and use this in all places where the sector pointer is not validated. 2021-12-26 23:10:05 +01:00
Christoph Oelckers
b8c4354691 - got rid of the MAX... constants and adjusted all places still using them. 2021-12-26 23:10:02 +01:00
Christoph Oelckers
838bed7800 - final cleanup of sectnum related stuff.
Made sure that remaining uses of sector indices are safe to be kept and deleted a few redundant functions.
2021-12-26 23:10:01 +01:00
Christoph Oelckers
6d432fca0a - made spritetype::sectnum a pointer. 2021-12-26 23:10:01 +01:00
Christoph Oelckers
6a43a270fa - use sectno() access function where we really need a sector index. 2021-12-26 23:10:01 +01:00
Christoph Oelckers
8ee5d1b0d7 - activated the garbage collector
This finally gets rid of all static storage for actors - so no more indices ever! :)
2021-12-26 23:10:00 +01:00
Christoph Oelckers
1d371b8cbf - clear some data on init. 2021-12-26 23:09:59 +01:00
Christoph Oelckers
8dde6a3074 - Added GC support to Exhumed 2021-12-26 23:09:59 +01:00
Christoph Oelckers
588f88c9cc - migrated the actors to DObjects.
No GC yet, only the classes have been altered and some GC-related features been added.
Full switchover will require adding GC support to all data in the game.
2021-12-26 23:09:57 +01:00
Christoph Oelckers
8a2385dd89 - actor clearing cleaned up.
We still need this until we can get rid of the static arrays...
2021-12-26 23:09:55 +01:00
Christoph Oelckers
4cecb6f955 - removed the old actor savegame code and instead implemented a virtual Serialize function.
This isn't hooked up yet, currently savegames are non-functional. They will come back once the global actor arrays are no longer relevant for maintenance.
2021-12-26 23:09:55 +01:00
Christoph Oelckers
f855b1020f - actor lists refactored.
No more shorts, no more static arrays.
This was one of the biggest blockers for unlimiting the engine.
2021-12-26 23:09:54 +01:00
Christoph Oelckers
eaff9e359f - refactored the owner index in tspritetype.
This is now a separate type from spritetype which contains an actor pointer instead so that sprite display can be handled without requiring a static sprite array.
2021-12-26 23:09:53 +01:00
Christoph Oelckers
e13a275cfc - got rid of the sole linear sprite iterator in Exhumed and deleted the iterator code entirely. 2021-12-26 23:09:52 +01:00
Christoph Oelckers
6600f55543 - separate map loading from actor spawning for the other games, too.
It still uses the horribly messed up original spawn logic, though.
2021-12-26 23:09:51 +01:00
Mitchell Richters
0c6e55d1b8 - Silence all the -Wuninitialized and -Wmaybe-uninitialized warnings relating to HitInfo objects passed through to functions by reference. 2021-12-26 23:09:50 +01:00
Christoph Oelckers
5dfc79bdbe - MarkSectorSeen 2021-12-26 23:09:48 +01:00
Christoph Oelckers
a22634f228 - sectnum reduction. 2021-12-26 23:09:47 +01:00
Christoph Oelckers
221d9fe28e - adapted Duke's and Exhumed's sound code to directly work with actors.
This was already wrapped so all that needed to be done was removing the wrapper.
2021-12-26 23:09:46 +01:00
Christoph Oelckers
97b19a5cb1 - adapted Blood's sound engine to using actors.
Note: Savegames won't work on this commit for the other games!
2021-12-26 23:09:45 +01:00
Christoph Oelckers
b7a5ea8ef6 - moved some common utilities into the backend. 2021-12-26 23:09:44 +01:00
Christoph Oelckers
bbb860ccf3 - consolidate the iterators in the backend.
Using a template class that can adapt to the game specific types.
2021-12-26 23:09:44 +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
70d7e81f4f - adapted getzrange to the new interface.
This was mainly removing game side solutions in favor of a common one in the backend.
2021-12-26 23:09:42 +01:00
Christoph Oelckers
729076b79d - adapted neartag in SW and Exhumed. 2021-12-26 23:09:42 +01:00
Christoph Oelckers
91e2391911 - adapted neartag in Duke. 2021-12-26 23:09:42 +01:00
Christoph Oelckers
b3bbf8932e - same procedure for Exhumed. 2021-12-26 23:08:58 +01:00
Christoph Oelckers
96b9572905 - moved parts of the HitInfo subclasses into the backend.
All the game code now needs to do is a single 'using' statement.
2021-12-26 23:08:57 +01:00
Christoph Oelckers
4bfb03b6b3 - adapted hitscan calls in Exhumed. 2021-12-26 23:08:56 +01:00
Christoph Oelckers
9380819e4e - initialize actorArray for all games.
- the foundation for an actor aware backend.
2021-12-26 23:08:56 +01:00
Christoph Oelckers
52c80f187a - added coreactor.h 2021-12-26 23:08:55 +01:00
Christoph Oelckers
624ad6a2ad - cleanup stuff.
Removed unneeded prototypes, renamed some variables; no logic changes.
2021-12-25 21:29:05 +01:00
Christoph Oelckers
943641d18e - renamed all nSector pointers to pSector
No logic changes!
2021-12-25 21:29:04 +01:00
Christoph Oelckers
a3ecbe6371 - MoveQS 2021-12-25 21:29:04 +01:00
Christoph Oelckers
b1b7608cf7 - most remaining sectnum references. 2021-12-25 21:29:04 +01:00
Christoph Oelckers
2027c6ebaf - the last sector[] 2021-12-25 21:29:04 +01:00
Christoph Oelckers
6e786fcf1e - RadialDamage + DimSector 2021-12-25 21:29:04 +01:00
Christoph Oelckers
24d4680f6e - sector[] in move.cpp 2021-12-25 21:29:03 +01:00
Christoph Oelckers
80f80ed5e5 - initsect 2021-12-25 21:29:03 +01:00