summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2010-08-26 20:33:39 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2010-08-26 20:33:39 +0000
commitd5060616e8a17ff6fdd084958d81d134e6d024b8 (patch)
treec3e4ce174d94725f9f01ff015e4d7354dcf49e4c
parent2eb8a58559ca63f712b48d8cce1079e62ca721b8 (diff)
Haze: refactored some video stuff in toaplan 1, not worth
-rw-r--r--src/mame/includes/toaplan1.h3
-rw-r--r--src/mame/video/toaplan1.c19
2 files changed, 14 insertions, 8 deletions
diff --git a/src/mame/includes/toaplan1.h b/src/mame/includes/toaplan1.h
index a45d07eab08..2d08f3acfac 100644
--- a/src/mame/includes/toaplan1.h
+++ b/src/mame/includes/toaplan1.h
@@ -80,6 +80,9 @@ public:
int reset; /* Hack! See toaplan1_bcu_control below */
tilemap_t *pf1_tilemap, *pf2_tilemap, *pf3_tilemap, *pf4_tilemap;
+
+ // an empty tile, so that we can safely disable tiles
+ UINT8 empty_tile[8*8];
};
diff --git a/src/mame/video/toaplan1.c b/src/mame/video/toaplan1.c
index b9a360a9364..0550ad324a6 100644
--- a/src/mame/video/toaplan1.c
+++ b/src/mame/video/toaplan1.c
@@ -149,8 +149,8 @@ static TILE_GET_INFO( get_pf1_tile_info )
tile_number,
color,
0);
- if (state->pf1_tilevram16[2*tile_index+1] & 0x8000) tileinfo->category = 0;
- else tileinfo->category = (attrib & 0xf000) >> 12;
+ if (state->pf1_tilevram16[2*tile_index+1] & 0x8000) tileinfo->pen_data = state->empty_tile;
+ tileinfo->category = (attrib & 0xf000) >> 12;
}
static TILE_GET_INFO( get_pf2_tile_info )
@@ -166,8 +166,8 @@ static TILE_GET_INFO( get_pf2_tile_info )
tile_number,
color,
0);
- if (state->pf2_tilevram16[2*tile_index+1] & 0x8000) tileinfo->category = 0;
- else tileinfo->category = (attrib & 0xf000) >> 12;
+ if (state->pf2_tilevram16[2*tile_index+1] & 0x8000) tileinfo->pen_data = state->empty_tile;
+ tileinfo->category = (attrib & 0xf000) >> 12;
}
static TILE_GET_INFO( get_pf3_tile_info )
@@ -183,8 +183,8 @@ static TILE_GET_INFO( get_pf3_tile_info )
tile_number,
color,
0);
- if (state->pf3_tilevram16[2*tile_index+1] & 0x8000) tileinfo->category = 0;
- else tileinfo->category = (attrib & 0xf000) >> 12;
+ if (state->pf3_tilevram16[2*tile_index+1] & 0x8000) tileinfo->pen_data = state->empty_tile;
+ tileinfo->category = (attrib & 0xf000) >> 12;
}
static TILE_GET_INFO( get_pf4_tile_info )
@@ -200,8 +200,8 @@ static TILE_GET_INFO( get_pf4_tile_info )
tile_number,
color,
0);
- if (state->pf4_tilevram16[2*tile_index+1] & 0x8000) tileinfo->category = 0;
- else tileinfo->category = (attrib & 0xf000) >> 12;
+ if (state->pf4_tilevram16[2*tile_index+1] & 0x8000) tileinfo->pen_data = state->empty_tile;
+ tileinfo->category = (attrib & 0xf000) >> 12;
}
/***************************************************************************
@@ -223,6 +223,9 @@ static void toaplan1_create_tilemaps(running_machine *machine)
tilemap_set_transparent_pen(state->pf2_tilemap, 0);
tilemap_set_transparent_pen(state->pf3_tilemap, 0);
tilemap_set_transparent_pen(state->pf4_tilemap, 0);
+
+
+ memset(state->empty_tile, 0x00, sizeof(state->empty_tile));
}