Commit graph

308 commits

Author SHA1 Message Date
Christoph Oelckers
9fd3ab6b5e - fixed texture precaching.
After the migration to GZDoom's full backend this never created any textureds when precaching things.
2021-04-11 09:59:55 +02:00
Christoph Oelckers
fb02b38279 - better .def loading logic.
To allow cumulative loading without interfering with other ports, Raze will now look for files called xxxx-raze.def, where xxxx is the default .def name (e.g. duke3d-raze.def for Duke3D.) and if that is found, cumulatively load all same-named files - it will fall back on the default name if no such thing is found.
-def still overrides both and will not cumulatively load.
2021-04-09 14:30:01 +02:00
Christoph Oelckers
ac82838859 - removed unused 'wallvisible' function. 2021-03-15 18:58:14 +01:00
Christoph Oelckers
ad8654ed06 - fixed maphack loader.
The duplicate 'currentSprite' variable prevented it from doing anything.
Also cleaned up the interface a bit to avoid using a global variable for parameter passing.

Fixes #279
2021-03-07 09:39:16 +01:00
Christoph Oelckers
783328c5fa - removed some unused declarations. 2021-02-27 12:29:07 +01:00
Christoph Oelckers
99f1f0952a - little bit of engine cleanup. 2021-02-25 12:16:21 +01:00
Christoph Oelckers
cf672b508f - removed unused 'updatesectorexclude' function. 2021-02-02 23:13:40 +01:00
Mitchell Richters
5124c0daec - Amalgamate ksgn and sgn into Sgn in cmdlib.h, and remove pragmas.h. 2021-01-05 07:31:37 +11:00
Mitchell Richters
b36bea7c69 - Replace scale() calls with Scale() from common. 2021-01-05 07:31:34 +11:00
Mitchell Richters
b191a482d6 - Remove hw_detailmapping and hw_glowmapping since they're no longer relevant with GZDoom's backend (they're always in an on state). 2021-01-03 21:39:21 +11:00
Mitchell Richters
d3b95d4d70 - Build/Duke: Remove the only use case for drawrooms() inline wrapper and change getcamspriteang() to return binangle instead of a build angle. 2021-01-03 17:35:19 +11:00
Christoph Oelckers
d04013066c - build a composite texture of all the segments for sky rendering to reduce the seams between the single segments. 2020-12-04 22:29:25 +01:00
Christoph Oelckers
396e3cd524 - actually call the model animation timer somewhere.
Now models also animate properly. :)
2020-12-02 00:19:22 +01:00
Christoph Oelckers
25ef58f897 - re-enabled all model specific code in Duke's animatesprites function and removed some remaining software renderer-only code in the engine. 2020-12-01 23:57:39 +01:00
Christoph Oelckers
9a4073508d - Blood: Savegame fully transitioned to JSON
not tested yet.
2020-11-23 09:53:58 +01:00
Mitchell Richters
0190a98a10 - Remove calcSinTableValue() inline function and clean up use of PI/fPI and BANG2RAD #defines. 2020-11-22 21:18:10 +01:00
Mitchell Richters
32a1796728 - buildutils: Replace sintable[] use within Build with bsin()/bcos(), using bsinf()/bcosf() where appropriate.
* Includes a few header include shuffles to make it all come together.
2020-11-22 21:18:02 +01:00
Christoph Oelckers
5f54eac297 - made palette loader part of the game interface.
This gets rid of the Blood 'replace' hook for thus.
2020-11-21 12:54:09 +01:00
Christoph Oelckers
a5b3681630 - foundation for a better collision info management.
The way this is handled is the main reason why Build maps are size limited, but since it is extremely invasive it needs to be taken out of the game code piece by piece, this is the framework for doing this for Duke.
2020-10-24 09:31:15 +02:00
Christoph Oelckers
08e29396e5 - split moveweapons_d further up into more smaller parts. 2020-10-18 09:45:41 +02:00
Christoph Oelckers
eb78b88598 - all Blood stat iterators ported. 2020-10-15 20:22:39 +02:00
Christoph Oelckers
0a0a995cbd - some cleanup of build.h 2020-10-15 20:22:38 +02:00
Christoph Oelckers
be3292d29b - removed the mostly unused macros for sprite iteration. 2020-10-15 20:22:38 +02:00
Christoph Oelckers
760a557f73 - converted the remaining sector iterators in Duke. 2020-10-15 01:34:27 +02:00
Christoph Oelckers
91fdf160b6 - fixed clearing of actorinfo.
It overwrote memory beyond its end.
2020-10-15 01:34:24 +02:00
Christoph Oelckers
d368d734d3 - prototyping some refactoring helpers. 2020-10-14 00:58:21 +02:00
Christoph Oelckers
b6149f88f7 - added sprite iterator classes.
The code base currently contains roughly 600 iterator loops directly referencing Build's global variables.
That state of things is not refactorable - these iterator wrappers are supposed to get rid of these explicit references.
2020-10-14 00:05:25 +02:00
Christoph Oelckers
99b4a64a67 - removed the PSPTwoDSetter
This is no longer needed because all weapon drawing is using the proper interface now.
2020-10-13 21:38:24 +02:00
Christoph Oelckers
817fa8aba3 - save the entire engine state as JSON.
The sprite lists may still need optimization. Due to different handling between Blood and the core engine they need to be written out completely which is quite wasteful.
2020-10-13 20:18:08 +02:00
Christoph Oelckers
b4a011300a - implemented proper delta serialization for sectors and walls. 2020-10-11 21:11:38 +02:00
Christoph Oelckers
f12c6b0319 - removed wallext because its only member 'blend' is not used by anything.
This is a feature not worth preserving, render style + alpha should be done directly, not via indirect lookup tables.
2020-10-11 18:44:16 +02:00
Christoph Oelckers
fd31da3115 - save sectors and walls as JSON
This is not optimized yet so saves are a bit larger than necessary.
2020-10-11 18:10:52 +02:00
Christoph Oelckers
4e67197838 - added back the hijacked 'detail' member to spritetype.
This changes the Blood map loader to not use the in-game sprite structure for loading a level and moves the qsprite_filler array back into the sprite.
2020-10-02 22:18:08 +02:00
Christoph Oelckers
5e6317b8b9 Merge remote-tracking branch 'remotes/Github_private/Blood_InputReworking' 2020-09-22 23:32:28 +02:00
Christoph Oelckers
880b811e0d - rewrote map loader to work independently of data structure sizes.
This is needed to extend a few fields that are too narrow - e.g. the texture offset fields have no room for interpolating scrolling textures.
Blood not done yet, will also need to be changed to get rid of the limits.
2020-09-22 22:40:53 +02:00
Christoph Oelckers
43a9be0ad0 - removed Blood's loadboard replacement hook.
It never calls engineLoadBoard but always its own map loading function directly.
2020-09-22 22:38:08 +02:00
Mitchell Richters
7bb3ab8188 - Build: Remove unused inline function in-case it accidentally gets used... 2020-09-22 23:01:45 +10:00
Christoph Oelckers
6776508239 - widescreen asset setup and consolidation of .def file loading. 2020-09-16 19:13:06 +02:00
Christoph Oelckers
aeeec61f39 - fixed light level setup in palette emulation mode. 2020-09-13 20:48:54 +02:00
Christoph Oelckers
0e58203d92 - fixed rintersect and removed some unused bits from engine.cpp. 2020-09-13 20:15:46 +02:00
Christoph Oelckers
a4754d7f34 - rewrote the map hack parser using sc_man.
This unexpectedly turned out a complete rewrite so now it is under my own license.
Also moved the remaining parts of map hack loading into the engine.

Overall I have to say that the feature is not what I expected, it's merely used to fudge the positioning of model sprites and for adding Polymer lights.
2020-09-13 13:01:44 +02:00
Christoph Oelckers
ec1c42b04a - got rid of common.h
All still relevant content was moved to places closer to its use.
2020-09-08 18:39:47 +02:00
Christoph Oelckers
18b39fd952 - first stage of generic automap code.
Lines and textures get rendered, not all colors are correct - sprites yet to do...
2020-09-06 20:49:43 +02:00
Christoph Oelckers
809f8b5d4b - hooked up the new automap framework. 2020-09-06 12:44:58 +02:00
Mitchell Richters
72771aeb40 - Fix broken krand() follow changes in 1354d52c05 due to truncation occuring from FixedToInt() inline function.
Very very sorry... :'(
Fixes #321.
2020-09-06 16:37:04 +10:00
Christoph Oelckers
8114309e89 - compat.h cleanup.
* use static_assert directly. Raze is C++17, no need for that macro shit.
* removed CONSTEXPR - I seriously fail to see the use here, many of the functions marked as CONSTEXPR cannot possibly even be constant evaluated so the declaration makes no sense. Removed most of these and replaced the valid ones with the official constexpr keyword.
* got rid of EDUKE_PREDICT_FALSE - this makes zero sense in script parsing code, at best it will save a few microseconds. Clean code wins.
* replaced Blrintf with xs_CRoundToInt. Shitty name is shitty name, even if derived from POSIX.
* replaced Bstr*casecmp with str*icmp. As these get defined in the CMake project based on actual compiler checks they are preferable here.
* removed lots of other stuff that is not needed with a minimum compiler requirement of C++17.
2020-09-04 21:24:48 +02:00
Christoph Oelckers
e5e8c02f1d - WIP level transition refactored to a game independent event system. 2020-09-04 19:43:35 +02:00
Mitchell Richters
1354d52c05 - Major cleanup of Q16.16 utilisation within games and engine.
* Remove fix16.h/cpp and utilise library from m_fixed.h.
* Extend m_fixed.h with two inline functions for int to/from float operations.
* Replace fix16_floor operations with those from xs_Float.h
* Replace multiple Q16.16 conversions from 0 to just be 0.
* Replaced all found in-game bit-shifts and multiplications/divisions with inline functions from m_fixed.h
* Replaced many casts of FRACUNIT as double in SW's panel.cpp as it is converted to double by way of type promotion.
* Fixed missed precision fixes in SW's panel.cpp where some types weren't declared correctly.
* Replaced 100+ `Cos()/Sin() >> 16` operations for Blood with inline functions `CosScale16()/SinScale16()`.
2020-09-01 23:00:47 +10:00
Christoph Oelckers
2f05a93547 Merge branch 'Packet' into back_to_basics2
# Conflicts:
#	source/core/gamestruct.h
#	source/games/duke/src/gameloop.cpp
#	source/games/duke/src/player_d.cpp
2020-08-31 00:09:56 +02:00
Christoph Oelckers
b8258da997 - cleaning out some trash from compat.h.
The header from hell...
2020-08-30 23:34:40 +02:00