scope stuff down again, rvalue on left of ==, fewer early exits (nw)

This commit is contained in:
Vas Crabb 2017-07-24 10:24:10 +10:00
parent e9e209a34c
commit 867f145b06
2 changed files with 20 additions and 23 deletions

View File

@ -96,19 +96,14 @@ WRITE8_MEMBER(wolfpack_state::torpedo_v_w)
void wolfpack_state::video_start() void wolfpack_state::video_start()
{ {
uint16_t val = 0;
m_LFSR = std::make_unique<uint8_t[]>(0x8000);
m_screen->register_screen_bitmap(m_helper); m_screen->register_screen_bitmap(m_helper);
for (int i = 0; i < 0x8000; i++) m_LFSR = std::make_unique<uint8_t []>(0x8000);
for (uint16_t i = 0, val = 0; i < 0x8000; i++)
{ {
int bit = (val >> 0x0) ^ (val >> 0xe) ^ 1; uint16_t const bit = ~(val ^ (val >> 14)) & 1;
val = (val << 1) | bit;
val = (val << 1) | (bit & 1); m_LFSR[i] = (val & 0x0c00) == 0x0c00;
m_LFSR[i] = (val & 0xc00) == 0xc00;
} }
m_current_index = 0x80; m_current_index = 0x80;

View File

@ -95,11 +95,12 @@ consolewin_info::~consolewin_info()
{ {
} }
void consolewin_info::set_cpu(device_t &device) void consolewin_info::set_cpu(device_t &device)
{ {
// exit if this cpu is already selected // exit if this cpu is already selected
if (m_current_cpu == &device) if (&device != m_current_cpu)
return; {
m_current_cpu = &device; m_current_cpu = &device;
// first set all the views to the new cpu number // first set all the views to the new cpu number
@ -115,6 +116,7 @@ void consolewin_info::set_cpu(device_t &device)
// and recompute the children // and recompute the children
recompute_children(); recompute_children();
} }
}
void consolewin_info::recompute_children() void consolewin_info::recompute_children()