summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/moo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/moo.c')
-rw-r--r--src/mame/video/moo.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/src/mame/video/moo.c b/src/mame/video/moo.c
index 459d61b2ca0..28e5a9e4f1a 100644
--- a/src/mame/video/moo.c
+++ b/src/mame/video/moo.c
@@ -62,25 +62,24 @@ VIDEO_START_MEMBER(moo_state,moo)
}
}
-SCREEN_UPDATE_RGB32(moo)
+UINT32 moo_state::screen_update_moo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- moo_state *state = screen.machine().driver_data<moo_state>();
static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
int layers[3];
int new_colorbase, plane, dirty, alpha;
- state->m_sprite_colorbase = k053251_get_palette_index(state->m_k053251, K053251_CI0);
- state->m_layer_colorbase[0] = 0x70;
+ m_sprite_colorbase = k053251_get_palette_index(m_k053251, K053251_CI0);
+ m_layer_colorbase[0] = 0x70;
- if (k056832_get_layer_association(state->m_k056832))
+ if (k056832_get_layer_association(m_k056832))
{
for (plane = 1; plane < 4; plane++)
{
- new_colorbase = k053251_get_palette_index(state->m_k053251, K053251_CI[plane]);
- if (state->m_layer_colorbase[plane] != new_colorbase)
+ new_colorbase = k053251_get_palette_index(m_k053251, K053251_CI[plane]);
+ if (m_layer_colorbase[plane] != new_colorbase)
{
- state->m_layer_colorbase[plane] = new_colorbase;
- k056832_mark_plane_dirty(state->m_k056832, plane);
+ m_layer_colorbase[plane] = new_colorbase;
+ k056832_mark_plane_dirty(m_k056832, plane);
}
}
}
@@ -88,47 +87,47 @@ SCREEN_UPDATE_RGB32(moo)
{
for (dirty = 0, plane = 1; plane < 4; plane++)
{
- new_colorbase = k053251_get_palette_index(state->m_k053251, K053251_CI[plane]);
- if (state->m_layer_colorbase[plane] != new_colorbase)
+ new_colorbase = k053251_get_palette_index(m_k053251, K053251_CI[plane]);
+ if (m_layer_colorbase[plane] != new_colorbase)
{
- state->m_layer_colorbase[plane] = new_colorbase;
+ m_layer_colorbase[plane] = new_colorbase;
dirty = 1;
}
}
if (dirty)
- k056832_mark_all_tmaps_dirty(state->m_k056832);
+ k056832_mark_all_tmaps_dirty(m_k056832);
}
layers[0] = 1;
- state->m_layerpri[0] = k053251_get_priority(state->m_k053251, K053251_CI2);
+ m_layerpri[0] = k053251_get_priority(m_k053251, K053251_CI2);
layers[1] = 2;
- state->m_layerpri[1] = k053251_get_priority(state->m_k053251, K053251_CI3);
+ m_layerpri[1] = k053251_get_priority(m_k053251, K053251_CI3);
layers[2] = 3;
- state->m_layerpri[2] = k053251_get_priority(state->m_k053251, K053251_CI4);
+ m_layerpri[2] = k053251_get_priority(m_k053251, K053251_CI4);
- konami_sortlayers3(layers, state->m_layerpri);
+ konami_sortlayers3(layers, m_layerpri);
- k054338_update_all_shadows(state->m_k054338, 0);
- k054338_fill_backcolor(state->m_k054338, bitmap, 0);
+ k054338_update_all_shadows(m_k054338, 0);
+ k054338_fill_backcolor(m_k054338, bitmap, 0);
screen.machine().priority_bitmap.fill(0, cliprect);
- if (state->m_layerpri[0] < k053251_get_priority(state->m_k053251, K053251_CI1)) /* bucky hides back layer behind background */
- k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layers[0], 0, 1);
+ if (m_layerpri[0] < k053251_get_priority(m_k053251, K053251_CI1)) /* bucky hides back layer behind background */
+ k056832_tilemap_draw(m_k056832, bitmap, cliprect, layers[0], 0, 1);
- k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layers[1], 0, 2);
+ k056832_tilemap_draw(m_k056832, bitmap, cliprect, layers[1], 0, 2);
// Enabling alpha improves fog and fading in Moo but causes other things to disappear.
// There is probably a control bit somewhere to turn off alpha blending.
- state->m_alpha_enabled = k054338_register_r(state->m_k054338, K338_REG_CONTROL) & K338_CTL_MIXPRI; // DUMMY
+ m_alpha_enabled = k054338_register_r(m_k054338, K338_REG_CONTROL) & K338_CTL_MIXPRI; // DUMMY
- alpha = (state->m_alpha_enabled) ? k054338_set_alpha_level(state->m_k054338, 1) : 255;
+ alpha = (m_alpha_enabled) ? k054338_set_alpha_level(m_k054338, 1) : 255;
if (alpha > 0)
- k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, layers[2], TILEMAP_DRAW_ALPHA(alpha), 4);
+ k056832_tilemap_draw(m_k056832, bitmap, cliprect, layers[2], TILEMAP_DRAW_ALPHA(alpha), 4);
- k053247_sprites_draw(state->m_k053246, bitmap, cliprect);
+ k053247_sprites_draw(m_k053246, bitmap, cliprect);
- k056832_tilemap_draw(state->m_k056832, bitmap, cliprect, 0, 0, 0);
+ k056832_tilemap_draw(m_k056832, bitmap, cliprect, 0, 0, 0);
return 0;
}