Narr the Reg
53ec77c62c
input_common: Add property to invert an axis button
3 years ago
Narr the Reg
94c16132ba
yuzu: Add motion preview to controller input
3 years ago
Levi Behunin
2ff6c44168
Move to Clang Format 15
Depends on https://github.com/yuzu-emu/build-environments/pull/69
clang-15 primary run
3 years ago
Andrea Pappacoda
b2eb103829
chore: add missing SPDX tags
Follow-up to 2b87305d31
4 years ago
ameerj
d7977be416
general: Update style to clang-format-12
4 years ago
Lioncash
d44d662529
input_common/CMakeLists: Make some warnings errors
Makes the input_common code warnings consistent with the rest of the
codebase.
5 years ago
Lioncash
2ef7815422
common: Make use of [[nodiscard]] where applicable
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
5 years ago
Lioncash
39eccc0286
common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the
Common namespace.
7 years ago
Lioncash
e3444cb2a6
vector_math: Use variable template version of is_signed in Vec classes
Same behavior, less code
8 years ago
Lioncash
9e90145916
vector_math: Remove unimplemented function prototypes
8 years ago
Lioncash
3868198de6
vector_math: Make functions constexpr where applicable
8 years ago
Lioncash
1393309653
vector_math: Convert typedefs to type aliases
8 years ago
Lioncash
7bee2c9d13
vector_math: Ensure members are always initialized
Ensures that values are always in a well-defined state.
8 years ago
Lioncash
bd4e50afb9
vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]
These are all unused and the Write() ones should arguably not even be in the interface. There are better ways to provide this if we ever need it (like iterators).
8 years ago
Huw Pascoe
da1c8d1522
Fixed type conversion ambiguity
8 years ago
Subv
9f1b2d3260
Disable unary operator- on Math::Vec2/Vec3/Vec4 for unsigned types.
It is unlikely we will ever use this without first doing a Cast to a signed type.
Fixes 9 "unary minus operator applied to unsigned type, result still unsigned" warnings on MSVC2017.3
8 years ago
wwylele
acdf5035be
vector_math: remove dead template parameter
9 years ago
wwylele
48058f31b1
vector_math: remove broken SFINAE stuff
this was originally added to eliminate warnings on MSVC, but it doesn't work for custom types.
9 years ago
Subv
1dcd48ba2a
SwRasterizer: Flip the vertex quaternions before clipping (if necessary).
9 years ago
wwylele
b010ff8174
pica/swrasterizer: implement procedural texture
9 years ago
wwylele
5ddc3b5a56
vector math: add implementation of Length and Normalize
9 years ago
Yuri Kunde Schlesner
1de9e185af
Common: Remove dangerous Vec[234] array constructors
They're not currently used, and it's easy to accidentally pass a single
pointer argument to them, causing an out-of-bounds read.
9 years ago
Yuri Kunde Schlesner
1e4a5da9f4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
628ed4376a
Sources: Run clang-format on everything.
9 years ago
Lioncash
0c83775827
vector_math: Add missing member in Vec4's SetZero function
10 years ago
wwylele
8b6d444dd1
fix failure on gcc and clang
10 years ago
wwylele
3b7cbb25e3
disable unary minus when the type is not signed
silent warning C4146 on msvc
10 years ago
archshift
5df2d1b5f7
Move video_core/math.h to common/vector_math.h
The file only contained vector manipulation code, and such widely-useable code doesn't belong in video_core.
11 years ago
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
11 years ago
Emmanuel Gil Peyrot
8a1c08a0af
VideoCore: Fix a typo in Vec4 MakeVec(T, Vec3<T>), where the second argument was Vec2<T> instead.
11 years ago
bunnei
8c93a28fed
VideoCore: Added same-component swizzlers to math utility functions.
11 years ago
purpasmart96
ebfd831ccb
License change
11 years ago
Tony Wasserka
b5b3aeb576
Math: Warning fixes.
12 years ago
Tony Wasserka
162d641a30
Pica/Math: Improved the design of the Vec2/Vec3/Vec4 classes and simplified rasterizer code accordingly.
- Swizzlers now return const objects so that things like "first_vec4.xyz() = some_vec3" now will fail to compile (ideally we should support some vector holding references to make this actually work).
- The methods "InsertBeforeX/Y/Z" and "Append" have been replaced by more versions of MakeVec, which now also supports building new vectors from vectors.
- Vector library now follows C++ type promotion rules (hence, the result of Vec2<u8> with another Vec2<u8> is now a Vec2<int>).
12 years ago
Tony Wasserka
8528c810cf
Video core: Add utility class for vector operations.
I wrote most of this for ppsspp, so I hold full copyright over it.
In addition to the original release in ppsspp, this provides functionality to easily extend e.g. two-dimensional vectors to three-dimensional vectors.
12 years ago