Commit graph

2461 commits

Author SHA1 Message Date
Christoph Oelckers
aa58b152ab - use a TArray in BuildTiles for the tile descriptors.
For some reason MSVC wants to put this in the EXE now and the array is quite large.
2022-12-11 19:45:00 +01:00
Christoph Oelckers
71ca2c4677 - eliminate the last remaining references to the tile manager in the core renderer files.
The only thing left is the sky which needs more refactoring first and the tileUpdatePicnum call for sprites which cannot be resolved by the texture manager because Blood has a randomization factor included here.
2022-12-11 19:44:01 +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
f479f995a1 - transitioned all tileLeftOffset and tileTopOffset calls to use the texture manager. 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
a6db974a62 - refactored Blood's tile property arrays to texture IDs.
The data structure here can be optimized later when the other games get to the same point, but this allows to rid Blood of all references to wallpicnunm, floorpicnum and ceilingpicnum except one place in the precacher.
2022-12-11 19:44:00 +01:00
Christoph Oelckers
4ecb4aacb2 - mark all return values from the texture() getters as const.
This is necessary to evade C++ stupidity which happily allows assignment to non-const struct type return values and won't even warn about it.
As const these will throw an error when that happens.
2022-12-11 19:44:00 +01:00
Christoph Oelckers
63c1630cda - more texture wrappers and minor cleanup. 2022-12-11 19:44:00 +01:00
Christoph Oelckers
e5225e98e0 - migrated SW's portal setup code to texture IDs. 2022-12-11 19:43:59 +01:00
Christoph Oelckers
9879aa90a6 - more texture handling cleanup.
Most of the renderer now bypasses the tile manager and goes directly to the low level texture manager.
The gotpic array was removed and replaced by a new texture flag. Since there are only 3 places in the entire code that check this, this is a lot easier to handle.
2022-12-11 19:43:59 +01:00
Christoph Oelckers
868fece7f6 - using texture IDs in a few more places where it is simple. 2022-12-11 19:43:59 +01:00
Christoph Oelckers
f4bda94dad - added tileGetTextureID and tested it with Blood's mirror/portal setup code. 2022-12-11 19:43:59 +01:00
Christoph Oelckers
bfef616981 - let tileDelete create a new null texture instead of using the default one.
This is to ensure that marker textures are still unique.
2022-12-11 19:43:59 +01:00
Christoph Oelckers
028cf2daf5 - added access wrappers for getting texture IDs from the map and used that to rid a large chunk of the renderer of direct tilenum access. 2022-12-11 19:43:59 +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
a0722c55ea - removed canvas hack stuff from Buildtiles after cleaning up the mess in SW. 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
faeb19a485 - do the handling of 90° rotated wall textures in the renderer instead of duplicating the texture.
Aside from less resource use this also works with hires replacement - which the old code was incapable of.
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
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
Mitchell Richters
ba3e8a9842 - Change most input constants to be doubles, and not DAngle objects.
* These are base scales that when divided by the game's ticrate, become degrees of angle. Too confusing...
* 3x genuine degree values remain.
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
968d0ae0d2 - Implement new scaled angle change setup and remove enforcement of synchronised input. 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
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
cbb3b0ebfb - preparations for the next script exports. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
e6c466fcba - scriptified several of Duke's destructible items. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
dc06a93a4f - scriptified RR's UFO teleporter. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
5a155730b4 - scriptified RR's bowling stuff. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
9ad8f67ce9 - added isEffector inline and exported NATURALLIGHTNING which got a bit in the way. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
be6ead173a - scriptified several smaller actors 2022-12-11 19:43:51 +01:00
Christoph Oelckers
0dc526899b - scriptified FrameEffect 2022-12-11 19:43:51 +01:00
Christoph Oelckers
ff6a9b89ac - scriptified the green slimer. 2022-12-11 19:43:51 +01:00
Christoph Oelckers
e69772637c - define Duke's skies by name. 2022-12-11 19:43:50 +01:00
Christoph Oelckers
4397e65443 - cleaned up the generic destructible code and used it for several more things. 2022-12-11 19:43:50 +01:00
Christoph Oelckers
15fb7dab35 - virtualized the 'shoot' interface and scriptified the bloodsplats to test it.
This calls virtual functions on the actor defaults now to allow writing specific shoot functions for subclasses.
2022-12-11 19:43:48 +01:00
Christoph Oelckers
8a921c98bd - scriptified ooz. 2022-12-11 19:43:47 +01:00
Christoph Oelckers
9d1384449c - scriptified the Recon. 2022-12-11 19:43:47 +01:00
Christoph Oelckers
2ab5e63386 - added a few new actor flags. 2022-12-11 19:43:47 +01:00
Christoph Oelckers
6d9a8bfaa5 - scriptified the pool balls. 2022-12-11 19:43:47 +01:00