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

« back to all changes in this revision

Viewing changes to src/mame/video/wgp.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:
435
435
                                        zx = x + (((k+1)*zoomx)/2) - curx;
436
436
                                        zy = y + (((j+1)*zoomy)/2) - cury;
437
437
 
438
 
                                        pdrawgfxzoom(bitmap, machine->gfx[0],
 
438
                                        pdrawgfxzoom_transpen(bitmap, cliprect,machine->gfx[0],
439
439
                                                        code,
440
440
                                                        col,
441
441
                                                        flipx, flipy,
442
442
                                                        curx,cury,
443
 
                                                        cliprect,TRANSPARENCY_PEN,0,
444
443
                                                        zx << 12, zy << 12,
445
 
                                                        primasks[((priority >> 1) &1)]);        /* maybe >> 2 or 0...? */
 
444
                                                        machine->priority_bitmap,primasks[((priority >> 1) &1)],0);     /* maybe >> 2 or 0...? */
446
445
                                }
447
446
                        }
448
447
                        else
467
466
                                        zx = x + (((k+1)*zoomx)/4) - curx;
468
467
                                        zy = y + (((j+1)*zoomy)/4) - cury;
469
468
 
470
 
                                        pdrawgfxzoom(bitmap, machine->gfx[0],
 
469
                                        pdrawgfxzoom_transpen(bitmap, cliprect,machine->gfx[0],
471
470
                                                        code,
472
471
                                                        col,
473
472
                                                        flipx, flipy,
474
473
                                                        curx,cury,
475
 
                                                        cliprect,TRANSPARENCY_PEN,0,
476
474
                                                        zx << 12, zy << 12,
477
 
                                                        primasks[((priority >> 1) &1)]);        /* maybe >> 2 or 0...? */
 
475
                                                        machine->priority_bitmap,primasks[((priority >> 1) &1)],0);     /* maybe >> 2 or 0...? */
478
476
                                }
479
477
                        }
480
478
                }
497
495
 
498
496
INLINE void bryan2_drawscanline(
499
497
                bitmap_t *bitmap,int x,int y,int length,
500
 
                const UINT16 *src,int transparent,UINT32 orient,int pri)
 
498
                const UINT16 *src,int transparent,UINT32 orient,bitmap_t *priority,int pri)
501
499
{
502
500
        UINT16 *dsti = BITMAP_ADDR16(bitmap, y, x);
503
 
        UINT8 *dstp = BITMAP_ADDR8(priority_bitmap, y, x);
 
501
        UINT8 *dstp = BITMAP_ADDR8(priority, y, x);
504
502
 
505
503
        if (transparent) {
506
504
                while (length--) {
522
520
 
523
521
 
524
522
 
525
 
static void wgp_piv_layer_draw(bitmap_t *bitmap,const rectangle *cliprect,int layer,int flags,UINT32 priority)
 
523
static void wgp_piv_layer_draw(running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect,int layer,int flags,UINT32 priority)
526
524
{
527
525
        bitmap_t *srcbitmap = tilemap_get_pixmap(wgp_piv_tilemap[layer]);
528
526
        bitmap_t *flagsbitmap = tilemap_get_flagsmap(wgp_piv_tilemap[layer]);
630
628
                        }
631
629
                }
632
630
 
633
 
                if (flags & TILEMAP_DRAW_OPAQUE)
634
 
                        bryan2_drawscanline(bitmap,0,y,screen_width,scanline,0,ROT0,priority);
635
 
                else
636
 
                        bryan2_drawscanline(bitmap,0,y,screen_width,scanline,1,ROT0,priority);
 
631
                bryan2_drawscanline(bitmap,0,y,screen_width,scanline,(flags & TILEMAP_DRAW_OPAQUE)?0:1,ROT0,machine->priority_bitmap,priority);
637
632
 
638
633
                y_index += zoomy;
639
634
                if (!machine_flip) y++; else y--;
658
653
#endif
659
654
 
660
655
#ifdef MAME_DEBUG
661
 
        if (input_code_pressed_once (KEYCODE_V))
 
656
        if (input_code_pressed_once (screen->machine, KEYCODE_V))
662
657
        {
663
658
                dislayer[0] ^= 1;
664
659
                popmessage("piv0: %01x",dislayer[0]);
665
660
        }
666
661
 
667
 
        if (input_code_pressed_once (KEYCODE_B))
 
662
        if (input_code_pressed_once (screen->machine, KEYCODE_B))
668
663
        {
669
664
                dislayer[1] ^= 1;
670
665
                popmessage("piv1: %01x",dislayer[1]);
671
666
        }
672
667
 
673
 
        if (input_code_pressed_once (KEYCODE_N))
 
668
        if (input_code_pressed_once (screen->machine, KEYCODE_N))
674
669
        {
675
670
                dislayer[2] ^= 1;
676
671
                popmessage("piv2: %01x",dislayer[2]);
677
672
        }
678
673
 
679
 
        if (input_code_pressed_once (KEYCODE_M))
 
674
        if (input_code_pressed_once (screen->machine, KEYCODE_M))
680
675
        {
681
676
                dislayer[3] ^= 1;
682
677
                popmessage("TC0100SCN top bg layer: %01x",dislayer[3]);
708
703
#ifdef MAME_DEBUG
709
704
        if (dislayer[layer[0]]==0)
710
705
#endif
711
 
        wgp_piv_layer_draw(bitmap,cliprect,layer[0],TILEMAP_DRAW_OPAQUE,1);
 
706
        wgp_piv_layer_draw(screen->machine,bitmap,cliprect,layer[0],TILEMAP_DRAW_OPAQUE,1);
712
707
 
713
708
#ifdef MAME_DEBUG
714
709
        if (dislayer[layer[1]]==0)
715
710
#endif
716
 
        wgp_piv_layer_draw(bitmap,cliprect,layer[1],0,2);
 
711
        wgp_piv_layer_draw(screen->machine,bitmap,cliprect,layer[1],0,2);
717
712
 
718
713
#ifdef MAME_DEBUG
719
714
        if (dislayer[layer[2]]==0)
720
715
#endif
721
 
        wgp_piv_layer_draw(bitmap,cliprect,layer[2],0,4);
 
716
        wgp_piv_layer_draw(screen->machine,bitmap,cliprect,layer[2],0,4);
722
717
 
723
718
        draw_sprites(screen->machine, bitmap,cliprect,16);
724
719