mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
sensorboard: pass rotate variable for clear_cb too
This commit is contained in:
parent
64a60aa0fb
commit
337e10a21f
6 changed files with 8 additions and 8 deletions
|
@ -606,15 +606,15 @@ INPUT_CHANGED_MEMBER(sensorboard_device::ui_init)
|
|||
if (!newval)
|
||||
return;
|
||||
|
||||
u8 init = (u8)param;
|
||||
u8 init = param ? 1 : 0;
|
||||
cancel_sensor();
|
||||
cancel_hand();
|
||||
|
||||
m_clear_cb(init ? 0 : 1);
|
||||
u8 rotate = m_inp_ui->read() & 2;
|
||||
m_clear_cb((init ^ 1) | rotate);
|
||||
|
||||
if (init)
|
||||
m_init_cb(1 | rotate);
|
||||
m_init_cb(init | rotate);
|
||||
|
||||
// rotate pieces
|
||||
if (rotate)
|
||||
|
|
|
@ -34,7 +34,7 @@ public:
|
|||
sensorboard_device &set_ui_enable(bool b) { if (!b) m_maxspawn = 0; m_ui_enabled = (b) ? 7 : 0; return *this; } // enable UI inputs
|
||||
sensorboard_device &set_mod_enable(bool b) { if (b) m_ui_enabled |= 1; else m_ui_enabled &= ~1; return *this; } // enable modifier keys
|
||||
|
||||
auto clear_cb() { return m_clear_cb.bind(); } // 0 = internal clear, 1 = user presses clear
|
||||
auto clear_cb() { return m_clear_cb.bind(); } // d0: 0 = internal clear, 1 = user presses clear, d1: rotate
|
||||
auto init_cb() { return m_init_cb.bind(); } // for setting pieces starting position
|
||||
auto remove_cb() { return m_remove_cb.bind(); } // user removes piece from hand
|
||||
auto sensor_cb() { return m_sensor_cb.bind(); } // x = offset & 0xf, y = offset >> 4 & 0xf
|
||||
|
|
|
@ -159,7 +159,7 @@ void arb_state::init_board(u8 data)
|
|||
}
|
||||
}
|
||||
else
|
||||
m_board->preset_chess();
|
||||
m_board->preset_chess(data);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ void mirage_state::clear_board(u8 data)
|
|||
{
|
||||
memset(m_pieces_map, 0, sizeof(m_pieces_map));
|
||||
m_piece_hand = 0;
|
||||
m_board->clear_board();
|
||||
m_board->clear_board(data);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ void phantom_state::clear_board(u8 data)
|
|||
{
|
||||
memset(m_pieces_map, 0, sizeof(m_pieces_map));
|
||||
m_piece_hand = 0;
|
||||
m_board->clear_board();
|
||||
m_board->clear_board(data);
|
||||
}
|
||||
|
||||
void phantom_state::init_phantom()
|
||||
|
|
|
@ -162,7 +162,7 @@ void robotadv_state::init_board(u8 data)
|
|||
void robotadv_state::clear_board(u8 data)
|
||||
{
|
||||
m_piece_hand = 0;
|
||||
m_board->clear_board();
|
||||
m_board->clear_board(data);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue