From 0731ac9bb68820656b276ef704ef5c761d75635c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Thu, 24 Mar 2011 03:16:03 +0000 Subject: [PATCH] scrap that, previous implementation makes much more sense, it just needed a small fix --- src/mame/video/mappy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mame/video/mappy.c b/src/mame/video/mappy.c index bf7c64c25f0..2e8369d0a21 100644 --- a/src/mame/video/mappy.c +++ b/src/mame/video/mappy.c @@ -553,15 +553,15 @@ SCREEN_UPDATE( superpac ) /* Redraw the high priority characters */ tilemap_draw(bitmap,cliprect,state->bg_tilemap,1,0); - /* some sprites still have priority over that (ghost eyes in Pac 'n Pal) */ + /* sprite color 0/1 still has priority over that (ghost eyes in Pac 'n Pal) */ for (y = 0;y < sprite_bitmap->height;y++) { for (x = 0;x < sprite_bitmap->width;x++) { - // bg colortable contents and sprite color bitmask suggests that priority is determined by pen 2 equality comparison between sprite colortable and bg colortable - int spr_pen = *BITMAP_ADDR16(sprite_bitmap, y, x); - if (spr_pen != 15 && spr_pen & 2 && colortable_palette_get_color(screen->machine->colortable,colortable_entry_get_value(screen->machine->colortable, spr_pen & 0x1fe)) == colortable_palette_get_color(screen->machine->colortable,colortable_entry_get_value(screen->machine->colortable, spr_pen & 0x0fe))) - *BITMAP_ADDR16(bitmap, y, x) = spr_pen; + int spr_entry = *BITMAP_ADDR16(sprite_bitmap, y, x); + int spr_pen = colortable_entry_get_value(screen->machine->colortable, spr_entry); + if (spr_pen == 0 || spr_pen == 1) + *BITMAP_ADDR16(bitmap, y, x) = spr_entry; } } return 0;