Commit Graph

17 Commits

Author SHA1 Message Date
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
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 cdcc1eabde use inline out variables in Emulation.Cores 2020-02-18 15:10:29 -06:00
adelikat 606c3bf1c2
use more advanced language features in Emulation.Cores (#1852)
* Use expression bodies in Emulation.Cores, and a few other misc cleanups

* remove unused usings in Emulation.Common

* cleanups in Tables_Direct.cs

* some cleanups in nes boards - redundant code

* remove some redundant array initializers in Emulation.Cores

* cleanup AmstradCPC.Controllers

* use object initializers in a lot of places

* nes mappers - remove disch's notes comments in favor of the nesdev wiki link

* cleanup CdtConverter.cs, mostly use of object initializers

* remove redundant .ToString() calls in Emulation.Cores

* using var in Emulation.Cores

* AmstradCPC/ZXSpectrum - simplify some linq, tabs instead of spaces, a few other misc cleanups

* Use null-propagation in Emulation.Cores
2020-02-17 16:54:51 -06:00
J.D. Purcell fec63fb66a Spaces -> tabs, fix mixed newlines. 2019-11-03 20:58:36 -05:00
adelikat 810979dab2 Fix defctrl.json json parse error, Saturn keyboard - change names of keyboard R and L to not collide with the controller button names 2017-06-19 12:49:13 -05:00
adelikat 7caafc5437 Saturn - Keyboard - change some names to not have the same name as buttons, add default controls 2017-06-18 19:56:01 -05:00
adelikat 6df2afccee Saturn - button orders for peripherals 2017-06-18 17:19:34 -05:00
adelikat 0c078a189e Saturn - oops, 3d shoulder button mids should be 0 2017-06-18 16:05:46 -05:00
adelikat 7e98cd6ec9 Saturn - mouse - make button names consistent with other cores, virtual pad support 2017-06-18 15:03:50 -05:00
adelikat b22787fc44 Saturn - 3d pad - set mids for analog ranges, finish virtualpad support 2017-06-18 15:03:49 -05:00
nattthebear 37b285fe8d saturnus: get rid of the round-tripping of analogs through the mednafen input system. 2017-06-18 12:25:01 -04:00
nattthebear 69d0b36ca1 gonna flip it on them 2017-06-18 09:02:54 -04:00
nattthebear beb25ce24f saturnus: reorder the normal controller 2017-06-11 06:57:28 -04:00
nattthebear 1c46b79bbb saturnus: settings 2017-06-09 16:42:08 -04:00
nattthebear 62597400c1 saturnus: start working on some keyboard stuff 2017-06-07 17:23:30 -04:00
nattthebear d7b8464a9b saturnus: start working on controller hook up. there's something wrong with the CD stuff though, and games don't work 2017-06-04 21:14:00 -04:00