Commit graph

1014 commits

Author SHA1 Message Date
Christoph Oelckers
4bc32e2777 - use actors in the sloped sprite utilities. 2021-12-30 16:11:14 +01:00
Christoph Oelckers
50a3089648 - eliminated tspriteptr_t and moved a few polymost-exclusive inlines into polymost.cpp. 2021-12-30 11:51:33 +01:00
Christoph Oelckers
44d2cc1951 - eliminated usectorptr_t. 2021-12-30 11:45:58 +01:00
Christoph Oelckers
285a5f2fd2 - eliminated uwallptr_t. 2021-12-30 11:38:34 +01:00
Christoph Oelckers
18fdb7548e - changed sprite argument in get_floorspr_points to DCoreActor and eliminated uspriteptr_t. 2021-12-30 11:35:49 +01:00
Christoph Oelckers
17736d1d5e - changed sprite argument in spriteheightofsptr to DCoreActor. 2021-12-30 11:31:45 +01:00
Christoph Oelckers
7676958f40 - changed try_facespr_intersect's sprite argument to DCoreActor. 2021-12-30 11:28:09 +01:00
Mitchell Richters
9bbb54fe2e - Replace every line that just contains spaces or tabs with an empty line feed in all files except 3rd party libraries. 2021-12-30 20:30:21 +11:00
Christoph Oelckers
3fee8f3c4e - replaced dragpoint (both the generic and the Blood variant) with a newly written vertexscan function.
This is a template allowing to run any task on a set of walls with equivalent start point.
Code was redesigned from scratch to be more clear than the existing variants.

The idea here is to reuse the base algorithm for other things that need to operate on the equivalent set of a given wall's start point.
2021-12-30 09:58:15 +01:00
Mitchell Richters
118ceb18ca - Capitalise vec2_t y variable. 2021-12-30 09:57:02 +01:00
Mitchell Richters
3c9cd926ba - Capitalise vec2_t x variable. 2021-12-30 09:57:02 +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
5f18109371 - consolidated all getslope code into a single function.
This also caches a wall's length to avoid taking the square root every single time for a slope calculation.
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
69593fd5c7 - Triangulation WIP
# Conflicts:
#	source/core/sectorgeometry.cpp
2021-12-30 09:53:07 +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
1a3b9f8ac0 - made several arrays holding sector related data dynamic. 2021-12-26 23:10:02 +01:00
Christoph Oelckers
2a07159c8d - removed some unused and obsolete content from engine files. 2021-12-26 23:10:02 +01:00
Christoph Oelckers
923a2b6a79 - unlimit the number of sectors/walls for real.
All remaining 16 bit values storing indices have been widened to 32 bit.
2021-12-26 23:10:01 +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
2d913982da - changed map loader to work without relying on spritetype::sectnum.
All access to this field is done through access functions now.
2021-12-26 23:10:01 +01:00
Christoph Oelckers
0dd756fa32 - added GC handling for all backend pointers in the map data.
GC is not active yet!
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
d088ab05a9 - eliminate storage of actors in the sector's hitag for some of Duke's sector effectors.
Also demoted Blood's upperLink and lowerLink to DCoreActor pointers and use static_cast for access to avoid savegame problems. The core code cannot safely serialize a DBloodActor anymore.
2021-12-26 23:09:56 +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
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
793dd032b0 - getzrange cleanup. 2021-12-26 23:09:53 +01:00
Christoph Oelckers
bcc532d36f - eliminated the getzrange wrapper. 2021-12-26 23:09:53 +01:00
Christoph Oelckers
2541425b9d - getzrange is free of hack values, too. 2021-12-26 23:09:53 +01:00
Christoph Oelckers
9d85859a80 - finally got rid of the 16 bit hack return value of clipmove. 2021-12-26 23:09:53 +01:00
Christoph Oelckers
183f554733 - hitscan cleanup.
Also removed a bit of leftover TROR code.
2021-12-26 23:09:52 +01:00
Christoph Oelckers
8c90f48b61 - cleanup of neartag, plus direct return of a HitInfoBase struct. 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
Christoph Oelckers
a3493048e7 - refactoring of spawn code to prepare for the other games.
Map hacks do not work in this commit!
2021-12-26 23:09:51 +01:00
Christoph Oelckers
379c4f1a60 - merged the cansee wrapper into the actual function and added sector validation. 2021-12-26 23:09:50 +01:00
Christoph Oelckers
2654a19cfd - got rid of setspritez(x) and moved the implementation to SetActor(Z) without referencing the sprite array. 2021-12-26 23:09:49 +01:00
Christoph Oelckers
58cd933d74 - pass sprite array to map hack parser as parameter.
This will later allow it to work on temporaries.
2021-12-26 23:09:49 +01:00
Christoph Oelckers
a22634f228 - sectnum reduction. 2021-12-26 23:09:47 +01:00
Christoph Oelckers
9213eae606 - deleted unused functions. 2021-12-26 23:09:46 +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
91e2391911 - adapted neartag in Duke. 2021-12-26 23:09:42 +01:00
Christoph Oelckers
4788c7ba5e - made Collision derive from a common base class and refactored clipmove to a single engine-side entry point.
Done for Doom so far.
2021-12-26 23:08:57 +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