Commit graph

322 commits

Author SHA1 Message Date
Mitchell Richters
1859a902e0 - Fix some warnings in MSVC. 2023-12-05 22:39:26 +01:00
Christoph Oelckers
bbbb61f450 backend update from GZDoom
LZMA update plus several ZScript improvements.
2023-12-05 22:39:26 +01:00
Mitchell Richters
790fc0b28a - Fix most warnings in Clang under Linux. 2023-12-05 22:39:24 +01:00
Mitchell Richters
0c13d4fe3a - Fix most GCC warnings in the backend/common code code.
* Most of them were just signedness issues. Hopefully I got everything right here.
* 3rd party stuff deliberately not touched.
2023-12-05 22:39:23 +01:00
Mitchell Richters
d2af13b924 - Make some utilities in vectors.h available as constexpr. 2023-12-05 22:39:18 +01:00
Mitchell Richters
a64de707e0 - Make TRotator<T> available as constexpr. 2023-12-05 22:39:18 +01:00
Mitchell Richters
4ff3351dd1 - Make TMatrix3x3<T> available as constexpr. 2023-12-05 22:39:18 +01:00
Mitchell Richters
eae8ebec31 - Make TVector4<T> available as constexpr. 2023-12-05 22:39:18 +01:00
Mitchell Richters
6b9ec49038 - Make TVector3<T> available as constexpr. 2023-12-05 22:39:18 +01:00
Mitchell Richters
ad694b7a8c - Make TVector2<T> available as constexpr. 2023-12-05 22:39:17 +01:00
Christoph Oelckers
60a36f4902 fix Vectoe3 clamp for real. 2023-12-05 22:39:17 +01:00
Mitchell Richters
e8451d3ddb - Take better advantage of InputPacket::ang's FRotator status.
* Change it to a DRotator as that's what the game is expecting. Too many narrowings against DAngle objects needed.
* Utilise object methods where possible.
* Do all math against the object where possible, not its members.
2023-12-05 22:39:13 +01:00
Mitchell Richters
e2a949949c - Take better advantage of InputPacket::vel's FVector3 status.
* Change it to a DVector3 as that's what the game is expecting. Too many narrowings against DAngle objects needed.
* Utilise object methods where possible.
* Do all math against the object where possible, not its members.
2023-12-05 22:39:12 +01:00
Mitchell Richters
8c1e392afc - Remove the TVector2 (const TVector3<vec_t> &other) constructor.
* This narrowing constructor was causing a problem with a `clamp()` overload in the next commit.
* Believe this is a product of a by-gone time before we had the `XY()` method on `TVector3<T>` objects.
2023-12-05 22:39:12 +01:00
Christoph Oelckers
716e059374 use shared SplitPath function 2023-10-01 13:09:22 +02:00
Christoph Oelckers
4a87003408 - backend update from GZDoom.
* Vulkan backend updated.
* zlib replaced with miniz.
* FileReader is now 64 bit capable.
* jpeg replaced with stb-image.
* CMake project warnings fixed.
2023-09-23 09:56:27 +02:00
Christoph Oelckers
25c0a56d96 - fixed broken character fallback for cyrillic T.
This was attached to the у (i.e. cyrillic u)
2023-09-06 00:03:02 +02:00
Christoph Oelckers
82057bcd5a - Backend update from GZDoom-
This compiles but doesn't run.
2023-08-23 20:36:19 +02:00
Christoph Oelckers
b95a5a4b2b - yet another backend update. 2023-08-20 02:15:57 +02:00
Christoph Oelckers
cf19d75242 - backend update from GZDoom without adapting other code. 2023-08-19 16:59:05 +02:00
Christoph Oelckers
5eee7b80b1 - backend update from GZDoom.
* controller handling improvements
* use stb_sprintf.
* various smaller fixes.
2023-08-09 12:17:17 +02:00
Christoph Oelckers
6aa61e72b5 - backend update from GZDoom.
* cleanup on the sound init code.
* added #pragma once in several headers.
* macOS version detection overhaul.
2023-07-22 09:54:00 +02:00
Christoph Oelckers
213bdbadad - allocate VMFunction's PrintableName from the ClassDataAllocator arena.
This avoids execution order issues on shutdown. VMFunction should not use FString.
2023-05-27 22:40:47 +02:00
Mitchell Richters
7ca73aa562 - Exhumed: Initial setup of new statusbar sequence exports, starting with DrawStatusSequence(). 2023-04-21 21:13:12 +10:00
Mitchell Richters
4cc3664287 - Exhumed: Minor tidy-up for seq_ReadSequence() prior to start. 2023-04-17 08:52:52 +10:00
Christoph Oelckers
b191491bbb - backend update from GZDoom. 2023-04-15 11:51:31 +02:00
Christoph Oelckers
b6da4ecddf - backend update from GZDoom. 2023-03-26 11:45:25 +02:00
Mitchell Richters
2020860ffe - For I_GetInputFrac(), just have the caller check if input is synchronised. 2023-02-05 08:40:25 +11:00
Mitchell Richters
ca4b9c5044 - Slight tidy-up in vectors.h. 2023-02-04 17:05:20 +11:00
Christoph Oelckers
fca0bdf379 - Backend update from GZDoom. 2023-01-15 09:30:01 +01:00
Christoph Oelckers
5952b79af5 - FString fixes. 2023-01-07 19:15:03 +01:00
Rachael Alexanderson
6b8bdcc449 - fix math error on ARM architectures 2022-12-28 02:07:10 -05:00
Mitchell Richters
67b40ee1d5 - Convert angle in hud_drawsprite() to work on true degrees, and in the right direction. 2022-12-11 19:46:26 +01:00
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
Mitchell Richters
59e8821332 - Use the interpolated sine table for tangent instead of Cephis math in TAngle<T>.
* Performed testing and it's ~6.5x faster this way.
2022-12-11 18:41:38 +01:00
Christoph Oelckers
1061e3e2ca - backend update from GZDoom. 2022-12-04 16:51:44 +01:00
Christoph Oelckers
d43ebd22ae - fixed merge errors from backend update. 2022-11-24 18:05:47 +01:00
Christoph Oelckers
2ffdf3d0e1 - backend update from GZDoom.
Mainly quaternion math and sound system cleanup.
2022-11-24 16:56:46 +01:00
Christoph Oelckers
4d6920e80b - fixed failiure to initialize the ambient tags array.
Also adding range checks to all places where it gets used. This is from CON code so proper values are never guaranteed.
2022-11-24 09:01:44 +01:00
Christoph Oelckers
8806fb930b - Backend update from GZDoom
* Vector 4 in zscript
* garbage collector fixes
2022-11-12 10:45:39 +01:00
Christoph Oelckers
2290f05dcb Revert "- Use std::fma() in the interpolation code."
This reverts commit ff7e0afa6f.

On Visual Studio with precise math, which is our main target this generates a very expensive function call instead of optimized assembly which renders the function's purpose ad absurdum.
2022-11-07 10:36:34 +01:00
Mitchell Richters
ff7e0afa6f - Use std::fma() in the interpolation code.
* From everything I've read, this more accurate, can be ~5% faster and is heavily optimised on CPUs of the last 10-12 years.
* This homegrown solution can be removed for `std::lerp()` once we go C++20.
2022-11-07 19:28:34 +11:00
Mitchell Richters
274899c9db - Get rid of useless lerp() function I added last night for lack of C++20.
* We already have a generic linear interpolator that _I_ added, so let's use it.
2022-11-07 17:31:17 +11:00
Mitchell Richters
c8114e7ed0 - Revert change to TAngle<T>'s / operator that snuck in. 2022-11-07 15:43:00 +11:00
Mitchell Richters
8ec475aec8 - Replace clamped off tangent values with a linear interpolation of the player's pitch.
* Gives a tangent-like ramping where it's noticeable without having to use the tangent at all.
* Had to do homegrown lerper since we're not C++20 yet.
2022-11-06 21:59:04 +11:00
Christoph Oelckers
41fc5660e5 - Backend update from GZDoom
* IQM enhancements
* config storage in Users
* moving of savegame filename generation to the backend
2022-11-06 11:46:26 +01:00
Christoph Oelckers
a3dbfab54b - return some invalid but recognizable magic value when IntersectLines is being passed two collinear lines.
This actually should check if the two lines are identical but since this is rather expensive and rarely needed it's better handled by returning a distinct value the caller can handle if needed.
2022-10-30 16:51:37 +01:00
Christoph Oelckers
e3254a8546 - fixed an edge case in cansee where an actor placed directly on a two-sided wall would fail to register that wall's back sector. 2022-10-30 16:51:37 +01:00
Christoph Oelckers
98e2fecd37 - another bunch of type conversion warnings fixed.
the ones in the findplayer functions are not critical in singleplayer.
2022-10-30 16:51:35 +01:00
Christoph Oelckers
902f8c9706 - silenced lots of warnings for deliberate type conversions.
The ones in d_net.cpp are not in active code.
2022-10-30 16:51:35 +01:00