Christoph Oelckers
b263c3ac6b
- wall and sprite flags in Duke, just simple cases.
2021-12-30 09:56:46 +01:00
Christoph Oelckers
6e32832428
- made sector ceiling/floor flags type safe.
...
- made sector flags type safe.
2021-12-30 09:56:46 +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
1edccf1423
- added slope setter methods to sectortype.
...
To make sure that setting the slope flags is always done properly. (Why are the flags even needed?)
As a nice side effect, this, plus use of other inlines made the align*slope functions implode into virtually nothing.
2021-12-30 09:53:56 +01:00
Christoph Oelckers
11f41a97d5
- made gotpic a FixedBitArray.
...
gets rid of some inline garbage.
2021-12-30 09:53:56 +01:00
Christoph Oelckers
bea394a734
- replace SW specific sector flags with the global ones.
2021-12-30 09:53:55 +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
4a5de6f56e
- make sure that all changes of wall coordinates invalidate associated data.
...
walltype::move should be the preferred function to be used for this, otherwise walltype::moved needs to be called.
2021-12-30 09:53:11 +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
34bee8116c
- SW: fixed uninitialized variable in FAFhitscan
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
Christoph Oelckers
6db1ba47c2
- SW: fixed some savegame issues:
...
* the saveable tables were initialized too late when reading in the actors.
* the abort messages for the saveables did not show. We need to use I_FatalError here, plus some actor list modifications to make this work.
2021-12-26 23:10:07 +01:00
Christoph Oelckers
ae622274bd
- SW: clear pointer holding variables in TerminateLevel.
...
Some survive the level transition and would point to invalid data.
2021-12-26 23:10:07 +01:00
Christoph Oelckers
a4ff7e5bd4
- SW: added some null checks to the SO interpolation code.
...
It looks like this was able to access deleted sprites - by only checking for the index this never registered as a problem, but with pointers it does.
2021-12-26 23:10:07 +01:00
Mitchell Richters
4562a0ca97
- SW: Add some nullptr checks to some inlines to prevent noclip crashes.
2021-12-26 23:10:06 +01:00
Mitchell Richters
3b099e09cd
- SW: Tidy some ‘newsect’ may be used uninitialized
warnings from GCC.
2021-12-26 23:10:06 +01:00
Mitchell Richters
a4d165a84e
- Tidy some specified bound equals destination size
warnings from GCC.
2021-12-26 23:10:05 +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
Mitchell Richters
18bd2e4d07
- SW: Destroy actor in KillActor()
after clearing the pointed to sprite, not before it.
...
* No idea if it matters but it seems logical that this is how it should be.
2021-12-26 23:10:05 +01:00
Mitchell Richters
65a55d3589
- SW: Tidy up function declarations where return type was on its own line.
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
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
db240ea2b0
- GC support in SW.
...
- SW GC WIP
2021-12-26 23:10:00 +01:00
Christoph Oelckers
6cb260d916
- SW GC preparation commit noise.
2021-12-26 23:10:00 +01:00
Christoph Oelckers
30786360bb
- derive spritetype and tspritetype from a common base class to consolidate their common content.
2021-12-26 23:09:57 +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
fa05cfbaf1
- use a real pointer in DSWActor for owner tracking.
2021-12-26 23:09:56 +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
d3b1e34d78
- moved sprite[], spriteext[] and spritesmooth[] into DCoreActor.
...
Also removed the last remaining sprite pointer in saveable data.
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
e79cd8d87f
- don't store sprite indices in walltype::portalnum
2021-12-26 23:09:54 +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
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
363d062685
- minor sanity check improvements.
2021-12-26 23:09:50 +01:00
Mitch Richters
12a0f587a3
- SW: Add nullptr check inside WarpSectorInfo()
to prevent crashes while noclipping through level.
2021-12-26 23:09:50 +01:00
Mitch Richters
10e28b8a53
- SW: Add nullptr check inside ActorTrackDecide()
for walltype's nextSector()
to prevent crashes while noclipping through level.
2021-12-26 23:09:49 +01:00
Mitch Richters
5085dcd866
- SW: Add nullptr check inside DoPlayerHorizon()
for canslopetilt
to prevent crashes while noclipping through level.
2021-12-26 23:09:49 +01:00
Christoph Oelckers
e223466f4a
- removed Interp_Sprite_Z.
...
This was redundant and interfered with the reworked automatic sprite interpolation.
2021-12-26 23:09:49 +01:00
Christoph Oelckers
5dfc79bdbe
- MarkSectorSeen
2021-12-26 23:09:48 +01:00
Christoph Oelckers
b663b8ea26
- wallptr reduction.
2021-12-26 23:09:48 +01:00
Christoph Oelckers
eb0f91e26b
- pass sector pointer to render_camtex.
2021-12-26 23:09:47 +01:00
Christoph Oelckers
a22634f228
- sectnum reduction.
2021-12-26 23:09:47 +01:00
Christoph Oelckers
a59173ac31
- SW: fixed DeleteNoSoundOwner still checking for sprites as sound origins.
2021-12-26 23:09:46 +01:00
Christoph Oelckers
0a9792ac28
- adapted SW's sound system to actors.
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