~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

Viewing changes to src/mame/video/mcr3.c

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 *
43
43
 *************************************/
44
44
 
 
45
#ifdef UNUSED_FUNCTION
45
46
static TILE_GET_INFO( get_bg_tile_info )
46
47
{
47
48
        int data = videoram[tile_index * 2] | (videoram[tile_index * 2 + 1] << 8);
49
50
        int color = (data >> 12) & 3;
50
51
        SET_TILE_INFO(0, code, color, TILE_FLIPYX((data >> 10) & 3));
51
52
}
 
53
#endif
52
54
 
53
55
 
54
56
static TILE_GET_INFO( mcrmono_get_bg_tile_info )
105
107
 *
106
108
 *************************************/
107
109
 
 
110
#ifdef UNUSED_FUNCTION
108
111
VIDEO_START( mcr3 )
109
112
{
110
113
        /* initialize the background tilemap */
111
114
        bg_tilemap = tilemap_create(machine, get_bg_tile_info, tilemap_scan_rows,  16,16, 32,30);
112
115
}
 
116
#endif
113
117
 
114
118
 
115
119
VIDEO_START( mcrmono )
192
196
{
193
197
        int offs;
194
198
 
195
 
        bitmap_fill(priority_bitmap, cliprect, 1);
 
199
        bitmap_fill(machine->priority_bitmap, cliprect, 1);
196
200
 
197
201
        /* loop over sprite RAM */
198
202
        for (offs = spriteram_size - 4; offs >= 0; offs -= 4)
233
237
                if (!mcr_cocktail_flip)
234
238
                {
235
239
                        /* first draw the sprite, visible */
236
 
                        pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy,
237
 
                                        cliprect, TRANSPARENCY_PENS, 0x0101, 0x00);
 
240
                        pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy,
 
241
                                        machine->priority_bitmap, 0x00, 0x0101);
238
242
 
239
243
                        /* then draw the mask, behind the background but obscuring following sprites */
240
 
                        pdrawgfx(bitmap, machine->gfx[1], code, color, flipx, flipy, sx, sy,
241
 
                                        cliprect, TRANSPARENCY_PENS, 0xfeff, 0x02);
 
244
                        pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, flipx, flipy, sx, sy,
 
245
                                        machine->priority_bitmap, 0x02, 0xfeff);
242
246
                }
243
247
                else
244
248
                {
245
249
                        /* first draw the sprite, visible */
246
 
                        pdrawgfx(bitmap, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy,
247
 
                                        cliprect, TRANSPARENCY_PENS, 0x0101, 0x00);
 
250
                        pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy,
 
251
                                        machine->priority_bitmap, 0x00, 0x0101);
248
252
 
249
253
                        /* then draw the mask, behind the background but obscuring following sprites */
250
 
                        pdrawgfx(bitmap, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy,
251
 
                                        cliprect, TRANSPARENCY_PENS, 0xfeff, 0x02);
 
254
                        pdrawgfx_transmask(bitmap, cliprect, machine->gfx[1], code, color, !flipx, !flipy, 480 - sx, 452 - sy,
 
255
                                        machine->priority_bitmap, 0x02, 0xfeff);
252
256
                }
253
257
        }
254
258
}