Commit Graph

35 Commits

Author SHA1 Message Date
YoshiRulz 3decfa5019
Use inheritance instead of Type for PadSchema controls
* Rename ButtonSchema to PadSchemaControl, create ButtonSchema subclass, rename
AnalogSchema to AnalogStickSchema, and make PadSchemaControl abstract
* Replace switching on PadSchemaControl.Type (enum PadInputType) with type
checks
* Refactor and merge VirtualpadTool.CheckPads() into .CreatePads() (it was
easier than just using type checks in the old algorithm)
* Move members from PadSchemaControl to subtypes and cleanup
2020-03-31 21:40:36 +10:00
YoshiRulz 0ba7a5a7df
Rename axis-related types, members, and locals
I left a few methods where they had an equivalent *Bool*() for buttons, and also
left some in TAStudio that get serialised.
2020-03-31 17:29:55 +10:00
adelikat f98003f98e virtualpad schema - cleanups 2020-03-22 16:47:33 -05:00
adelikat 1f8171fc9b PadSchema - remove MaxSize as it wasn't being used, rename DefaultSize to just Size 2020-03-22 16:23:01 -05:00
adelikat 00ec0750d0 SnesSchema - remove unused method 2020-03-22 15:58:50 -05:00
adelikat 1b7698aa71 ButtonSchema - simplify UDLR helper methods more 2020-03-22 15:57:43 -05:00
adelikat 554e0dcf80 ButtonSchema - simplify more 2020-03-22 15:09:19 -05:00
adelikat 7b6ff18775 ButtonSchema - use more constructor overloads to simplify 2020-03-22 14:13:01 -05:00
adelikat 1c9260f7cf ButtonSchema - use name overload more 2020-03-22 13:16:30 -05:00
adelikat 0344b0affb make PadSchema.IsConsole not settable, force the use of inheritance 2020-03-22 12:37:28 -05:00
adelikat ec36ed6206 ButtonSchema - make Type not directly settable and force the use of inheritance to set it 2020-03-22 12:18:47 -05:00
adelikat 2560def438 Virtual Pad - ButtonSchema - make location constructor the only option since location is always required, change param order on Directional helper methods for consistency 2020-03-21 22:24:06 -05:00
adelikat a52c46339e VirtualPad Schema - add some helper methods for creating directional pad buttons, since those are so common 2020-03-21 18:12:26 -05:00
adelikat 4476cc53af VirtualPads - unnest ButtonScehma and PadInputType 2020-03-21 18:12:26 -05:00
adelikat 0ecc1e8023 VirtualPad Schema - default to type Button, and remove now redundant setting of this value 2020-03-21 16:10:01 -05:00
adelikat c1e2f6afe5 VirtualPad Schema - don't show display name if icon is preset, default to Name if displayName is not present (and no icon). Delete a lot of now redundant DisplayName assignments 2020-03-21 15:22:30 -05:00
YoshiRulz e12b5d8137
Refactor FloatRange creation and usage
effectively resolves #1200
* Replaced floats in FloatRange with ints (would have used shorts but
SubGBHawk/SubNesHawk use an axis to hack in cycle count or something), added
both Range<int> and Range<float> auto-properties
* Added bool field IsReversed to FloatRange
* Added enum AxisPairOrientation and factory method using it
* Cleaned up usages of FloatRange fields and properties
* Added new properties to PadSchema.ButtonSchema for type
PadInputType.AnalogStick (to hold the two FloatRanges) and used
ControllerDefinitions from cores to dedup these ranges in the schemata
* Made VirtualPadAnalogStick work properly: both the direction and bounds are
correctly set from the controller schemata, the polar conversion measures angles
consistently (though I think it might not work outside -128..127 e.g. for PSX),
and I didn't break the sensitivity override, plus negative percentages might
work now but I didn't allow those
* Renamed FloatRange to AxisRange, but did not rename related symbols
2020-03-14 20:47:45 +10:00
adelikat b390c2829c cleanup virtualpad code 2019-12-31 11:36:22 -06:00
YoshiRulz e6374ef477
Use string interpolation 2019-03-19 00:06:37 +10:00
adelikat 5d855ef60b more attribute renaming 2017-07-12 14:40:10 -05:00
adelikat 87ce1086cb snes9x - virtualpads 2017-06-04 19:44:25 -05:00
adelikat 50b5f4a1a9 Virtualpad misc cleanups 2017-05-24 09:07:03 -05:00
adelikat 436a853c96 Fix typo - Scema -> Schema 2017-04-29 15:41:27 -05:00
adelikat 76f77390ca SNES - virtual pad support for all the controller types and combinations 2017-04-22 11:55:21 -05:00
adelikat f1e528f68f Virtual pads - pass the current core into schema objects instead of using Global.Emulator 2016-12-05 19:33:21 -06:00
adelikat 38b76ea5d9 fix N64 dpad mnemonics and virtualpad buttons, fix pce and snes virtualpad buttons 2014-06-29 13:05:10 +00:00
adelikat ee6d73aac7 Virtualpads - some code cleanup 2014-06-29 03:14:40 +00:00
adelikat 3bf5b75adc SNES - remove players 3 and 4 from controller definition since they aren't currently used, virtual pad - dynamically generate number of controllers based on controller definition 2014-06-28 22:59:04 +00:00
adelikat 58d96a6806 virtualpads - snes controls 2014-06-28 16:52:31 +00:00
adelikat 75d4ff5117 Virtualpads - refactor schema objects to return a PadSchema collection instead of Virtualpad collection, and create the pads in the calling code 2014-06-27 17:02:46 +00:00
adelikat bb93dd0d42 Virtualpads - make a custom attribute for schema objects instead of using the Description attribute 2014-06-23 23:46:44 +00:00
xmikecampx7 4c5570eea3 2014-06-23 23:25:08 +00:00
xmikecampx7 886681bb9d Schema GamePads Added 2014-06-23 14:13:07 +00:00
xmikecampx7 20200adf3a Adding Buttons to Schemas 2014-06-23 01:43:33 +00:00
adelikat 2009e07e35 Virtualpads - Some Progress 2014-06-22 15:43:45 +00:00