diff options
author | 2010-06-28 06:40:44 +0000 | |
---|---|---|
committer | 2010-06-28 06:40:44 +0000 | |
commit | 41b9dbb9ace490ee8ab0bd87d35a50e9b693d538 (patch) | |
tree | 945b176affb6ad7958b2016777241736ff6f294d /src/emu/uigfx.c | |
parent | f9a3aaf5c82bae95ba12b517beaf3fe5d4d1a93a (diff) |
Made the machine_config a proper object. Added detokenize method to
this object which can be called multiple times to append new devices
after the initial machine configuration is set up. Updated member
variables to match new naming convention.
Changed the running_machine to take a constructed machine_config
object in the constructor, instead of creating one itself, for
consistency. Also added machine->total_colors() as a shortcut to
machine->config->m_total_colors.
Diffstat (limited to 'src/emu/uigfx.c')
-rw-r--r-- | src/emu/uigfx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/uigfx.c b/src/emu/uigfx.c index bbaeb48f3f6..cb3536a4899 100644 --- a/src/emu/uigfx.c +++ b/src/emu/uigfx.c @@ -155,7 +155,7 @@ UINT32 ui_gfx_ui_handler(running_machine *machine, render_container *container, ui_gfx_state *state = &ui_gfx; /* if we have nothing, implicitly cancel */ - if (machine->config->total_colors == 0 && machine->colortable == NULL && machine->gfx[0] == NULL && tilemap_count(machine) == 0) + if (machine->total_colors() == 0 && machine->colortable == NULL && machine->gfx[0] == NULL && tilemap_count(machine) == 0) goto cancel; /* if we're not paused, mark the bitmap dirty */ @@ -168,7 +168,7 @@ again: { case 0: /* if we have a palette, display it */ - if (machine->config->total_colors > 0) + if (machine->total_colors() > 0) { palette_handler(machine, container, state); break; @@ -235,7 +235,7 @@ cancel: static void palette_handler(running_machine *machine, render_container *container, ui_gfx_state *state) { - int total = state->palette.which ? colortable_palette_get_size(machine->colortable) : machine->config->total_colors; + int total = state->palette.which ? colortable_palette_get_size(machine->colortable) : machine->total_colors(); const char *title = state->palette.which ? "COLORTABLE" : "PALETTE"; const rgb_t *raw_color = palette_entry_list_raw(machine->palette); render_font *ui_font = ui_get_font(); @@ -383,7 +383,7 @@ static void palette_handle_keys(running_machine *machine, ui_gfx_state *state) state->palette.which = (int)(machine->colortable != NULL); /* cache some info in locals */ - total = state->palette.which ? colortable_palette_get_size(machine->colortable) : machine->config->total_colors; + total = state->palette.which ? colortable_palette_get_size(machine->colortable) : machine->total_colors(); /* determine number of entries per row and total */ rowcount = state->palette.count; @@ -769,7 +769,7 @@ static void gfxset_draw_item(running_machine *machine, const gfx_element *gfx, i }; int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height : gfx->width; int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width : gfx->height; - const rgb_t *palette = (machine->config->total_colors != 0) ? palette_entry_list_raw(machine->palette) : NULL; + const rgb_t *palette = (machine->total_colors() != 0) ? palette_entry_list_raw(machine->palette) : NULL; UINT32 rowpixels = bitmap->rowpixels; UINT32 palette_mask = ~0; int x, y; |