diff options
author | Nicola Salmoria <nicola@mamedev.org> | 2008-04-01 16:01:34 +0000 |
---|---|---|
committer | Nicola Salmoria <nicola@mamedev.org> | 2008-04-01 16:01:34 +0000 |
commit | a284b2fd9ec32d58ed6cb1f780a9876444661cd2 (patch) | |
tree | 40d01b9dbc066aa99e39fd7fc2676675f77b7028 | |
parent | d91c34cf31533526b1d9450709e3c801bf9d0c20 (diff) |
fix tilemap viewer to draw the whole tilemap when categories are used
-rw-r--r-- | src/emu/tilemap.c | 9 | ||||
-rw-r--r-- | src/emu/tilemap.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c index 5f18ae59da2..5f0f1fbd1b1 100644 --- a/src/emu/tilemap.c +++ b/src/emu/tilemap.c @@ -943,7 +943,7 @@ void tilemap_draw_by_index(bitmap_t *dest, int number, UINT32 scrollx, UINT32 sc int xpos,ypos; /* set up for the blit, using hard-coded parameters (no priority, etc) */ - configure_blit_parameters(&blit, tmap, dest, NULL, TILEMAP_DRAW_OPAQUE, 0, 0xff); + configure_blit_parameters(&blit, tmap, dest, NULL, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0, 0xff); /* compute the effective scroll positions */ scrollx = tmap->width - scrollx % tmap->width; @@ -1498,6 +1498,13 @@ static void configure_blit_parameters(blit_parameters *blit, tilemap *tmap, bitm blit->mask &= ~(TILEMAP_PIXEL_LAYER0 | TILEMAP_PIXEL_LAYER1 | TILEMAP_PIXEL_LAYER2); blit->value &= ~(TILEMAP_PIXEL_LAYER0 | TILEMAP_PIXEL_LAYER1 | TILEMAP_PIXEL_LAYER2); } + + /* don't check category if requested */ + if (flags & TILEMAP_DRAW_ALL_CATEGORIES) + { + blit->mask &= ~TILEMAP_PIXEL_CATEGORY_MASK; + blit->value &= ~TILEMAP_PIXEL_CATEGORY_MASK; + } } diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h index e71ef224bd2..76f19e801a3 100644 --- a/src/emu/tilemap.h +++ b/src/emu/tilemap.h @@ -321,6 +321,7 @@ #define TILEMAP_DRAW_LAYER2 0x40 /* draw layer 2 */ #define TILEMAP_DRAW_OPAQUE 0x80 /* draw everything, even transparent stuff */ #define TILEMAP_DRAW_ALPHA 0x100 /* draw with alpha blending */ +#define TILEMAP_DRAW_ALL_CATEGORIES 0x200 /* draw all categories */ /* per-pixel flags in the transparency_bitmap */ |