trunk/src/mame/video/toaplan1.c
r27514 | r27515 | |
148 | 148 | tile_number, |
149 | 149 | color, |
150 | 150 | 0); |
151 | | if (m_pf1_tilevram16[2*tile_index+1] & 0x8000) tileinfo.pen_data = m_empty_tile; |
152 | | tileinfo.category = (attrib & 0xf000) >> 12; |
| 151 | // "disabled" tiles are behind everything else |
| 152 | if (m_pf1_tilevram16[2*tile_index+1] & 0x8000) tileinfo.category = 16; |
| 153 | else tileinfo.category = (attrib & 0xf000) >> 12; |
153 | 154 | } |
154 | 155 | |
155 | 156 | TILE_GET_INFO_MEMBER(toaplan1_state::get_pf2_tile_info) |
r27514 | r27515 | |
164 | 165 | tile_number, |
165 | 166 | color, |
166 | 167 | 0); |
167 | | if (m_pf2_tilevram16[2*tile_index+1] & 0x8000) tileinfo.pen_data = m_empty_tile; |
168 | | tileinfo.category = (attrib & 0xf000) >> 12; |
| 168 | // "disabled" tiles are behind everything else |
| 169 | if (m_pf2_tilevram16[2*tile_index+1] & 0x8000) tileinfo.category = 16; |
| 170 | else tileinfo.category = (attrib & 0xf000) >> 12; |
169 | 171 | } |
170 | 172 | |
171 | 173 | TILE_GET_INFO_MEMBER(toaplan1_state::get_pf3_tile_info) |
r27514 | r27515 | |
180 | 182 | tile_number, |
181 | 183 | color, |
182 | 184 | 0); |
183 | | if (m_pf3_tilevram16[2*tile_index+1] & 0x8000) tileinfo.pen_data = m_empty_tile; |
184 | | tileinfo.category = (attrib & 0xf000) >> 12; |
| 185 | // "disabled" tiles are behind everything else |
| 186 | if (m_pf3_tilevram16[2*tile_index+1] & 0x8000) tileinfo.category = 16; |
| 187 | else tileinfo.category = (attrib & 0xf000) >> 12; |
185 | 188 | } |
186 | 189 | |
187 | 190 | TILE_GET_INFO_MEMBER(toaplan1_state::get_pf4_tile_info) |
r27514 | r27515 | |
196 | 199 | tile_number, |
197 | 200 | color, |
198 | 201 | 0); |
199 | | if (m_pf4_tilevram16[2*tile_index+1] & 0x8000) tileinfo.pen_data = m_empty_tile; |
200 | | tileinfo.category = (attrib & 0xf000) >> 12; |
| 202 | // "disabled" tiles are behind everything else |
| 203 | if (m_pf4_tilevram16[2*tile_index+1] & 0x8000) tileinfo.category = 16; |
| 204 | else tileinfo.category = (attrib & 0xf000) >> 12; |
201 | 205 | } |
202 | 206 | |
203 | 207 | /*************************************************************************** |
r27514 | r27515 | |
217 | 221 | m_pf2_tilemap->set_transparent_pen(0); |
218 | 222 | m_pf3_tilemap->set_transparent_pen(0); |
219 | 223 | m_pf4_tilemap->set_transparent_pen(0); |
220 | | |
221 | | m_pf1_tilemap->set_scrolldy(0, 0x100); m_pf1_tilemap->set_scrolldx(0, -0x28); |
222 | | m_pf2_tilemap->set_scrolldy(0, 0x100); m_pf2_tilemap->set_scrolldx(0, -0x28); |
223 | | m_pf3_tilemap->set_scrolldy(0, 0x100); m_pf3_tilemap->set_scrolldx(0, -0x28); |
224 | | m_pf4_tilemap->set_scrolldy(0, 0x100); m_pf4_tilemap->set_scrolldx(0, -0x28); |
225 | 224 | |
226 | 225 | memset(m_empty_tile, 0x00, sizeof(m_empty_tile)); |
227 | 226 | } |
r27514 | r27515 | |
1076 | 1075 | |
1077 | 1076 | toaplan1_log_vram(); |
1078 | 1077 | |
1079 | | bitmap.fill(0x120, cliprect); |
1080 | 1078 | m_spritegen->draw_sprites_to_tempbitmap(cliprect, m_buffered_spriteram, m_spriteram.bytes()); |
1081 | 1079 | |
| 1080 | // first draw everything, including "disabled" tiles and priority 0 |
| 1081 | m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0); |
1082 | 1082 | |
1083 | | m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE | 0, 0); |
1084 | | m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE | 1, 0); |
1085 | | |
| 1083 | // then draw the higher priority layers in order |
1086 | 1084 | for (priority = 1; priority < 16; priority++) |
1087 | 1085 | { |
1088 | 1086 | m_pf4_tilemap->draw(screen, bitmap, cliprect, priority, 0); |
r27514 | r27515 | |
1107 | 1105 | toaplan1_log_vram(); |
1108 | 1106 | |
1109 | 1107 | screen.priority().fill(0, cliprect); |
1110 | | bitmap.fill(0x120, cliprect); |
1111 | 1108 | |
1112 | | // it's really correct? |
1113 | | m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE | 0, 0); |
1114 | | m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE | 1, 0); |
| 1109 | // first draw everything, including "disabled" tiles and priority 0 |
| 1110 | m_pf1_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE | TILEMAP_DRAW_ALL_CATEGORIES, 0); |
1115 | 1111 | |
| 1112 | // then draw the higher priority layers in order |
1116 | 1113 | for (priority = 1; priority < 16; priority++) |
1117 | 1114 | { |
1118 | 1115 | m_pf4_tilemap->draw(screen, bitmap, cliprect, priority, priority, 0); |