Previous 199869 Revisions Next

r21843 Thursday 14th March, 2013 at 02:03:57 UTC by David Haywood
popopbear - tile flips (game over screen)
[src/mame/drivers]popobear.c

trunk/src/mame/drivers/popobear.c
r21842r21843
173173{
174174   int base = tilemap_base[0];
175175   int tileno = m_vram[base/2 + tile_index];
176   SET_TILE_INFO_MEMBER(0, tileno, 0, 0);
176   int flipyx = (tileno>>14);
177   SET_TILE_INFO_MEMBER(0, tileno&0x3fff, 0, TILE_FLIPYX(flipyx));
177178}
178179
179180TILE_GET_INFO_MEMBER(popobear_state::get_popobear_bg1_tile_info)
180181{
181182   int base = tilemap_base[1];
182183   int tileno = m_vram[base/2 + tile_index];
183   SET_TILE_INFO_MEMBER(0, tileno, 0, 0);
184   int flipyx = (tileno>>14);
185   SET_TILE_INFO_MEMBER(0, tileno&0x3fff, 0, TILE_FLIPYX(flipyx));
184186}
185187
186188TILE_GET_INFO_MEMBER(popobear_state::get_popobear_bg2_tile_info)
187189{
188190   int base = tilemap_base[2];
189191   int tileno = m_vram[base/2 + tile_index];
190   SET_TILE_INFO_MEMBER(0, tileno, 0, 0);
192   int flipyx = (tileno>>14);
193   SET_TILE_INFO_MEMBER(0, tileno&0x3fff, 0, TILE_FLIPYX(flipyx));
191194}
192195
193196TILE_GET_INFO_MEMBER(popobear_state::get_popobear_bg3_tile_info)
194197{
195198   int base = tilemap_base[3];
196199   int tileno = m_vram[base/2 + tile_index];
197   SET_TILE_INFO_MEMBER(0, tileno, 0, 0);
200   int flipyx = (tileno>>14);
201   SET_TILE_INFO_MEMBER(0, tileno&0x3fff, 0, TILE_FLIPYX(flipyx));
198202}
199203
200204
r21842r21843
280284         if(param == 0)
281285            continue;
282286
287
283288         spr_num <<= 3;
284289
285290         for(int yi=0;yi<height;yi++)
r21842r21843
294299               if(cliprect.contains(x_draw, y_draw))
295300               {
296301                  // this is a bit strange, pix data is basically 8-bit
297                  // but we have to treat 0x00, 0x20, 0x40, 0x60, 0x80, 0xa0, 0xc0 and 0xe0 as transpens?
298                  // see scores when you colect an item
302                  // but we have to treat 0x00, 0x40, 0x80, 0xc0 */
303                  // see scores when you colect an item, must be at least steps of 0x40 or one of the female panda gfx between levels breaks.. might depend on lower bits?
299304                  // granularity also means colour bank is applied *0x40
300305                  // and we have 2 more possible colour bank bits
301                  if (pix&0x1f)
306                  // colours on game over screen are still wrong
307                  if (pix&0x3f)
302308                  {
303309                     bitmap.pix16(y_draw, x_draw) = machine().pens[((pix+(color_bank*0x40))&0xff)+0x100];
304310                  }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team