diff options
Diffstat (limited to 'src/emu/ui')
-rw-r--r-- | src/emu/ui/devctrl.h | 8 | ||||
-rw-r--r-- | src/emu/ui/menu.c | 8 | ||||
-rw-r--r-- | src/emu/ui/ui.c | 2 | ||||
-rw-r--r-- | src/emu/ui/ui.h | 42 | ||||
-rw-r--r-- | src/emu/ui/viewgfx.c | 6 |
5 files changed, 33 insertions, 33 deletions
diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h index 777d837f3a9..8b0c0418640 100644 --- a/src/emu/ui/devctrl.h +++ b/src/emu/ui/devctrl.h @@ -30,7 +30,7 @@ protected: private: // device iterator - typedef device_type_iterator<&device_creator<_DeviceType>, _DeviceType> device_iterator; +// typedef device_type_iterator<&device_creator<_DeviceType>, _DeviceType> device_iterator; _DeviceType * m_device; int m_count; @@ -46,7 +46,7 @@ ui_menu_device_control<_DeviceType>::ui_menu_device_control(running_machine &mac : ui_menu(machine, container) { device_iterator iter(machine.root_device()); - m_device = device ? device : iter.first(); + m_device = device ? device : downcast<_DeviceType *>(iter.first()); m_count = iter.count(); } @@ -79,7 +79,7 @@ void ui_menu_device_control<_DeviceType>::previous() index--; else index = m_count - 1; - m_device = iter.byindex(index); + m_device = downcast<_DeviceType *>(iter.byindex(index)); } } @@ -100,7 +100,7 @@ void ui_menu_device_control<_DeviceType>::next() index++; else index = 0; - m_device = iter.byindex(index); + m_device = downcast<_DeviceType *>(iter.byindex(index)); } } diff --git a/src/emu/ui/menu.c b/src/emu/ui/menu.c index 57d20c990a5..3e35ee3a6c5 100644 --- a/src/emu/ui/menu.c +++ b/src/emu/ui/menu.c @@ -93,7 +93,7 @@ void ui_menu::init(running_machine &machine) int alpha = 0xff; if (x < 25) alpha = 0xff * x / 25; if (x > 256 - 25) alpha = 0xff * (255 - x) / 25; - hilight_bitmap->pix32(0, x) = MAKE_ARGB(alpha,0xff,0xff,0xff); + hilight_bitmap->pix32(0, x) = rgb_t(alpha,0xff,0xff,0xff); } hilight_texture = machine.render().texture_alloc(); hilight_texture->set_bitmap(*hilight_bitmap, hilight_bitmap->cliprect(), TEXFORMAT_ARGB32); @@ -1073,7 +1073,7 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const int x, y; // start with all-transparent - dest.fill(MAKE_ARGB(0x00,0x00,0x00,0x00)); + dest.fill(rgb_t(0x00,0x00,0x00,0x00)); // render from the tip to the bottom for (y = 0; y < height; y++) @@ -1098,14 +1098,14 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const if (x == 0) { dalpha = MIN(0xff, linewidth); - target[x] = MAKE_ARGB(dalpha,0xff,0xff,0xff); + target[x] = rgb_t(dalpha,0xff,0xff,0xff); } // remaining columns consume two pixels, one on each side else { dalpha = MIN(0x1fe, linewidth); - target[x] = target[-x] = MAKE_ARGB(dalpha/2,0xff,0xff,0xff); + target[x] = target[-x] = rgb_t(dalpha/2,0xff,0xff,0xff); } // account for the weight we consumed */ diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c index d4a4dc6afd3..ac5e0aba020 100644 --- a/src/emu/ui/ui.c +++ b/src/emu/ui/ui.c @@ -414,7 +414,7 @@ void ui_manager::update_and_render(render_container *container) if (alpha > 255) alpha = 255; if (alpha >= 0) - container->add_rect(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(alpha,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + container->add_rect(0.0f, 0.0f, 1.0f, 1.0f, rgb_t(alpha,0x00,0x00,0x00), PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); } // render any cheat stuff at the bottom diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h index 6d4e299a3bf..757d0deb437 100644 --- a/src/emu/ui/ui.h +++ b/src/emu/ui/ui.h @@ -34,27 +34,27 @@ #define UI_BOX_TB_BORDER (UI_TARGET_FONT_HEIGHT * 0.25f) /* handy colors */ -#define ARGB_WHITE MAKE_ARGB(0xff,0xff,0xff,0xff) -#define ARGB_BLACK MAKE_ARGB(0xff,0x00,0x00,0x00) -#define UI_BORDER_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff) -#define UI_BACKGROUND_COLOR MAKE_ARGB(0xef,0x10,0x10,0x30) -#define UI_GFXVIEWER_BG_COLOR MAKE_ARGB(0xef,0x10,0x10,0x30) -#define UI_GREEN_COLOR MAKE_ARGB(0xef,0x10,0x60,0x10) -#define UI_YELLOW_COLOR MAKE_ARGB(0xef,0x60,0x60,0x10) -#define UI_RED_COLOR MAKE_ARGB(0xf0,0x60,0x10,0x10) -#define UI_UNAVAILABLE_COLOR MAKE_ARGB(0xff,0x40,0x40,0x40) -#define UI_TEXT_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff) -#define UI_TEXT_BG_COLOR MAKE_ARGB(0xef,0x00,0x00,0x00) -#define UI_SUBITEM_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff) -#define UI_CLONE_COLOR MAKE_ARGB(0xff,0x80,0x80,0x80) -#define UI_SELECTED_COLOR MAKE_ARGB(0xff,0xff,0xff,0x00) -#define UI_SELECTED_BG_COLOR MAKE_ARGB(0xef,0x80,0x80,0x00) -#define UI_MOUSEOVER_COLOR MAKE_ARGB(0xff,0xff,0xff,0x80) -#define UI_MOUSEOVER_BG_COLOR MAKE_ARGB(0x70,0x40,0x40,0x00) -#define UI_MOUSEDOWN_COLOR MAKE_ARGB(0xff,0xff,0xff,0x80) -#define UI_MOUSEDOWN_BG_COLOR MAKE_ARGB(0xb0,0x60,0x60,0x00) -#define UI_DIPSW_COLOR MAKE_ARGB(0xff,0xff,0xff,0x00) -#define UI_SLIDER_COLOR MAKE_ARGB(0xff,0xff,0xff,0xff) +#define ARGB_WHITE rgb_t(0xff,0xff,0xff,0xff) +#define ARGB_BLACK rgb_t(0xff,0x00,0x00,0x00) +#define UI_BORDER_COLOR rgb_t(0xff,0xff,0xff,0xff) +#define UI_BACKGROUND_COLOR rgb_t(0xef,0x10,0x10,0x30) +#define UI_GFXVIEWER_BG_COLOR rgb_t(0xef,0x10,0x10,0x30) +#define UI_GREEN_COLOR rgb_t(0xef,0x10,0x60,0x10) +#define UI_YELLOW_COLOR rgb_t(0xef,0x60,0x60,0x10) +#define UI_RED_COLOR rgb_t(0xf0,0x60,0x10,0x10) +#define UI_UNAVAILABLE_COLOR rgb_t(0xff,0x40,0x40,0x40) +#define UI_TEXT_COLOR rgb_t(0xff,0xff,0xff,0xff) +#define UI_TEXT_BG_COLOR rgb_t(0xef,0x00,0x00,0x00) +#define UI_SUBITEM_COLOR rgb_t(0xff,0xff,0xff,0xff) +#define UI_CLONE_COLOR rgb_t(0xff,0x80,0x80,0x80) +#define UI_SELECTED_COLOR rgb_t(0xff,0xff,0xff,0x00) +#define UI_SELECTED_BG_COLOR rgb_t(0xef,0x80,0x80,0x00) +#define UI_MOUSEOVER_COLOR rgb_t(0xff,0xff,0xff,0x80) +#define UI_MOUSEOVER_BG_COLOR rgb_t(0x70,0x40,0x40,0x00) +#define UI_MOUSEDOWN_COLOR rgb_t(0xff,0xff,0xff,0x80) +#define UI_MOUSEDOWN_BG_COLOR rgb_t(0xb0,0x60,0x60,0x00) +#define UI_DIPSW_COLOR rgb_t(0xff,0xff,0xff,0x00) +#define UI_SLIDER_COLOR rgb_t(0xff,0xff,0xff,0xff) /* cancel return value for a UI handler */ #define UI_HANDLER_CANCEL ((UINT32)~0) diff --git a/src/emu/ui/viewgfx.c b/src/emu/ui/viewgfx.c index f1868c559af..08684111adb 100644 --- a/src/emu/ui/viewgfx.c +++ b/src/emu/ui/viewgfx.c @@ -780,10 +780,10 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state *state, static void gfxset_draw_item(running_machine &machine, gfx_element *gfx, int index, bitmap_rgb32 &bitmap, int dstx, int dsty, int color, int rotate) { - static const pen_t default_palette[] = + static const rgb_t default_palette[] = { - MAKE_RGB(0,0,0), MAKE_RGB(0,0,255), MAKE_RGB(0,255,0), MAKE_RGB(0,255,255), - MAKE_RGB(255,0,0), MAKE_RGB(255,0,255), MAKE_RGB(255,255,0), MAKE_RGB(255,255,255) + rgb_t(0,0,0), rgb_t(0,0,255), rgb_t(0,255,0), rgb_t(0,255,255), + rgb_t(255,0,0), rgb_t(255,0,255), rgb_t(255,255,0), rgb_t(255,255,255) }; int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height() : gfx->width(); int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width() : gfx->height(); |