mirror of
https://github.com/holub/mame
synced 2025-05-19 20:29:09 +03:00
Not worth mentioning - Minor code/indent cleanup
This commit is contained in:
parent
125c2079fc
commit
0a5618a90d
@ -431,16 +431,15 @@ static READ8_HANDLER( leta_r )
|
||||
static const char *const letanames[] = { "LETA0", "LETA1", "LETA2", "LETA3" };
|
||||
atarisy2_state *state = space->machine->driver_data<atarisy2_state>();
|
||||
|
||||
if (state->pedal_count == -1) /* 720 */
|
||||
if (offset <= 1 && state->pedal_count == -1) /* 720 */
|
||||
{
|
||||
switch (input_port_read(space->machine, "SELECT"))
|
||||
{
|
||||
case 0: /* Real */
|
||||
break;
|
||||
|
||||
case 1: /* Joystick */
|
||||
case 1: /* Fake Joystick */
|
||||
/* special thanks to MAME Analog+ for the mapping code */
|
||||
if (offset <= 1)
|
||||
{
|
||||
static double last_angle;
|
||||
static int rotations;
|
||||
@ -461,8 +460,10 @@ static READ8_HANDLER( leta_r )
|
||||
rotations++;
|
||||
last_angle = angle;
|
||||
|
||||
/* offset 0 returns 0xff when the controller blocks one of two gaps */
|
||||
if ((offset) == 0)
|
||||
/* make offset 0 return 0xff when the controller blocks one of two gaps */
|
||||
/* this is not accurate, as a counter should count up/down 2 counts as it passes through each gap */
|
||||
/* this is close enough to pass the service mode controller test the first couple of trys. */
|
||||
if (offset == 0)
|
||||
{
|
||||
/* original controller had two gaps 10 degrees apart, each 2.5 degrees wide */
|
||||
/* we fake it a little to make it possible to hit the zeroed state with a digital controller */
|
||||
@ -478,9 +479,8 @@ static READ8_HANDLER( leta_r )
|
||||
return (rotations * 144 + (int)(angle * 144.0 / 360.0)) & 0xff;
|
||||
}
|
||||
}
|
||||
return 0xff;
|
||||
|
||||
case 2: /* Spinner */
|
||||
case 2: /* Fake Spinner */
|
||||
{
|
||||
static UINT32 last_rotate_count;
|
||||
static INT32 pos; /* track fake position of spinner */
|
||||
@ -553,17 +553,11 @@ static READ8_HANDLER( leta_r )
|
||||
}
|
||||
}
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
if (offset == 0)
|
||||
return center_count & 0xff;
|
||||
|
||||
case 1:
|
||||
else
|
||||
/* offset == 1 */
|
||||
return rotate_count & 0xff;
|
||||
|
||||
default:
|
||||
return 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user