Commit graph

1207 commits

Author SHA1 Message Date
Emile Belanger
9e9bb66e9a GLES: Fix bias state 2021-12-11 13:44:23 +01:00
Emile Belanger
9e1e824f5e GLES: Fixed palette mode and interpolation 2021-12-11 13:23:39 +01:00
Emile Belanger
5a8c57040f GLES: Palette mode now GLES2 compliant. Interpolation not yet working. 2021-12-11 13:23:39 +01:00
Christoph Oelckers
a8c4d61fab - default-enable GL_DEPTH_CLAMP for the GLES renderer.
This brings it in line with the other backends.
2021-12-08 00:19:49 +01:00
Mitch Richters
7f1b8402d1 - Slight optimisation to I_GetInputFrac() by multiplying by inverse instead of dividing on a constant. 2021-12-07 20:02:11 +11:00
Mitch Richters
b6b0887611 - Fix missed flags pass-through in bool StartCutscene(const char* s, int flags, const CompletionFunc& completion) overload. 2021-12-07 19:59:19 +11:00
Christoph Oelckers
c2baa68160 - fixed camera textures breaking in SW when restarting a level.
This was caused by attempting to delete the camera textures when cleaning up the mirror array.
The Build tile manager was not prepared for such a use case and left a broken texture behind.

To allow this to function it now resets the texture replacement type when deleting a tile and to avoid creating new camera textures these will now be stored in a cache and recycled later.
2021-12-02 21:40:43 +01:00
Christoph Oelckers
f765783437 - various small bits of cleanup. 2021-11-29 00:57:11 +01:00
Christoph Oelckers
b54e52330c - Blood: don't play the same looped sound multiple times on the same actor.
This caused some strong echoing on E4M6.
2021-11-29 00:57:11 +01:00
Christoph Oelckers
1de9c63d45 - fixed center aligned rendering of 2D content.
This calculates the centered pivot point in integer texel coordinate space so for odd numbers it must round down instead of using a fractional position.
2021-11-29 00:57:10 +01:00
Christoph Oelckers
793aaf242c - make upscaling of sky textures depend on the single tile size, not the entire composite texture. 2021-11-29 00:57:10 +01:00
Christoph Oelckers
448db9c93d - enable texture upscaling in Polymost, disable it for the movie player's textures. 2021-11-29 00:57:10 +01:00
Christoph Oelckers
5bd53cbe8c - do not use clamp for calculation scale factors in Get...Scale.
These operations are not actual clamps and can assert on some implementations.
2021-11-29 00:57:09 +01:00
Christoph Oelckers
1bbbeb8f4c - Blood: reworked GetClosestSpriteSectors to use dynamic arrays, deleted unused GetClosestSectors.
# Conflicts:
#	source/games/blood/src/aibeast.cpp

# Conflicts:
#	source/games/blood/src/aibeast.cpp
#	source/games/blood/src/gameutil.h
2021-11-29 00:55:43 +01:00
Christoph Oelckers
01abe7b2ac - addressed most unused/uninitialized variable warnings from MSVC. 2021-11-29 00:55:30 +01:00
Christoph Oelckers
f7fdc5af41 - address several warnings reported by GCC 11. 2021-11-29 00:55:29 +01:00
Mitch Richters
e491d15ff9 - Move InputScale() out of inputstate.cpp and into i_time.cpp as I_GetInputFrac() to make it available to GZDoom for potential future requirements.
* As part of this, feed the output of `I_GetInputFrac()` to `gi->GetInput()` instead of having each game's virtual override calling it locally.
2021-11-29 00:55:01 +01:00
Christoph Oelckers
b7c7328cdd - backend update fromGZDoom.
most importantly this addresses issues with key down/key up events being sent in the same tic not having an effect on game actions that require a key being held down.
2021-11-21 10:19:52 +01:00
Christoph Oelckers
75e2d801a7 - SW: only check valid sectors for SecUser entries. 2021-11-11 21:58:14 +01:00
Christoph Oelckers
cc16c02baa - fixed BitArray constructor. 2021-11-11 21:55:46 +01:00
Christoph Oelckers
2840b5f25d - added reverse iterators to tarray.h 2021-11-08 18:55:46 +01:00
Christoph Oelckers
94f40d11ae - SparseArrayView class
We need this to merge the game specific sector/wall extensions with the base but still allow the engine to access such arrays. For that they need a runtime settable stride.
2021-11-08 18:55:35 +01:00
Christoph Oelckers
13306e900d - silence some warnings. 2021-11-06 18:26:47 +01:00
Christoph Oelckers
9a1bcdbc84 - let's hope this works better.
CI complained about the iterator but the messages were very unclear about the problem.
2021-11-06 17:18:07 +01:00
Christoph Oelckers
19363ac23e - project contortions to make MSVC print our own deprecations but silence the ones from the compiler.
Since everything uses the same warning number, the old setup resulted in [[deprecated]] being silenced.
So this explicitly adds the needed #defines to silence the very noisy warning from the MSVC headers but leaves warning 4996 active otherwise.

In particlular this does:

* silence all warnings in the subprojects
* do not derive TIterator from std::iterator anymore as C++17 deprecates this.
* silence the above for RapidJSON because altering that code is not desirable.
* explicitly disable warning 4996 in some Windows files that call the deprecated (but still needed) GetVersionEx function.
* define _CRT_SECURE_NO_DEPRECATE, _CRT_SECURE_NO_WARNINGS and _CRT_NONSTDC_NO_WARNINGS through CMake to disable the CRT's deprecation and security warnings.

Currently this will print several (intended) deprecation warnings about 'updatesector' that point to code that needs to be changed but cannot yet without other refactorings being done first.
2021-11-06 16:48:31 +01:00
Christoph Oelckers
389f760d45 - address C++20 deprecation warnings with enums in floating point arithmetic. 2021-11-02 23:32:31 +01:00
Christoph Oelckers
86166f5e67 Revert "- xs_Float.h: Make all inlines return an unsigned value, and change previous unsigned inlines to signed."
Revert "- `xs_Float.h`: Add `getint()` getter to `_xs_doubleints` struct."
Revert "- SW: When adjusting horizon in `DoPlayerDeathHoriz()`, just use integer horizon values and not Q16.16."
Revert "- Duke (RR): Clean up some unnecessary `FixedToFloat()` usage with the `fixedhoriz` `asbuildf()` method."
Revert "- `binaryangle.h`: Use `constexpr` on inline functions where it was previously not possible to do so."
Revert "- `m_fixed.h`: Use `constexpr` on inline functions where it was previously not possible to do so."
Revert "- `xs_Float.h`: Convert header to `constexpr`."

This does nor work as it violates the constexpr rules for unions. The code will error out on compilation for accessing an inactive member of a union.
2021-11-01 20:25:38 +01:00
Mitch Richters
d9bbe1fa61 - xs_Float.h: Make all inlines return an unsigned value, and change previous unsigned inlines to signed.
* Removes situations where calling `xs_CRoundToUInt()` and other unsigned inlines would go through extra casts (`uint32_t` > `int32_t` > `uint32_t`).
* Because the native data in the `_xs_doubleints` struct is a union of a double and `uint32_t`, it makes sense to do everything unsigned and convert to `int32_t` if needed instead.
2021-11-01 23:57:40 +11:00
Mitch Richters
d1274e76dc - xs_Float.h: Add getint() getter to _xs_doubleints struct. 2021-11-01 23:42:49 +11:00
Mitch Richters
306c0a3ebb - m_fixed.h: Use constexpr on inline functions where it was previously not possible to do so. 2021-11-01 23:37:31 +11:00
Mitch Richters
a84aa84838 - xs_Float.h: Convert header to constexpr.
* Allow use of this library in static initialisers.
* Required re-arranging a little bit to order everything so inlines could be used without prototypes.
2021-11-01 23:37:31 +11:00
Christoph Oelckers
c7da8ca9d4 - fixed compilation on non-Windows.
In this header we must explicitly use the std:: namespace for min/max.
2021-10-30 11:38:55 +02:00
Christoph Oelckers
6e0fbb2043 - removed templates.h includes. 2021-10-30 10:51:03 +02:00
Mitch Richters
b02a6a3ec9 - Replace MIN() from templates.h with version provided in STL. 2021-10-30 10:36:15 +02:00
Mitch Richters
9894729fc2 - Replace MAX() from templates.h with version provided in STL.
# Conflicts:
#	source/common/textures/hw_ihwtexture.cpp
#	source/common/utility/templates.h
2021-10-30 10:36:02 +02:00
Christoph Oelckers
57b638f26f - use std::clamp instead of our homegrown version. 2021-10-30 10:35:00 +02:00
Christoph Oelckers
9071949a46 - backend upate from GZDoom
* Vulkan SDK and dependencies updated.
* better interface for buffers in the render backend.
2021-10-30 09:34:38 +02:00
Emile Belanger
14ebe23f0d Fix compilation with USE_GLES2 = 1 2021-10-25 17:50:48 +02:00
Emile Belanger
ff009cbf7a Re-enable depth clamping 2021-10-24 12:06:54 +02:00
Christoph Oelckers
d101a2b51f - removed pointless address check.
This array was once a pointer but the check was forgotten.
2021-10-24 08:26:10 +02:00
Emile Belanger
2a905e8026 Fix palette mode for GLES 2021-10-16 18:42:02 +02:00
Christoph Oelckers
46d2c52b19 - use correct math to access a texel's center for rendering voxels.
No idea if this was causing problem, but it surely wasn't 100% correct.
2021-10-13 00:12:58 +02:00
Christoph Oelckers
39319a9582 - fixed warnings in common code. 2021-10-08 19:07:56 +02:00
Christoph Oelckers
2348dd8848 - backend update from GZDoom
* GLES backend fixes.
* font colorization fixes.
* option menu spacing fix
2021-10-07 22:46:45 +02:00
Christoph Oelckers
49e0c461c2 - Backend update from GZDoom.
This is mainly bringing the GLES backend up to date.
2021-10-07 22:46:45 +02:00
Christoph Oelckers
a3d9cd9a68 - Backend update from GZDoom - mainly for GLES2 support. 2021-09-18 12:20:28 +02:00
Christoph Oelckers
585f841f96 - core shader override block, backported from GZDoom. 2021-09-12 18:18:26 +02:00
Christoph Oelckers
bad57f6a5f - clear pspAsArray at the beginning of a save/load operation, not at the end.
If done at the end it may leave behind some stale data if saving or loading fails for some reason.
2021-09-12 18:17:50 +02:00
Christoph Oelckers
6d958135e0 - give TMap a proper move constructor and assignment operator. 2021-08-23 19:05:31 +02:00
Mitchell Richters
1d0924e45a - Fix invocation name in FileSystem::GetLongName() error output.
* Thanks to @Gaerzi for spotting this.
2021-08-23 18:55:42 +10:00