Commit Graph

113 Commits

Author SHA1 Message Date
Phillip Stephens 75d01f9310
CFinalInput: Set controllerIdx to 0 by default, fixes Samus wandering during cutscenes 2022-03-26 20:37:02 -07:00
Phillip Stephens 7cf863983a
Minor input fixes, restore controller name in input viewer 2022-03-22 12:44:35 -07:00
Phillip Stephens 42dde9187b
Migrate to new CInputGenerator and rename old 2022-03-22 12:04:57 -07:00
Phillip Stephens 9804543327
Fix input not working properly 2022-03-22 10:58:19 -07:00
Phillip Stephens e3c8fa1d8f
Start integrating new controller classes 2022-03-22 10:58:19 -07:00
Phillip Stephens 22c9b55300
CDolphinController: rename known field 2022-03-22 10:58:19 -07:00
Phillip Stephens be79334465
Finish CDolphinController imp, ready for integration 2022-03-22 10:58:19 -07:00
Phillip Stephens 9cedce737f
Initial virtual PAD API 2022-03-22 10:58:18 -07:00
Phillip Stephens a96fe24260
Initial CDolphinController RE 2022-03-22 10:58:18 -07:00
Phillip Stephens 3800322735
CInputGenerator: Toggle rumble if a controller is connected and it's a GC controller 2022-03-19 17:45:04 -07:00
Luke Street 648a8e1af5 Merge branch 'new-streams' into dawn 2022-02-22 21:08:53 -05:00
Phillip Stephens 40669f4dc9
Add initial rumble support, use modified SDL branch to support all GC controller rumble modes 2022-02-22 01:12:15 -08:00
Phillip Stephens 15900053fa
Remove athena from Runtime, use raw zlib in bintoc rather than gzip 2022-02-21 22:59:47 -08:00
Luke Street c33674b9ab Lots of Windows fixes; add D3D12; more boo decoupling 2022-02-22 00:53:57 -05:00
Luke Street 57d96dbb17
Fully decouple hecl from Metaforce
- Added CStringExtras Convert functions
  (and UTF-compatible versions)
- GX header copied into Runtime
- SFX headers copied into Runtime/Audio
2022-02-21 08:01:06 -08:00
Luke Street 7b9f893a49 aurora: the boring C++ version 2022-02-16 00:21:24 -05:00
Phillip Stephens 615204f71f
More input and rendering implementations 2022-02-13 13:32:52 -08:00
Phillip Stephens 7ee8f6e01d
Add missing class variable 2022-02-09 01:01:06 -08:00
Phillip Stephens a6b2d66e1e
Input: Add onControllerAdded/Removed callbacks and also display the controller name in the input viewer 2022-02-09 00:54:53 -08:00
Luke Street ed4d38073b Fix controller axes + clamping 2022-02-08 22:14:14 -05:00
Phillip Stephens acd861754c
TexturedQuad fixes, Better controller input handling (needs custom mapping) 2022-02-08 11:18:12 -08:00
Luke Street a1482b4743 SDL controller input 2022-02-07 20:48:08 -05:00
Luke Street 9ca1a38171 Use UTF-8 exclusively internally
This removes SystemString, SystemChar, etc.
All filepaths and log strings are assumed to be UTF-8,
with conversions to UTF-16 for Windows APIs as appropriate.

Updates amuse, athena, boo, kabufua and nod
2021-06-30 14:20:45 -04:00
Phillip Stephens a9bcb7a9ce
Reformat pass 2021-06-07 12:29:18 -07:00
Phillip Stephens d9b7229e79
Add input visualization, protect first 7 object slots from deletion
The first 7 slots in the game are related to the player, we don't want to allow anyone to delete them because the game *will* crash
2021-05-30 00:52:20 -07:00
Phillip Stephens 9bae2f943e
Rename everything 2021-04-10 01:42:06 -07:00
Lioncash 002102c530 RumbleFxTable: Make table constexpr
Eliminates any potential runtime initializers.
2020-04-26 01:27:46 -04:00
Lioncash 554893ef85 RuntimeCommonB: Make use of bitfield initializers where applicable
Given that we now target C++20, we can make use of bitfield initializers
where applicable.
2020-04-20 15:57:25 -04:00
Lioncash 1d0151ccbc General: Make use of lock deduction guides 2020-04-20 00:38:10 -04:00
Lioncash 6fc32f44df CRumbleGenerator: Make use of fmt::print instead of printf
Less need to care about formatting specifiers.
2020-04-12 22:41:19 -04:00
Luke Street d23e76db54 Runtime/Input: Replace bitfield unions with constructor initializers 2020-04-10 15:12:46 -04:00
Luke Street f6e2f196ce
Merge pull request #252 from lioncash/resize2
CRumbleVoice: Resize vectors within constructor initializer list
2020-03-18 01:09:09 -04:00
Lioncash 488e377374 CRumbleVoice: Collapse repeated std::max calls in GetIntensity()
We can make use of the std::max overload that takes an initializer list.
2020-03-18 00:34:29 -04:00
Lioncash 71399d0944 CRumbleVoice: Correct bool->s16 conversion
Given the return type of the function is an s16, we can just use 0
directly here.
2020-03-18 00:32:51 -04:00
Lioncash 2701f060ee CRumbleVoice: Resize vectors within constructor initializer list
Same behavior, but constructs in place with the size, rather than
constructing and then resizing.

x20_handleIds cannot be done the same way unfortunately, as
reserved_vector doesn't have a constructor accepting a size argument
like std::vector does.
2020-03-18 00:28:44 -04:00
Lioncash e83d5caea6 CInputGenerator: Make use of std::array where applicable
Allows removing hardcoded array sizes.
2020-03-17 23:29:11 -04:00
Lioncash 221cc5c6b8 RuntimeCommonB: Normalize cpp file includes
Like the prior changes normalizing the inclusions within headers, this
tackles the cpp files of the RuntimeCommonB target, making these source
files consistent with their headers.
2019-12-22 18:12:04 -05:00
Phillip Stephens 77b61b0e68
Fix saves sending you to incorrect rooms, fix triggers 2019-11-05 09:18:14 -08:00
Lioncash f0186e7ceb ControlMapper: Use std::array where applicable 2019-10-01 02:11:02 -04:00
Lioncash dc565969e6 CFinalInput: Use std::array where applicable
Allows simplifying copies and gets rid of hardcoded size values.
2019-10-01 01:59:56 -04:00
Lioncash 36d04456dd General: Normalize RuntimeCommonB include paths
Finishes the normalizing of all of includes within the RuntimeCommonB target's headers.
2019-09-23 17:22:37 -04:00
Lioncash 06789d1860 General: Normalize several headers' include paths
Normalizes the include paths and makes them consistent. Also adds any
missing includes relevant to the interface.
2019-09-22 20:36:33 -04:00
Phillip Stephens 9b816d471b
Compile fixes 2019-09-14 10:08:09 -07:00
Lioncash 9983366a53 RumbleFxTable: Use std::array for the lookup table
Strongly enforces the type of the array and also allows size querying,
etc, directly from the type.
2019-09-10 19:13:34 -04:00
Lioncash d7493d5920 CRumbleVoice: Make SAdsrDelta interface constexpr
Makes the API consistent between SAdsrData and SAdsrDelta.
2019-09-10 19:13:34 -04:00
Lioncash 6ca5143b15 CRumbleVoice: Make SAdsrData constructors constexpr
Technically all file-scope instances have runtime-static constructors
otherwise. This allows the compiler to completely elide them from a
language point of view.
2019-09-10 19:02:22 -04:00
Lioncash 5b1e783a90 ControlMapper: Prevent array overrun cases
These should be comparing with >=, not >.

The command table descriptions also weren't kept in sync with the
enumeration.
2019-09-06 11:18:13 -04:00
Lioncash 27a8274e3b Runtime/Input/CFinalInput: Make comparison operators const
While we're at it, we can also provide an inequality operator for
logical symmetry.
2019-08-14 02:11:50 -04:00
Lioncash e9e9de26b2 Runtime/Input/CFinalInput: Correct return value of AKey, ASpecialKey and AMouseButton
The other A-prefixed functions all return a float value, however these
are truncating float values to bool. We can amend this to prevent
potential compilation warnings.
2019-08-14 02:07:02 -04:00
Lioncash 2059535b55 RuntimeCommonB: Use the override specifier where applicable
Applies the override keyword where applicable to indicate visually where
member function overriding is occurring. This only targets
the RuntimeCommonB target as a starting point, which resolves around
900+ cases where the keyword could be used.
2019-08-09 09:13:26 -04:00