Previous 199869 Revisions Next

r23900 Monday 24th June, 2013 at 09:22:47 UTC by hap
fix possible garbage sprite
[src/mame/video]seibuspi.c

trunk/src/mame/video/seibuspi.c
r23899r23900
293293      y2 = cliprect.max_y;
294294   }
295295
296   if (gfx->elements() <= 0x10000)
297   {
298      code &= 0xffff;
299   }
300
301296   dp = gfx->get_data(code);
302297
303298   // draw
r23899r23900
338333   int priority;
339334   int x1, y1;
340335   gfx_element *gfx = machine().gfx[2];
336   const int gfx_high_mask = (gfx->elements() > 0x10000) ? 0x10000 : 0;
341337
342338   static const int sprite_xtable[2][8] =
343339   {
r23899r23900
370366         -------- -------- ---x---- --------  tile_num high (only on RISE10/11 chip)
371367         -------- -------- ------xx xxxxxxxx  xpos
372368      */
373      tile_num = (m_sprite_ram[a + 0] >> 16 & 0xffff) | (m_sprite_ram[a + 1] << 4 & 0x10000);
369      tile_num = m_sprite_ram[a + 0] >> 16 & 0xffff;
374370      if (tile_num == 0)
375371         continue;
376372
r23899r23900
385381      if (ypos & 0x100)
386382         ypos |= 0xfe00;
387383      color = m_sprite_ram[a + 0] & 0x3f;
384      tile_num |= m_sprite_ram[a + 1] << 4 & gfx_high_mask;
388385
389386      width = (m_sprite_ram[a + 0] >> 8 & 0x7) + 1;
390387      height = (m_sprite_ram[a + 0] >> 12 & 0x7) + 1;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team