trunk/src/mame/video/vaportra.c
| r32566 | r32567 | |
| 64 | 64 | { |
| 65 | 65 | m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
| 66 | 66 | m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); |
| 67 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 67 | m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 68 | 68 | m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); |
| 69 | 69 | } |
| 70 | 70 | else if (pri == 1) |
| 71 | 71 | { |
| 72 | 72 | m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
| 73 | 73 | m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); |
| 74 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 74 | m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 75 | 75 | m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); |
| 76 | 76 | } |
| 77 | 77 | else if (pri == 2) |
| 78 | 78 | { |
| 79 | 79 | m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
| 80 | 80 | m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); |
| 81 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 81 | m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 82 | 82 | m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); |
| 83 | 83 | } |
| 84 | 84 | else |
| 85 | 85 | { |
| 86 | 86 | m_deco_tilegen2->tilemap_1_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
| 87 | 87 | m_deco_tilegen1->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); |
| 88 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 88 | m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 0, m_priority[1], 0x0f); |
| 89 | 89 | m_deco_tilegen2->tilemap_2_draw(screen, bitmap, cliprect, 0, 0); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_spriteram->buffer(), 1, m_priority[1], 0x0f); |
| 92 | m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), 1, m_priority[1], 0x0f); |
| 93 | 93 | m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0); |
| 94 | 94 | return 0; |
| 95 | 95 | } |
trunk/src/mame/video/k054156_k054157_k056832.c
| r32566 | r32567 | |
| 245 | 245 | downcast<k056832_device &>(device).m_palette.set_tag(tag); |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | | void k056832_device::create_tilemaps(running_machine &machine) |
| 248 | void k056832_device::create_tilemaps() |
| 249 | 249 | { |
| 250 | 250 | tilemap_t *tmap; |
| 251 | 251 | int i; |
| r32566 | r32567 | |
| 280 | 280 | |
| 281 | 281 | |
| 282 | 282 | |
| 283 | | m_videoram = auto_alloc_array_clear(machine, UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2); |
| 283 | m_videoram = auto_alloc_array_clear(machine(), UINT16, 0x2000 * (K056832_PAGE_COUNT + 1) / 2); |
| 284 | 284 | |
| 285 | | m_tilemap[0x0] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 286 | | m_tilemap[0x1] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 287 | | m_tilemap[0x2] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 288 | | m_tilemap[0x3] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 289 | | m_tilemap[0x4] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 290 | | m_tilemap[0x5] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 291 | | m_tilemap[0x6] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 292 | | m_tilemap[0x7] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 293 | | m_tilemap[0x8] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 294 | | m_tilemap[0x9] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 295 | | m_tilemap[0xa] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 296 | | m_tilemap[0xb] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 297 | | m_tilemap[0xc] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 298 | | m_tilemap[0xd] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 299 | | m_tilemap[0xe] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 300 | | m_tilemap[0xf] = &machine.tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 285 | m_tilemap[0x0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info0),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 286 | m_tilemap[0x1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info1),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 287 | m_tilemap[0x2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info2),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 288 | m_tilemap[0x3] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info3),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 289 | m_tilemap[0x4] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info4),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 290 | m_tilemap[0x5] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info5),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 291 | m_tilemap[0x6] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info6),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 292 | m_tilemap[0x7] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info7),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 293 | m_tilemap[0x8] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info8),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 294 | m_tilemap[0x9] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_info9),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 295 | m_tilemap[0xa] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoa),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 296 | m_tilemap[0xb] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infob),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 297 | m_tilemap[0xc] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoc),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 298 | m_tilemap[0xd] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infod),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 299 | m_tilemap[0xe] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infoe),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 300 | m_tilemap[0xf] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k056832_device::get_tile_infof),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); |
| 301 | 301 | |
| 302 | 302 | for (i = 0; i < K056832_PAGE_COUNT; i++) |
| 303 | 303 | { |
| r32566 | r32567 | |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | |
| 313 | | void k056832_device::finalize_init(running_machine &machine) |
| 313 | void k056832_device::finalize_init() |
| 314 | 314 | { |
| 315 | 315 | int i; |
| 316 | 316 | |
| r32566 | r32567 | |
| 354 | 354 | save_item(NAME(m_last_colorbase[i]), i); |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | | machine.save().register_postload(save_prepost_delegate(FUNC(k056832_device::postload), this)); |
| 357 | machine().save().register_postload(save_prepost_delegate(FUNC(k056832_device::postload), this)); |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | |
| r32566 | r32567 | |
| 372 | 372 | /* TODO: understand which elements MUST be init here (to keep correct layer |
| 373 | 373 | associations) and which ones can can be init at RESET, if any */ |
| 374 | 374 | |
| 375 | | create_gfx(machine(), m_gfx_memory_region, m_bpp, m_big); |
| 375 | create_gfx(m_gfx_memory_region, m_bpp, m_big); |
| 376 | 376 | |
| 377 | | create_tilemaps(machine()); |
| 377 | create_tilemaps(); |
| 378 | 378 | |
| 379 | | finalize_init(machine()); |
| 379 | finalize_init(); |
| 380 | 380 | |
| 381 | 381 | // bind callbacks |
| 382 | 382 | m_k056832_cb.bind_relative_to(*owner()); |
| r32566 | r32567 | |
| 2019 | 2019 | /***************************************************************************/ |
| 2020 | 2020 | |
| 2021 | 2021 | |
| 2022 | | void k056832_device::create_gfx(running_machine &machine, const char *gfx_memory_region, int bpp, int big) |
| 2022 | void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big) |
| 2023 | 2023 | { |
| 2024 | 2024 | int gfx_index; |
| 2025 | 2025 | int i; |
| r32566 | r32567 | |
| 2112 | 2112 | switch (bpp) |
| 2113 | 2113 | { |
| 2114 | 2114 | case K056832_BPP_4: |
| 2115 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*4); |
| 2116 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4); |
| 2115 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4); |
| 2116 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4, 4); |
| 2117 | 2117 | break; |
| 2118 | 2118 | |
| 2119 | 2119 | case K056832_BPP_5: |
| 2120 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*5); |
| 2121 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5); |
| 2120 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*5); |
| 2121 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout5, 5); |
| 2122 | 2122 | break; |
| 2123 | 2123 | |
| 2124 | 2124 | case K056832_BPP_6: |
| 2125 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*6); |
| 2126 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6); |
| 2125 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*6); |
| 2126 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout6, 6); |
| 2127 | 2127 | break; |
| 2128 | 2128 | |
| 2129 | 2129 | case K056832_BPP_8: |
| 2130 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*8); |
| 2131 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8); |
| 2130 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8); |
| 2131 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8, 8); |
| 2132 | 2132 | break; |
| 2133 | 2133 | |
| 2134 | 2134 | case K056832_BPP_8LE: |
| 2135 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*8); |
| 2136 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8); |
| 2135 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8); |
| 2136 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8le, 8); |
| 2137 | 2137 | break; |
| 2138 | 2138 | |
| 2139 | 2139 | case K056832_BPP_8TASMAN: |
| 2140 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*8); |
| 2141 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout8_tasman, 8); |
| 2140 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*8); |
| 2141 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout8_tasman, 8); |
| 2142 | 2142 | break; |
| 2143 | 2143 | |
| 2144 | 2144 | case K056832_BPP_4dj: |
| 2145 | | total = machine.root_device().memregion(gfx_memory_region)->bytes() / (i*4); |
| 2146 | | konami_decode_gfx(machine, m_gfxdecode, m_palette, gfx_index, machine.root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4); |
| 2145 | total = machine().root_device().memregion(gfx_memory_region)->bytes() / (i*4); |
| 2146 | konami_decode_gfx(machine(), m_gfxdecode, m_palette, gfx_index, machine().root_device().memregion(gfx_memory_region)->base(), total, &charlayout4dj, 4); |
| 2147 | 2147 | break; |
| 2148 | 2148 | |
| 2149 | 2149 | default: |
| r32566 | r32567 | |
| 2155 | 2155 | m_gfx_memory_region = gfx_memory_region; |
| 2156 | 2156 | m_gfx_num = gfx_index; |
| 2157 | 2157 | |
| 2158 | | m_rombase = machine.root_device().memregion(gfx_memory_region)->base(); |
| 2159 | | m_num_gfx_banks = machine.root_device().memregion(gfx_memory_region)->bytes() / 0x2000; |
| 2158 | m_rombase = machine().root_device().memregion(gfx_memory_region)->base(); |
| 2159 | m_num_gfx_banks = machine().root_device().memregion(gfx_memory_region)->bytes() / 0x2000; |
| 2160 | 2160 | m_cur_gfx_banks = 0; |
| 2161 | 2161 | m_use_ext_linescroll = 0; |
| 2162 | 2162 | m_uses_tile_banks = 0; |
trunk/src/mame/video/thepit.c
| r32566 | r32567 | |
| 226 | 226 | * |
| 227 | 227 | *************************************/ |
| 228 | 228 | |
| 229 | | static void draw_sprites(running_machine &machine, |
| 230 | | bitmap_ind16 &bitmap, |
| 231 | | const rectangle &cliprect, |
| 232 | | int priority_to_draw) |
| 229 | void thepit_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority_to_draw) |
| 233 | 230 | { |
| 234 | | thepit_state *state = machine.driver_data<thepit_state>(); |
| 235 | | int offs; |
| 236 | | |
| 237 | | for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 231 | for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4) |
| 238 | 232 | { |
| 239 | | if (((state->m_spriteram[offs + 2] & 0x08) >> 3) == priority_to_draw) |
| 233 | if (((m_spriteram[offs + 2] & 0x08) >> 3) == priority_to_draw) |
| 240 | 234 | { |
| 241 | 235 | UINT8 y, x, flipx, flipy; |
| 242 | 236 | |
| 243 | | if ((state->m_spriteram[offs + 0] == 0) || (state->m_spriteram[offs + 3] == 0)) |
| 237 | if ((m_spriteram[offs + 0] == 0) || (m_spriteram[offs + 3] == 0)) |
| 244 | 238 | { |
| 245 | 239 | continue; |
| 246 | 240 | } |
| 247 | 241 | |
| 248 | | y = 240 - state->m_spriteram[offs]; |
| 249 | | x = state->m_spriteram[offs + 3] + 1; |
| 242 | y = 240 - m_spriteram[offs]; |
| 243 | x = m_spriteram[offs + 3] + 1; |
| 250 | 244 | |
| 251 | | flipx = state->m_spriteram[offs + 1] & 0x40; |
| 252 | | flipy = state->m_spriteram[offs + 1] & 0x80; |
| 245 | flipx = m_spriteram[offs + 1] & 0x40; |
| 246 | flipy = m_spriteram[offs + 1] & 0x80; |
| 253 | 247 | |
| 254 | | if (state->m_flip_screen_y) |
| 248 | if (m_flip_screen_y) |
| 255 | 249 | { |
| 256 | 250 | y = 240 - y; |
| 257 | 251 | flipy = !flipy; |
| 258 | 252 | } |
| 259 | 253 | |
| 260 | | if (state->m_flip_screen_x) |
| 254 | if (m_flip_screen_x) |
| 261 | 255 | { |
| 262 | 256 | x = 242 - x; |
| 263 | 257 | flipx = !flipx; |
| r32566 | r32567 | |
| 267 | 261 | if (offs < 16) y++; |
| 268 | 262 | |
| 269 | 263 | |
| 270 | | state->m_gfxdecode->gfx(2 * state->m_graphics_bank + 1)->transpen(bitmap,cliprect, |
| 271 | | state->m_spriteram[offs + 1] & 0x3f, |
| 272 | | state->m_spriteram[offs + 2], |
| 264 | m_gfxdecode->gfx(2 * m_graphics_bank + 1)->transpen(bitmap,cliprect, |
| 265 | m_spriteram[offs + 1] & 0x3f, |
| 266 | m_spriteram[offs + 2], |
| 273 | 267 | flipx, flipy, x, y, 0); |
| 274 | 268 | |
| 275 | 269 | |
| 276 | | state->m_gfxdecode->gfx(2 * state->m_graphics_bank + 1)->transpen(bitmap,cliprect, |
| 277 | | state->m_spriteram[offs + 1] & 0x3f, |
| 278 | | state->m_spriteram[offs + 2], |
| 270 | m_gfxdecode->gfx(2 * m_graphics_bank + 1)->transpen(bitmap,cliprect, |
| 271 | m_spriteram[offs + 1] & 0x3f, |
| 272 | m_spriteram[offs + 2], |
| 279 | 273 | flipx, flipy, x-256, y, 0); |
| 280 | 274 | |
| 281 | 275 | } |
| r32566 | r32567 | |
| 307 | 301 | m_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 308 | 302 | |
| 309 | 303 | /* low priority sprites */ |
| 310 | | draw_sprites(machine(), bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 0); |
| 304 | draw_sprites(bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 0); |
| 311 | 305 | |
| 312 | 306 | /* high priority tiles */ |
| 313 | 307 | m_solid_tilemap->draw(screen, bitmap, cliprect, 1, 1); |
| 314 | 308 | |
| 315 | 309 | /* high priority sprites */ |
| 316 | | draw_sprites(machine(), bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 1); |
| 310 | draw_sprites(bitmap, m_flip_screen_x ? spritevisibleareaflipx : spritevisiblearea, 1); |
| 317 | 311 | |
| 318 | 312 | return 0; |
| 319 | 313 | } |
| r32566 | r32567 | |
| 343 | 337 | |
| 344 | 338 | /* low priority sprites */ |
| 345 | 339 | m_graphics_bank = 1; |
| 346 | | draw_sprites(machine(), bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 0); |
| 340 | draw_sprites(bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 0); |
| 347 | 341 | |
| 348 | 342 | /* high priority tiles */ // not sure about this, draws a white block over the title logo sprite, looks like it should be behind? |
| 349 | 343 | m_graphics_bank = 0; |
| r32566 | r32567 | |
| 351 | 345 | |
| 352 | 346 | /* high priority sprites */ |
| 353 | 347 | m_graphics_bank = 1; |
| 354 | | draw_sprites(machine(), bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 1); |
| 348 | draw_sprites(bitmap, m_flip_screen_y ? spritevisibleareaflipx : spritevisiblearea, 1); |
| 355 | 349 | |
| 356 | 350 | return 0; |
| 357 | 351 | } |
trunk/src/mame/video/kaneko_spr.c
| r32566 | r32567 | |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | |
| 188 | | int kaneko16_sprite_device::kaneko16_parse_sprite_type012(running_machine &machine, int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes) |
| 188 | int kaneko16_sprite_device::kaneko16_parse_sprite_type012(int i, struct tempsprite *s, UINT16* spriteram16, int spriteram16_bytes) |
| 189 | 189 | { |
| 190 | 190 | int attr, xoffs, offs; |
| 191 | 191 | |
| r32566 | r32567 | |
| 336 | 336 | |
| 337 | 337 | /* Build a list of sprites to display & draw them */ |
| 338 | 338 | template<class _BitmapClass> |
| 339 | | void kaneko16_sprite_device::kaneko16_draw_sprites(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) |
| 339 | void kaneko16_sprite_device::kaneko16_draw_sprites(_BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) |
| 340 | 340 | { |
| 341 | 341 | /* Sprites *must* be parsed from the first in RAM to the last, |
| 342 | 342 | because of the multisprite feature. But they *must* be drawn |
| r32566 | r32567 | |
| 367 | 367 | { |
| 368 | 368 | int flags; |
| 369 | 369 | |
| 370 | | flags = kaneko16_parse_sprite_type012(machine, i,s, spriteram16, spriteram16_bytes); |
| 370 | flags = kaneko16_parse_sprite_type012(i,s, spriteram16, spriteram16_bytes); |
| 371 | 371 | |
| 372 | 372 | if (flags == -1) // End of Sprites |
| 373 | 373 | break; |
| r32566 | r32567 | |
| 587 | 587 | |
| 588 | 588 | |
| 589 | 589 | |
| 590 | | void kaneko16_sprite_device::kaneko16_render_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(machine, bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); } |
| 591 | | void kaneko16_sprite_device::kaneko16_render_sprites(running_machine &machine, bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(machine, bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); } |
| 590 | void kaneko16_sprite_device::kaneko16_render_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); } |
| 591 | void kaneko16_sprite_device::kaneko16_render_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) { kaneko16_render_sprites_common(bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); } |
| 592 | 592 | |
| 593 | 593 | template<class _BitmapClass> |
| 594 | | void kaneko16_sprite_device::kaneko16_render_sprites_common(running_machine &machine, _BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) |
| 594 | void kaneko16_sprite_device::kaneko16_render_sprites_common(_BitmapClass &bitmap, const rectangle &cliprect, bitmap_ind8 &priority_bitmap, UINT16* spriteram16, int spriteram16_bytes) |
| 595 | 595 | { |
| 596 | 596 | /* Sprites last (rendered with pdrawgfx, so they can slip |
| 597 | 597 | in between the layers) */ |
| r32566 | r32567 | |
| 599 | 599 | if(m_keep_sprites) |
| 600 | 600 | { |
| 601 | 601 | /* keep sprites on screen - used by mgcrystl when you get the first gem and it shows instructions */ |
| 602 | | kaneko16_draw_sprites(machine,m_sprites_bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); |
| 602 | kaneko16_draw_sprites(m_sprites_bitmap, cliprect, priority_bitmap, spriteram16, spriteram16_bytes); |
| 603 | 603 | kaneko16_copybitmap(bitmap,cliprect); |
| 604 | 604 | } |
| 605 | 605 | else |
| 606 | 606 | { |
| 607 | 607 | m_sprites_bitmap.fill(0, cliprect); |
| 608 | | kaneko16_draw_sprites(machine,bitmap,cliprect, priority_bitmap, spriteram16, spriteram16_bytes); |
| 608 | kaneko16_draw_sprites(bitmap,cliprect, priority_bitmap, spriteram16, spriteram16_bytes); |
| 609 | 609 | } |
| 610 | 610 | } |
| 611 | 611 | |
trunk/src/mame/video/dec8.c
| r32566 | r32567 | |
| 261 | 261 | flip_screen_set(m_tilegen1->get_flip_state()); |
| 262 | 262 | |
| 263 | 263 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 264 | | m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03); |
| 264 | m_spritegen_mxc->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x00, 0x03); |
| 265 | 265 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 266 | | m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03); |
| 266 | m_spritegen_mxc->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x04, 0x04, 0x03); |
| 267 | 267 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 268 | 268 | return 0; |
| 269 | 269 | } |
| r32566 | r32567 | |
| 299 | 299 | UINT32 dec8_state::screen_update_ghostb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 300 | 300 | { |
| 301 | 301 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 302 | | m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 302 | m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 303 | 303 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 304 | 304 | return 0; |
| 305 | 305 | } |
| r32566 | r32567 | |
| 333 | 333 | |
| 334 | 334 | // we mimic the priority scheme in dec0.c, this was originally a bit different, so this could be wrong |
| 335 | 335 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 336 | | m_spritegen_mxc->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f); |
| 336 | m_spritegen_mxc->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x00, 0x00, 0x0f); |
| 337 | 337 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x08,0x08,0x08,0x08); |
| 338 | 338 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 339 | 339 | return 0; |
| r32566 | r32567 | |
| 369 | 369 | m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8)+ m_scroll2[3])); |
| 370 | 370 | |
| 371 | 371 | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 372 | | m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 372 | m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 373 | 373 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 374 | 374 | return 0; |
| 375 | 375 | } |
| r32566 | r32567 | |
| 382 | 382 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0, 0); |
| 383 | 383 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1, 0); |
| 384 | 384 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0, 0); |
| 385 | | m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 385 | m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 386 | 386 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1, 0); |
| 387 | 387 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 388 | 388 | return 0; |
| r32566 | r32567 | |
| 505 | 505 | m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8) + m_scroll2[3])); |
| 506 | 506 | |
| 507 | 507 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0); |
| 508 | | m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 2); |
| 508 | m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 2); |
| 509 | 509 | m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0); |
| 510 | | m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 1); |
| 510 | m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 1); |
| 511 | 511 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 512 | 512 | return 0; |
| 513 | 513 | } |
| r32566 | r32567 | |
| 518 | 518 | m_bg_tilemap->set_scrolly(0, ((m_scroll2[2] << 8) + m_scroll2[3])); |
| 519 | 519 | |
| 520 | 520 | m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 521 | | m_spritegen_krn->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 521 | m_spritegen_krn->draw_sprites(bitmap, cliprect, m_buffered_spriteram16, 0x400, 0); |
| 522 | 522 | m_bg_tilemap->draw(screen, bitmap, cliprect, 1, 0); |
| 523 | 523 | m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); |
| 524 | 524 | return 0; |
trunk/src/mame/video/carpolo.c
| r32566 | r32567 | |
| 165 | 165 | * |
| 166 | 166 | *************************************/ |
| 167 | 167 | |
| 168 | | static void draw_alpha_line(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, |
| 168 | void carpolo_state::draw_alpha_line(bitmap_ind16 &bitmap, const rectangle &cliprect, |
| 169 | 169 | int alpha_line, int video_line) |
| 170 | 170 | { |
| 171 | | carpolo_state *state = machine.driver_data<carpolo_state>(); |
| 172 | | int x; |
| 173 | | |
| 174 | | for (x = 0; x < 32; x++) |
| 171 | for (int x = 0; x < 32; x++) |
| 175 | 172 | { |
| 176 | 173 | UINT8 code, col; |
| 177 | 174 | |
| 178 | | code = state->m_alpharam[alpha_line * 32 + x] >> 2; |
| 179 | | col = state->m_alpharam[alpha_line * 32 + x] & 0x03; |
| 175 | code = m_alpharam[alpha_line * 32 + x] >> 2; |
| 176 | col = m_alpharam[alpha_line * 32 + x] & 0x03; |
| 180 | 177 | |
| 181 | | state->m_gfxdecode->gfx(2)->transpen(bitmap,cliprect, |
| 178 | m_gfxdecode->gfx(2)->transpen(bitmap,cliprect, |
| 182 | 179 | code,col, |
| 183 | 180 | 0,0, |
| 184 | 181 | x*8,video_line*8,0); |
| r32566 | r32567 | |
| 292 | 289 | and bit 3 of the vertical timing PROM controls in |
| 293 | 290 | which quadrant the line will actually appear */ |
| 294 | 291 | |
| 295 | | draw_alpha_line(machine(), bitmap, cliprect, 0, (0*4+0)*2 ); |
| 296 | | draw_alpha_line(machine(), bitmap, cliprect, 1, (0*4+0)*2+1); |
| 297 | | draw_alpha_line(machine(), bitmap, cliprect, 2, (3*4+1)*2 ); |
| 298 | | draw_alpha_line(machine(), bitmap, cliprect, 3, (3*4+1)*2+1); |
| 299 | | draw_alpha_line(machine(), bitmap, cliprect, 4, (1*4+2)*2 ); |
| 300 | | draw_alpha_line(machine(), bitmap, cliprect, 5, (1*4+2)*2+1); |
| 301 | | draw_alpha_line(machine(), bitmap, cliprect, 6, (0*4+3)*2 ); |
| 302 | | draw_alpha_line(machine(), bitmap, cliprect, 7, (0*4+3)*2+1); |
| 292 | draw_alpha_line(bitmap, cliprect, 0, (0*4+0)*2 ); |
| 293 | draw_alpha_line(bitmap, cliprect, 1, (0*4+0)*2+1); |
| 294 | draw_alpha_line(bitmap, cliprect, 2, (3*4+1)*2 ); |
| 295 | draw_alpha_line(bitmap, cliprect, 3, (3*4+1)*2+1); |
| 296 | draw_alpha_line(bitmap, cliprect, 4, (1*4+2)*2 ); |
| 297 | draw_alpha_line(bitmap, cliprect, 5, (1*4+2)*2+1); |
| 298 | draw_alpha_line(bitmap, cliprect, 6, (0*4+3)*2 ); |
| 299 | draw_alpha_line(bitmap, cliprect, 7, (0*4+3)*2+1); |
| 303 | 300 | |
| 304 | 301 | return 0; |
| 305 | 302 | } |
trunk/src/mame/video/dec0.c
| r32566 | r32567 | |
| 24 | 24 | flip_screen_set(m_tilegen1->get_flip_state()); |
| 25 | 25 | |
| 26 | 26 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 27 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x08, 0x0f); |
| 27 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, 0x08, 0x0f); |
| 28 | 28 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 29 | 29 | |
| 30 | 30 | /* HB always keeps pf2 on top of pf3, no need explicitly support priority register */ |
| 31 | 31 | |
| 32 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, 0x00, 0x0f); |
| 32 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, 0x00, 0x0f); |
| 33 | 33 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 34 | 34 | return 0; |
| 35 | 35 | } |
| r32566 | r32567 | |
| 49 | 49 | if (m_pri & 2) |
| 50 | 50 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */ |
| 51 | 51 | |
| 52 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 52 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 53 | 53 | |
| 54 | 54 | if (m_pri & 4) |
| 55 | 55 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */ |
| r32566 | r32567 | |
| 62 | 62 | if (m_pri & 2) |
| 63 | 63 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */ |
| 64 | 64 | |
| 65 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 65 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 66 | 66 | |
| 67 | 67 | if (m_pri & 4) |
| 68 | 68 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0,0x08,0x08,0x08,0x08); // upper 8 pens of upper 8 priority marked tiles /* Foreground pens only */ |
| r32566 | r32567 | |
| 94 | 94 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 95 | 95 | |
| 96 | 96 | if (m_pri & 0x02) |
| 97 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 97 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 98 | 98 | |
| 99 | 99 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 100 | 100 | } |
| r32566 | r32567 | |
| 103 | 103 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 104 | 104 | |
| 105 | 105 | if (m_pri & 0x02) |
| 106 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 106 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 107 | 107 | |
| 108 | 108 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | if (m_pri & 0x02) |
| 112 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f); |
| 112 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f); |
| 113 | 113 | else |
| 114 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 114 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 115 | 115 | |
| 116 | 116 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 117 | 117 | return 0; |
| r32566 | r32567 | |
| 164 | 164 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 165 | 165 | |
| 166 | 166 | if (m_pri & 0x02) |
| 167 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 167 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 168 | 168 | |
| 169 | 169 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 170 | 170 | } |
| r32566 | r32567 | |
| 173 | 173 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 174 | 174 | |
| 175 | 175 | if (m_pri & 0x02) |
| 176 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 176 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 177 | 177 | |
| 178 | 178 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | if (m_pri & 0x02) |
| 182 | | m_spritegen->draw_sprites_bootleg(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f); |
| 182 | m_spritegen->draw_sprites_bootleg(bitmap, cliprect, m_buffered_spriteram, 0x08, trans^0x08, 0x0f); |
| 183 | 183 | else |
| 184 | | m_spritegen->draw_sprites_bootleg(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 184 | m_spritegen->draw_sprites_bootleg(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 185 | 185 | |
| 186 | 186 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 187 | 187 | return 0; |
| r32566 | r32567 | |
| 223 | 223 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 224 | 224 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 225 | 225 | |
| 226 | | m_spritegen->draw_sprites_bootleg(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 226 | m_spritegen->draw_sprites_bootleg(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 227 | 227 | |
| 228 | 228 | /* Redraw top 8 pens of top 8 palettes over sprites */ |
| 229 | 229 | if (m_pri&0x80) |
| r32566 | r32567 | |
| 244 | 244 | the palette does show through. */ |
| 245 | 245 | bitmap.fill(m_palette->pen(768), cliprect); |
| 246 | 246 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 247 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 247 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 248 | 248 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 249 | 249 | return 0; |
| 250 | 250 | } |
| r32566 | r32567 | |
| 266 | 266 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 269 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 270 | 270 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 271 | 271 | return 0; |
| 272 | 272 | } |
| r32566 | r32567 | |
| 280 | 280 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 281 | 281 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 282 | 282 | |
| 283 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 283 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 284 | 284 | |
| 285 | 285 | /* Redraw top 8 pens of top 8 palettes over sprites */ |
| 286 | 286 | if (m_pri&0x80) |
| r32566 | r32567 | |
| 307 | 307 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 308 | 308 | |
| 309 | 309 | if (m_pri & 0x02) |
| 310 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 310 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 311 | 311 | |
| 312 | 312 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 313 | 313 | } |
| r32566 | r32567 | |
| 316 | 316 | m_tilegen3->deco_bac06_pf_draw(bitmap,cliprect,TILEMAP_DRAW_OPAQUE, 0x00, 0x00, 0x00, 0x00); |
| 317 | 317 | |
| 318 | 318 | if (m_pri & 0x02) |
| 319 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 319 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans, 0x0f); |
| 320 | 320 | |
| 321 | 321 | m_tilegen2->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | if (m_pri & 0x02) |
| 325 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x08, trans ^ 0x08, 0x0f); |
| 325 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x08, trans ^ 0x08, 0x0f); |
| 326 | 326 | else |
| 327 | | m_spritegen->draw_sprites(machine(), bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 327 | m_spritegen->draw_sprites(bitmap, cliprect, m_buffered_spriteram, 0x00, 0x00, 0x0f); |
| 328 | 328 | |
| 329 | 329 | m_tilegen1->deco_bac06_pf_draw(bitmap,cliprect,0, 0x00, 0x00, 0x00, 0x00); |
| 330 | 330 | return 0; |