From 2e97ff9c213478726d9cb4e6763e140eda4705a9 Mon Sep 17 00:00:00 2001 From: Nicola Salmoria Date: Wed, 19 Nov 2008 09:14:29 +0000 Subject: [PATCH] 02641: strider and clones: Problem with graphics layer --- src/emu/drawgfx.h | 2 -- src/mame/video/cps1.c | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h index 936a1bde7d5..e9fa5fe9943 100644 --- a/src/emu/drawgfx.h +++ b/src/emu/drawgfx.h @@ -44,8 +44,6 @@ This special mode can be used to save memory in games that require several different handlings of the same ROM data (e.g. metro.c can use both 4bpp and 8bpp tiles, and both 8x8 and 16x16; cps.c has 8x8, 16x16 and 32x32 tiles all fetched from the same ROMs). - Note, however, that performance will suffer in rotated games, since the gfx data will - not be prerotated and will rely on GFX_SWAPXY. */ enum diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index 626c812da52..b56806f5cb9 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -1945,6 +1945,7 @@ static TILEMAP_MAPPER( tilemap2_scan ) return (row & 0x07) + ((col & 0x3f) << 3) + ((row & 0x38) << 6); } +static UINT8 empty_tile8x8[8*8]; static UINT8 empty_tile[32*32/2]; static TILE_GET_INFO( get_tile0_info ) @@ -1970,7 +1971,7 @@ static TILE_GET_INFO( get_tile0_info ) // for out of range tiles, switch to fully transparent data // (but still call SET_TILE_INFO, otherwise problems might occur on boot e.g. unsquad) if (code == -1) - tileinfo->pen_data = empty_tile; + tileinfo->pen_data = empty_tile8x8; } static TILE_GET_INFO( get_tile1_info ) @@ -2046,7 +2047,8 @@ static VIDEO_START( cps ) /* front masks will change at runtime to handle sprite occluding */ cps1_update_transmasks(); - memset(empty_tile,0xff,sizeof(empty_tile)); + memset(empty_tile8x8,0x0f,sizeof(empty_tile8x8)); + memset(empty_tile,0xff,sizeof(empty_tile)); // 16x16 and 32x32 use packed graphics, 8x8 does not for (i = 0;i < cps1_palette_entries*16;i++) {