diff options
Diffstat (limited to 'src/mame/video/hng64.c')
-rw-r--r-- | src/mame/video/hng64.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index a24bc0967fb..35ae71fa1ea 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -253,8 +253,8 @@ static void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rect if (!chaini) { - if (!blend) gfx->prio_zoom_transpen(bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); - else gfx->prio_zoom_transpen_additive(bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); + if (!blend) gfx->prio_zoom_transpen(state->m_palette,bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); + else gfx->prio_zoom_transpen_additive(state->m_palette,bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); tileno++; } else // inline chain mode, used by ss64 @@ -273,8 +273,8 @@ static void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rect pal&=0xf; } - if (!blend) gfx->prio_zoom_transpen(bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); - else gfx->prio_zoom_transpen_additive(bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); + if (!blend) gfx->prio_zoom_transpen(state->m_palette,bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); + else gfx->prio_zoom_transpen_additive(state->m_palette,bitmap,cliprect,tileno,pal,xflip,yflip,drawx,drawy,zoomx,zoomy/*0x10000*/,screen.priority(), 0,0); source +=8; } @@ -676,7 +676,8 @@ do { static void hng64_tilemap_draw_roz_core(screen_device &screen, tilemap_t *tmap, const blit_parameters *blit, UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, int wraparound) { - const pen_t *clut = &screen.machine().pens[blit->tilemap_priority_code >> 16]; + hng64_state *state = screen.machine().driver_data<hng64_state>(); + const pen_t *clut = &state->m_palette->pen(blit->tilemap_priority_code >> 16); bitmap_ind8 &priority_bitmap = screen.priority(); bitmap_rgb32 &destbitmap = *blit->bitmap; bitmap_ind16 &srcbitmap = tmap->pixmap(); @@ -1125,7 +1126,7 @@ static void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const bitmap_ind16 &bm = tilemap->pixmap(); int bmheight = bm.height(); int bmwidth = bm.width(); - const pen_t *paldata = screen.machine().pens; + const pen_t *paldata = state->m_palette->pens(); UINT32* dstptr; UINT16* srcptr; int xx,yy; @@ -1221,7 +1222,7 @@ static void hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap, const bitmap_ind16 &bm = tilemap->pixmap(); int bmheight = bm.height(); int bmwidth = bm.width(); - const pen_t *paldata = screen.machine().pens; + const pen_t *paldata = state->m_palette->pens(); UINT32* dstptr; UINT16* srcptr; int xx,yy; @@ -1347,7 +1348,7 @@ UINT32 hng64_state::screen_update_hng64(screen_device &screen, bitmap_rgb32 &bit } #endif - bitmap.fill(hng64_tcram[0x50/4] & 0x10000 ? get_black_pen(screen.machine()) : screen.machine().pens[0], cliprect); //FIXME: Is the register correct? check with HW tests + bitmap.fill(hng64_tcram[0x50/4] & 0x10000 ? m_palette->black_pen() : m_palette->pen(0), cliprect); //FIXME: Is the register correct? check with HW tests screen.priority().fill(0x00, cliprect); if (m_screen_dis) @@ -2971,7 +2972,7 @@ INLINE void FillSmoothTexPCHorizontalLine(running_machine &machine, { // The color out of the texture paletteEntry %= prOptions.palPageSize; - rgb_t color = machine.pens[prOptions.palOffset + paletteEntry]; + rgb_t color = state->m_palette->pen(prOptions.palOffset + paletteEntry); // Apply the lighting float rIntensity = (r_start/w_start) / 255.0f; |