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

« back to all changes in this revision

Viewing changes to src/mame/video/tatsumi.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:
247
247
 
248
248
/********************************************************************/
249
249
 
250
 
INLINE void roundupt_drawgfxzoomrotate( running_machine *machine,
251
 
                bitmap_t *dest_bmp,const gfx_element *gfx,
 
250
INLINE void roundupt_drawgfxzoomrotate(
 
251
                bitmap_t *dest_bmp, const rectangle *clip, const gfx_element *gfx,
252
252
                UINT32 code,UINT32 color,int flipx,int flipy,UINT32 ssx,UINT32 ssy,
253
 
                const rectangle *clip, int scalex, int scaley, int rotate, int write_priority_only )
 
253
                int scalex, int scaley, int rotate, int write_priority_only )
254
254
{
255
255
        rectangle myclip;
256
256
 
282
282
        {
283
283
                if( gfx )
284
284
                {
285
 
                        const pen_t *pal = &machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
 
285
                        const pen_t *pal = &gfx->machine->pens[gfx->color_base + gfx->color_granularity * (color % gfx->total_colors)];
286
286
                        const UINT8 *shadow_pens = shadow_pen_array + (gfx->color_granularity * (color % gfx->total_colors));
287
287
                        const UINT8 *code_base = gfx_element_get_data(gfx, code % gfx->total_elements);
288
288
 
375
375
                                { /* skip if inner loop doesn't draw anything */
376
376
                                        int y;
377
377
#if 0
378
 
                                        /* case 1: TRANSPARENCY_PEN */
379
 
                                        if (transparency == TRANSPARENCY_PEN)
380
378
                                        {
381
379
                                                {
382
380
                                                        int startx=0;
429
427
                                        }
430
428
#endif
431
429
#if 1 // old
432
 
                                        //if (transparency == TRANSPARENCY_PEN)
433
430
                                        {
434
431
                                                {
435
432
                                                        for( y=sy; y<ey; y++ )
466
463
 
467
464
static void mycopyrozbitmap_core(bitmap_t *bitmap,bitmap_t *srcbitmap,
468
465
                int dstx,int dsty, int srcwidth, int srcheight,int incxx,int incxy,int incyx,int incyy,
469
 
                const rectangle *clip,int transparency,int transparent_color)
 
466
                const rectangle *clip,int transparent_color)
470
467
{
471
468
        UINT32 cx;
472
469
        UINT32 cy;
643
640
 
644
641
                                for (w=0; w<x_width; w++) {
645
642
                                        if (rotate)
646
 
                                                roundupt_drawgfxzoomrotate(machine,
647
 
                                                                temp_bitmap,machine->gfx[0],
 
643
                                                roundupt_drawgfxzoomrotate(
 
644
                                                                temp_bitmap,cliprect,machine->gfx[0],
648
645
                                                                base,
649
646
                                                                color,fx,0,x_pos,render_y,
650
 
                                                                cliprect,scale,scale,0,write_priority_only);
 
647
                                                                scale,scale,0,write_priority_only);
651
648
                                        else
652
 
                                                roundupt_drawgfxzoomrotate(machine,
653
 
                                                                bitmap,machine->gfx[0],
 
649
                                                roundupt_drawgfxzoomrotate(
 
650
                                                                bitmap,cliprect,machine->gfx[0],
654
651
                                                                base,
655
652
                                                                color,fx,0,x_pos,render_y,
656
 
                                                                cliprect,scale,scale,0,write_priority_only);
 
653
                                                                scale,scale,0,write_priority_only);
657
654
                                        base++;
658
655
 
659
656
                                        if (fx)
693
690
                        extent_x=extent_x>>16;
694
691
                        extent_y=extent_y>>16;
695
692
                        if (extent_x>2 && extent_y>2)
696
 
                        mycopyrozbitmap_core(bitmap, temp_bitmap, x/* + (extent_x/2)*/, y /*+ (extent_y/2)*/, extent_x, extent_y, incxx, incxy, incyx, incyy, cliprect,
697
 
                                TRANSPARENCY_PEN, 0);
 
693
                        mycopyrozbitmap_core(bitmap, temp_bitmap, x/* + (extent_x/2)*/, y /*+ (extent_y/2)*/, extent_x, extent_y, incxx, incxy, incyx, incyy, cliprect, 0);
698
694
                }
699
695
        }
700
696
}
1099
1095
        tilemap_set_scrolly(tx_layer,0,0); //(((roundupt_crt_reg[0xe]<<8)|roundupt_crt_reg[0xf])>>5) + 96);
1100
1096
 
1101
1097
        bitmap_fill(bitmap,cliprect,screen->machine->pens[384]); // todo
1102
 
        bitmap_fill(priority_bitmap,cliprect,0);
 
1098
        bitmap_fill(screen->machine->priority_bitmap,cliprect,0);
1103
1099
 
1104
 
        draw_sprites(screen->machine, priority_bitmap,cliprect,1,(tatsumi_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Alpha pass only
1105
 
        draw_road(screen->machine, bitmap,cliprect,priority_bitmap);
 
1100
        draw_sprites(screen->machine, screen->machine->priority_bitmap,cliprect,1,(tatsumi_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Alpha pass only
 
1101
        draw_road(screen->machine, bitmap,cliprect,screen->machine->priority_bitmap);
1106
1102
        draw_sprites(screen->machine, bitmap,cliprect,0,(tatsumi_sprite_control_ram[0xe0]&0x1000) ? 0x1000 : 0); // Full pass
1107
1103
        tilemap_draw(bitmap,cliprect,tx_layer,0,0);
1108
1104
        return 0;