Previous 199869 Revisions Next

r30577 Tuesday 20th May, 2014 at 22:36:50 UTC by David Haywood
prepare for alt rendering (nw)
[src/mame/includes]spbactn.h
[src/mame/video]spbactn.c tecmo_spr.c

trunk/src/mame/includes/spbactn.h
r30576r30577
4242
4343   bitmap_ind16 m_tile_bitmap_bg;
4444   bitmap_ind16 m_tile_bitmap_fg;
45   bitmap_ind16 m_sprite_bitmap;
4546
4647
4748   DECLARE_WRITE16_MEMBER(soundcommand_w);
trunk/src/mame/video/spbactn.c
r30576r30577
7676   /* allocate bitmaps */
7777   m_screen->register_screen_bitmap(m_tile_bitmap_bg);
7878   m_screen->register_screen_bitmap(m_tile_bitmap_fg);
79   m_screen->register_screen_bitmap(m_sprite_bitmap);
7980
8081   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);
8182   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);
r30576r30577
149150int spbactn_state::draw_video(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, bool alt_sprites)
150151{
151152   m_tile_bitmap_fg.fill(0, cliprect);
152
153   m_sprite_bitmap.fill(0, cliprect);
154   
155#if 1
153156   m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, TILEMAP_DRAW_OPAQUE, 0);
154157
155158
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))
157160   {
158161      m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, 0, 0);
159162   }
160163
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);
162165   
163166   m_fg_tilemap->draw(screen, m_tile_bitmap_fg, cliprect, 0, 0);
164167
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);
167170
168171   /* mix & blend the tilemaps and sprites into a 32-bit bitmap */
169172   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
170178   return 0;
171179}
172180
trunk/src/mame/video/tecmo_spr.c
r30576r30577
189189
190190
191191
192         if (pri_hack == -1)
192         if (pri_hack == -1) // this is what the majority of the current drivers use
193193         {
194194            /* blending */
195195            if (attributes & 0x20)
r30576r30577
202202               bitmap = (priority >= 2) ? &bitmap_bg : &bitmap_fg;
203203            }
204204         }
205         else if (pri_hack == -2) // render to a single bitmap, with all priority / colour data mixed in for later processing (assumings sprites can't blend sprites we should probably be doing this)
206         {
207
208            // this contains the blend bit and the priority bits
209            color |= (source[attributes_word] & 0x00f0);
210            bitmap = &bitmap_prihack;
211         }
205212         else // spbactn
206213         {
207214            // this is nonsense

Previous 199869 Revisions Next


© 1997-2024 The MAME Team