trunk/src/mame/video/spbactn.c
| r30576 | r30577 | |
| 76 | 76 | /* allocate bitmaps */ |
| 77 | 77 | m_screen->register_screen_bitmap(m_tile_bitmap_bg); |
| 78 | 78 | m_screen->register_screen_bitmap(m_tile_bitmap_fg); |
| 79 | m_screen->register_screen_bitmap(m_sprite_bitmap); |
| 79 | 80 | |
| 80 | 81 | m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(spbactn_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 64, 128); |
| 81 | 82 | m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(spbactn_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 64, 128); |
| r30576 | r30577 | |
| 149 | 150 | int spbactn_state::draw_video(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, bool alt_sprites) |
| 150 | 151 | { |
| 151 | 152 | m_tile_bitmap_fg.fill(0, cliprect); |
| 152 | | |
| 153 | m_sprite_bitmap.fill(0, cliprect); |
| 154 | |
| 155 | #if 1 |
| 153 | 156 | m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, TILEMAP_DRAW_OPAQUE, 0); |
| 154 | 157 | |
| 155 | 158 | |
| 156 | | if (m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 0, m_tile_bitmap_bg)) |
| 159 | if (m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 0, m_tile_bitmap_bg)) |
| 157 | 160 | { |
| 158 | 161 | m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, 0, 0); |
| 159 | 162 | } |
| 160 | 163 | |
| 161 | | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 1, m_tile_bitmap_bg); |
| 164 | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 1, m_tile_bitmap_bg); |
| 162 | 165 | |
| 163 | 166 | m_fg_tilemap->draw(screen, m_tile_bitmap_fg, cliprect, 0, 0); |
| 164 | 167 | |
| 165 | | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 2, m_tile_bitmap_fg); |
| 166 | | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), 3, m_tile_bitmap_fg); |
| 168 | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 2, m_tile_bitmap_fg); |
| 169 | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_sprite_bitmap, cliprect, m_spvideoram, 0, 0, flip_screen(), 3, m_tile_bitmap_fg); |
| 167 | 170 | |
| 168 | 171 | /* mix & blend the tilemaps and sprites into a 32-bit bitmap */ |
| 169 | 172 | blendbitmaps(m_palette, bitmap, m_tile_bitmap_bg, m_tile_bitmap_fg, cliprect); |
| 173 | #else |
| 174 | |
| 175 | m_sprgen->gaiden_draw_sprites(screen, m_gfxdecode, m_tile_bitmap_bg, m_tile_bitmap_fg, m_tile_bitmap_fg, cliprect, m_spvideoram, 0, 0, flip_screen(), -2, m_sprite_bitmap); |
| 176 | |
| 177 | #endif |
| 170 | 178 | return 0; |
| 171 | 179 | } |
| 172 | 180 | |