Commit graph

2899 commits

Author SHA1 Message Date
Mitchell Richters
387e0286ac - Duke (RR): Move displaypistol() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
755e2be0a4 - Duke (RR): Move displayrifle() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
82e9b96174 - Duke (RR): Move displayshotgun() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
c6380bfd7a - Duke (RR): Move displaychicken() lambda to new weapon offsets. 2022-12-11 19:46:25 +01:00
Mitchell Richters
79ae9e1f97 - Duke (RR): Move displaycrossbow() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
be439918dc - Duke (RR): Move displaypowderkeg() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
40ec46e323 - Duke (RR): Move displaybowlingball() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
6193d17dac - Duke (RR): Move displayslingblade() lambda to new weapon offsets. 2022-12-11 19:46:24 +01:00
Mitchell Richters
50c1c5b48d - Duke (RR): Initial hookup of new weapon drawing offsets from the backend, starting with displaycrowbar(). 2022-12-11 19:46:24 +01:00
Mitchell Richters
5d3710d677 - Duke: Always use tsprite pos/angle when used in conjunction with viewvec or viewang.
* This solves the issue of jittery picnum changes when circle-strafing actors at high speeds.
2022-12-11 19:45:38 +01:00
Christoph Oelckers
bea6834f8e - code cleanup. 2022-12-11 19:45:38 +01:00
Christoph Oelckers
281b102fac - gave all textures that were accessed with their "#0xxxx" name a descriptive names.
Only the fallback fonts were intentionally excluded because these are supposed to get the ART file content.
2022-12-11 19:45:18 +01:00
Christoph Oelckers
58db09969c - moved tileForName out of BuildTiles.
Just pulling one change out of the big upcoming refactor commit.
2022-12-11 19:45:18 +01:00
Christoph Oelckers
e26d9106aa - handle all occurences of tileWidth and tileHeight using spritetypebase::picnum. 2022-12-11 19:44:01 +01:00
Christoph Oelckers
0869497ecb - rewrote the tile pixel cache to work on texture IDs instead of tile IDs.
This allows using the related checking features with other textures as well.
2022-12-11 19:44:00 +01:00
Christoph Oelckers
8b0e86e88b - wrap a few more accesses to picnum variables 2022-12-11 19:44:00 +01:00
Christoph Oelckers
483617d3e1 - use the texture wrappers in a few places. 2022-12-11 19:44:00 +01:00
Christoph Oelckers
49f87e6227 - got rid of gotpic.
Now everything uses the 'seen' flag in the texture which indicates that the texture was actually used for hardware rendering since the last check.
It's also only the 3 places checking this flag which are responsible for clearing it.
2022-12-11 19:43:58 +01:00
Christoph Oelckers
ede5b017ab - renamed walltype::picnum to wallpicnum for easier searching. 2022-12-11 19:43:58 +01:00
Christoph Oelckers
51ad64f71e - initialize all special tiles to their intended type before starting the game.
This ensures that we have an immutable mapping of tile number to texture ID now.
2022-12-11 19:43:58 +01:00
Christoph Oelckers
6a690849e6 - cleanup on the tile management.
* removed the long defunct EDuke32-based map art system. With our move to named textures this will not work anymore so fixing the existing problems would be pointless.
* moving .def related parsing stuff out of buildtiles.cpp.
* some initial refactoring to make the tile store a static, non-modifyable resource after initial setup.
2022-12-11 19:43:58 +01:00
Christoph Oelckers
a08db47528 - exported all breakable ceilings.
Very simple stuff with instant profit. :)
2022-12-11 19:43:58 +01:00
Christoph Oelckers
a63ee8079a - implemented customizable breakable walls and ported all hard coded variants to use this. 2022-12-11 19:43:57 +01:00
Christoph Oelckers
241636a907 - removed caching of the minifont.
Since this does not get used directly anymore, caching these images is rather pointless.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
0df5be7ad0 - also renamed all RR tile names. 2022-12-11 19:43:57 +01:00
Christoph Oelckers
e9b6e84d47 - renamed all tile constants for Duke to DTILE_*.
We need to be able to find them for the ongoing work
2022-12-11 19:43:57 +01:00
Christoph Oelckers
9e3318a2fb - moved spawnclasses and breakwall definitions from .def to RMAPINFO.
.def is not the right place for this - it needs to run very early in the process, before scripted actors are loaded, so doing this stuff there means that half the initialization has to be postponed and error reporting is sub-par.
These are now part of RMAPINFO which gets parsed as one of the very last things - it is also where GZDoom is doing some of these things.

The better error reporting also allowed fixing some errors in these definitions.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
c1a09196f0 - implemented breakable walls with external definitions.
The scripted case does not work yet due to bad loading order of files.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
8e17f1f0f5 - removed the limit of 64 on-state switches from the init code.
No other place in the engine needs this, it was just the chosen size for a local check array.
2022-12-11 19:43:56 +01:00
Mitchell Richters
2c592405fa - Separate pitch/yaw key input into separate functions and apply from the ticker. 2022-12-11 19:43:56 +01:00
Mitchell Richters
470b4efac8 - Remove PlayerAngles::setYaw() method usage and remaining associated code. 2022-12-11 19:43:56 +01:00
Mitchell Richters
f58e3c58aa - Remove PlayerAngles::setPitch() method usage. 2022-12-11 19:43:56 +01:00
Mitchell Richters
491a42d2bb - Remove PlayerAngles::addYaw() method usage. 2022-12-11 19:43:56 +01:00
Mitchell Richters
7a7758efaa - Remove PlayerAngles::addPitch() method usage. 2022-12-11 19:43:56 +01:00
Mitchell Richters
1944d04014 - Duke: Fix pitch alteration in dokneeattack(). 2022-12-11 19:43:55 +01:00
Mitchell Richters
968d0ae0d2 - Implement new scaled angle change setup and remove enforcement of synchronised input. 2022-12-11 19:43:55 +01:00
Mitchell Richters
9437ea9622 - Move input vector rotation for Duke and SW into the playsim.
* The next commit needs this to ensure the vector is rotated using the most current angle.
2022-12-11 19:43:55 +01:00
Mitchell Richters
15b101870d - Completely remove current scaled angle change setup.
* During this transition, temporarily enforce synchronised input at all times.
2022-12-11 19:43:55 +01:00
Christoph Oelckers
4078c6d6bd - converted several of RR's static init sprite types to the class system. 2022-12-11 19:43:55 +01:00
Christoph Oelckers
5b34917f62 - split the sprite animation code for CON-based actors into a separate function.
Like the shadow code this is virtually identical for Duke and RR.
2022-12-11 19:43:55 +01:00
Christoph Oelckers
0d7288c543 - moved the shadow creation code out of animatesprites into a common subfunction.
Also removing several checks for non-enemy actors for which shadows are generally not being created.
2022-12-11 19:43:55 +01:00
Christoph Oelckers
6fb263d61b - converted the two last non-CON-based active items - RRRA's empty bike and boat. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
fd26f7fd2d - set some more flags. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
9641d3f712 - scriptified two of RRRA's special effects. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
3ee28eb600 - use tickstat for all thinker loops that have no more special cases. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
6de147b77f - moved the CON execute call to DDukeActor::Tick and removed a large portion of the special handling for scriptified actors. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
1cfba8e989 - cleaned up the main thinker loops, using a flag to denote actors that are not on STAT_ACTOR but need to run CON code.
This should not be automatic as it may cause problems with mods not expecting this.
2022-12-11 19:43:54 +01:00
Christoph Oelckers
23640988db - define several of RR's fullbright decorative sprites via spawnclasses remapping. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
bdc474d04f - scriptified all remaining Duke actors with specific init code and no CON part. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
c9628db264 - scriptified the toilet. 2022-12-11 19:43:53 +01:00