Commit graph

1589 commits

Author SHA1 Message Date
Mitchell Richters
8f75f06efd - Replace tmulscale##() calls with TMulScale() from common. 2021-01-05 07:31:08 +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
0f8e73ce77 - inlined calc_globalshifts to get rid of two global variables. 2020-12-30 09:55:57 +01:00
Christoph Oelckers
1a2b93f402 - fixed sky panning in Duke.
This needs to take the composite texture into account because panning in Build is based on tile size, not map dimension.
It was also redone to use floating point to get rid of the horrible precision of the scrolling effect.
2020-12-06 20:49:32 +01:00
Mitchell Richters
1e8fe482f3 - Duke: Partially address excessively fast sky in E4L1 as reported in #217.
* Before d545eb7aa9, `moveclouds()` simply set `ceilingxpanning`/`ceilingypanning`. Afterwards, it was accumulating with every passing loop.
* Despite fixing this, still seems a bit fast.
2020-12-06 23:51:20 +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
9a507e5d0a - fixed model rendering.
(What a stupid mistake... :?)

Model animations still do not work as intended, though.
2020-12-01 22:03:20 +01:00
Christoph Oelckers
2cd3927613 - use floats for wall panning offsets. 2020-11-26 18:32:35 +01:00
Christoph Oelckers
d545eb7aa9 - make sector panning variables floats and added some convenience wrappers. 2020-11-26 18:32:35 +01:00
Christoph Oelckers
9a4073508d - Blood: Savegame fully transitioned to JSON
not tested yet.
2020-11-23 09:53:58 +01:00
Christoph Oelckers
169d708547 - removed all remaining uses of tilesiz. 2020-11-23 08:55:02 +01:00
Christoph Oelckers
d60bc8be9f - replaced all remaining uses of tilesiz[].y 2020-11-23 08:39:49 +01:00
Christoph Oelckers
bbf1352db1 - replaced approx 1/3 of all accesses to the tilesiz wrapper class. 2020-11-23 00:18:30 +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
b97f12a2eb - did some global search & replace to reduce the number of accesses to the tilesiz wrapper. 2020-11-20 08:18:26 +01:00
Christoph Oelckers
873f4d7c0c - link hires replacements to textures instead of tile numbers.
This is needed to connect them to fonts as well because its glyphs have no tile index.
2020-11-10 20:12:46 +01:00
Christoph Oelckers
ed599d0f05 - moved the hires texture replacement logic into a backend callback.
This way it can be handled transparently to the calling code.
Fonts do not work yet, though.
2020-11-10 16:22:02 +01:00
Christoph Oelckers
601680d08e - moved widthBits and heightBits into engine.
These functions will go away with the rest of the renderer when the time comes, so this is the right place.
2020-11-09 20:56:28 +01:00
Christoph Oelckers
7621d3e105 - removed redundant dosetaspect function.
This was software rendering only.
2020-11-04 22:30:11 +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
78afb67c7f - setup for Duke actor data transition to something more scripting friendly.
The main problem here is that there's two data arrays representing an actor - sprite and hittype and the engine only uses indices for reference.
By setting up hittype to contain a sprite reference, the function and iterator interface can be rewritten to use a single pointer instead to represent an actor.
The main objective is to reduce the number of accesses to the global arrays which constitute the biggest refactoring blocker.
2020-10-21 16:31:17 +02:00
Christoph Oelckers
08e29396e5 - split moveweapons_d further up into more smaller parts. 2020-10-18 09:45:41 +02:00
Christoph Oelckers
4f7c0b696c - and finally the iterators in the backend. 2020-10-15 20:22:40 +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
fe2e96d3a6 Merge branch 'master' into InputContinuation
# Conflicts:
#	source/games/duke/src/duke3d.h
2020-10-10 21:39:27 +02:00
Christoph Oelckers
e95fea1056 - fixed: Toggling palette emulation should reset the texture filter in the samplers. 2020-10-10 18:57:16 +02:00
Mitchell Richters
90e711464a - clamp(): Remove definition in compat.h and uplift definition in templates.h. 2020-10-07 13:29:00 +11:00
Mitchell Richters
09a05f354c - Re-standardise horizon around 0 and not 100.
* Blood had this right. It makes sense that the horizon be based around as it's easier to work with.
* Removed all associated game math to deduct default horizon of 100 when doing weapon zvel etc, meaning actual horizon can just be used.
* Re-did return to center function to work on the already converted pitch. Return speed should be 1:1 with previous code.
2020-10-07 13:28:45 +11:00
Christoph Oelckers
82612a1330 - it compiles again (with lots of code commented out.) 2020-10-04 20:11:02 +02:00
Christoph Oelckers
7661720585 - fixed Blood map loading
Whoever designed that map format with its idiotic encryption should burn in Hell >)
It's a needless complication and open invitation for errors.
To avoid follow up problems it now uses its own local struct for loading in the sprites and the global spritetype no longer depends on any map format and can be changed as the need arises.

Fixes #101
2020-10-03 18:35:47 +02:00
Christoph Oelckers
89d5d18b9e - these parts were missed somehow. 2020-10-02 22:42:54 +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
1e63341c4d - fixed inverted checks for texture clamping. 2020-09-25 23:42:53 +02:00
Christoph Oelckers
3344e73fed - fixed some crashes in the .def parser and texture initialization code. 2020-09-25 20:51:02 +02:00