summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/midzeus.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-07-31 11:50:20 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-07-31 14:41:02 +0200
commit9667c6a8cce1829a7321dde67bd0287c73234386 (patch)
treef3665957d557cb18728a40e75f7d9f2341aaff1d /src/mame/drivers/midzeus.cpp
parent69ac4affc86caac51ff9720083ed128dabdb932f (diff)
std::min and std:max instead of MIN and MAX, also some more macros converted to inline functions (nw)
Diffstat (limited to 'src/mame/drivers/midzeus.cpp')
-rw-r--r--src/mame/drivers/midzeus.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/midzeus.cpp b/src/mame/drivers/midzeus.cpp
index 4a9fb4eaa7a..0af3eef7fcd 100644
--- a/src/mame/drivers/midzeus.cpp
+++ b/src/mame/drivers/midzeus.cpp
@@ -506,7 +506,7 @@ TIMER_CALLBACK_MEMBER(midzeus_state::invasn_gun_callback)
/* generate another interrupt on the next scanline while we are within the BEAM_DY */
beamy++;
if (beamy <= m_screen->visible_area().max_y && beamy <= gun_y[player] + BEAM_DY)
- gun_timer[player]->adjust(m_screen->time_until_pos(beamy, MAX(0, gun_x[player] - BEAM_DX)), player);
+ gun_timer[player]->adjust(m_screen->time_until_pos(beamy, std::max(0, gun_x[player] - BEAM_DX)), player);
}
@@ -535,7 +535,7 @@ WRITE32_MEMBER(midzeus_state::invasn_gun_w)
};
gun_x[player] = ioport(names[player][0])->read() * visarea.width() / 255 + visarea.min_x + BEAM_XOFFS;
gun_y[player] = ioport(names[player][1])->read() * visarea.height() / 255 + visarea.min_y;
- gun_timer[player]->adjust(m_screen->time_until_pos(MAX(0, gun_y[player] - BEAM_DY), MAX(0, gun_x[player] - BEAM_DX)), player);
+ gun_timer[player]->adjust(m_screen->time_until_pos(std::max(0, gun_y[player] - BEAM_DY), std::max(0, gun_x[player] - BEAM_DX)), player);
}
}
}