summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/crsshair.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-11-19 05:35:54 +1100
committer Vas Crabb <vas@vastheman.com>2016-11-19 05:38:48 +1100
commit8179a84458204a5e767446fcf7d10f032a40fd0c (patch)
tree16105e1667f811dcb24dbf0fc255166cb06df5c2 /src/emu/crsshair.cpp
parent1b489fe83034072149fb0637b20c7ba57dc72a7a (diff)
Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
Diffstat (limited to 'src/emu/crsshair.cpp')
-rw-r--r--src/emu/crsshair.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/crsshair.cpp b/src/emu/crsshair.cpp
index 9c2f2dbd996..26d671ec479 100644
--- a/src/emu/crsshair.cpp
+++ b/src/emu/crsshair.cpp
@@ -29,7 +29,7 @@
***************************************************************************/
/* raw bitmap */
-static const uint8_t crosshair_raw_top[] =
+static const u8 crosshair_raw_top[] =
{
0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,
0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,
@@ -206,8 +206,8 @@ void render_crosshair::create_bitmap()
for (y = 0; y < CROSSHAIR_RAW_SIZE / 2; y++)
{
/* assume it is mirrored vertically */
- uint32_t *dest0 = &m_bitmap->pix32(y);
- uint32_t *dest1 = &m_bitmap->pix32(CROSSHAIR_RAW_SIZE - 1 - y);
+ u32 *dest0 = &m_bitmap->pix32(y);
+ u32 *dest1 = &m_bitmap->pix32(CROSSHAIR_RAW_SIZE - 1 - y);
/* extract to two rows simultaneously */
for (x = 0; x < CROSSHAIR_RAW_SIZE; x++)
@@ -225,7 +225,7 @@ void render_crosshair::create_bitmap()
// animate - update the crosshair state
//-------------------------------------------------
-void render_crosshair::animate(uint16_t auto_time)
+void render_crosshair::animate(u16 auto_time)
{
// read all the port values
if (m_used)
@@ -263,7 +263,7 @@ void render_crosshair::animate(uint16_t auto_time)
// draw - render the crosshair to the container
//-------------------------------------------------
-void render_crosshair::draw(render_container &container, uint8_t fade)
+void render_crosshair::draw(render_container &container, u8 fade)
{
// add a quad assuming a 4:3 screen (this is not perfect)
container.add_quad(m_x - 0.03f, m_y - 0.04f, m_x + 0.03f, m_y + 0.04f,
@@ -414,7 +414,7 @@ void crosshair_manager::config_load(config_type cfg_type, xml_data_node *parentn
mode = crosshairnode->get_attribute_int("mode", CROSSHAIR_VISIBILITY_DEFAULT);
if (mode >= CROSSHAIR_VISIBILITY_OFF && mode <= CROSSHAIR_VISIBILITY_AUTO)
{
- crosshair.set_mode((uint8_t)mode);
+ crosshair.set_mode(u8(mode));
/* set visibility as specified by mode */
/* auto mode starts with visibility off */
crosshair.set_visible(mode == CROSSHAIR_VISIBILITY_ON);
@@ -432,7 +432,7 @@ void crosshair_manager::config_load(config_type cfg_type, xml_data_node *parentn
{
auto_time = crosshairnode->get_attribute_int("val", CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT);
if ((auto_time >= CROSSHAIR_VISIBILITY_AUTOTIME_MIN) && (auto_time <= CROSSHAIR_VISIBILITY_AUTOTIME_MAX))
- m_auto_time = (uint8_t)auto_time;
+ m_auto_time = u8(auto_time);
}
}