static VIDEO_UPDATE(fortecar) { int x,y,count; count = 0; fillbitmap(bitmap,machine->pens[0],cliprect); for (y=0;y<32;y++) { for(x=0;x<64;x++) { int tile; tile = fortecar_ram[0x800+(count*4)+1]; drawgfx(bitmap,machine->gfx[0],tile,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_PEN,0); count++; } } return 0; }
static void draw_sprites( struct mame_bitmap *bitmap, const struct rectangle *cliprect, int bFog ){ const struct GfxElement *gfx = Machine->gfx[3]; int bank = (grchamp_videoreg0&0x20)?0x40:0x00; const UINT8 *source = spriteram; const UINT8 *finish = source+0x40; while( source<finish ){ int sx = source[3]; int sy = 240-source[0]; int color = bFog?8:source[2]; int code = source[1]; drawgfx( bitmap, gfx, bank + (code&0x3f), color, code&0x40,code&0x80, sx,sy, cliprect, TRANSPARENCY_PEN, 0 ); source += 4; } }
static void draw_alpha_line(struct mame_bitmap *bitmap, const struct rectangle *cliprect, int alpha_line, int video_line) { int x; for (x = 0; x < 32; x++) { data8_t code, col; code = carpolo_alpharam[alpha_line * 32 + x] >> 2; col = carpolo_alpharam[alpha_line * 32 + x] & 0x03; drawgfx(bitmap,Machine->gfx[2], code,col, 0,0, x*8,video_line*8, cliprect,TRANSPARENCY_PEN,0); } }
static void galpanic_draw_sprites(struct mame_bitmap *bitmap) { int offs; int sx,sy; sx = sy = 0; for (offs = 0;offs < spriteram_size/2;offs += 8) { int x,y,code,color,flipx,flipy,attr1,attr2; attr1 = spriteram16[offs + 3]; x = spriteram16[offs + 4] - ((attr1 & 0x01) << 8); y = spriteram16[offs + 5] + ((attr1 & 0x02) << 7); if (attr1 & 0x04) /* multi sprite */ { sx += x; sy += y; } else { sx = x; sy = y; } color = (attr1 & 0xf0) >> 4; /* bit 0 [offs + 0] is used but I don't know what for */ attr2 = spriteram16[offs + 7]; code = spriteram16[offs + 6] + ((attr2 & 0x1f) << 8); flipx = attr2 & 0x80; flipy = attr2 & 0x40; drawgfx(bitmap,Machine->gfx[0], code, color, flipx,flipy, sx,sy - 16, &Machine->visible_area,TRANSPARENCY_PEN,0); } }
static void drtomy_draw_sprites(mame_bitmap *bitmap, const rectangle *cliprect) { int i, x, y, ex, ey; const gfx_element *gfx = Machine->gfx[0]; static int x_offset[2] = {0x0,0x2}; static int y_offset[2] = {0x0,0x1}; for (i = 3; i < 0x1000/2; i+=4){ int sx = drtomy_spriteram[i+2] & 0x01ff; int sy = (240 - (drtomy_spriteram[i] & 0x00ff)) & 0x00ff; int number = drtomy_spriteram[i+3]; int color = (drtomy_spriteram[i+2] & 0x1e00) >> 9; int attr = (drtomy_spriteram[i] & 0xfe00) >> 9; int xflip = attr & 0x20; int yflip = attr & 0x40; int spr_size; if (attr & 0x04){ spr_size = 1; } else{ spr_size = 2; number &= (~3); } for (y = 0; y < spr_size; y++){ for (x = 0; x < spr_size; x++){ ex = xflip ? (spr_size-1-x) : x; ey = yflip ? (spr_size-1-y) : y; drawgfx(bitmap,gfx,number + x_offset[ex] + y_offset[ey], color,xflip,yflip, sx-0x09+x*8,sy+y*8, cliprect,TRANSPARENCY_PEN,0); } } } }
static void draw_text( struct osd_bitmap *bitmap ) { int offs; const struct rectangle *clip = &Machine->visible_area; for ( offs = 0; offs < 0x800; offs += 2 ) { unsigned short data = READ_WORD( &colorram[offs] ); int tile_number = data&0x3ff; if ( tile_number != 0xd ) { int color = data>>10; int sx = 8 * ( ( offs >> 1 ) % 32 ); int sy = 8 * ( ( offs >> 1 ) / 32 ); drawgfx( bitmap,Machine->gfx[0], tile_number, color, 0,0, /* no flip */ sx,sy, clip,TRANSPARENCY_PEN,0x3); } }
static void targeth_draw_sprites(mame_bitmap *bitmap, const rectangle *cliprect) { int i; const gfx_element *gfx = Machine->gfx[0]; for (i = 3; i < (0x1000 - 6)/2; i += 4){ int sx = targeth_spriteram[i+2] & 0x03ff; int sy = (240 - (targeth_spriteram[i] & 0x00ff)) & 0x00ff; int number = targeth_spriteram[i+3] & 0x3fff; int color = (targeth_spriteram[i+2] & 0x7c00) >> 10; int attr = (targeth_spriteram[i] & 0xfe00) >> 9; int xflip = attr & 0x20; int yflip = attr & 0x40; drawgfx(bitmap,gfx,number, 0x20 + color,xflip,yflip, sx - 0x0f,sy, &Machine->screen[0].visarea,TRANSPARENCY_PEN,0); } }
static void tnk3_draw_background( mame_bitmap *bitmap, int scrollx, int scrolly, int x_size, int y_size, int bg_type ) { const gfx_element *gfx = Machine->gfx[1]; rectangle *clip = &Machine->screen[0].visarea; int tile_number, attributes, color, sx, sy; int offs, x, y; /* to be moved to memmap */ for(x=0; x<x_size; x++) for(y=0; y<y_size; y++) { offs = (x*y_size + y) << 1; tile_number = videoram[offs]; attributes = videoram[offs+1]; if(tile_number != dirtybuffer[offs] || attributes != dirtybuffer[offs+1]) { dirtybuffer[offs] = tile_number; dirtybuffer[offs+1] = attributes; if(bg_type == 0) { /* type tnk3 */ tile_number |= (attributes & 0x30) << 4; color = (attributes & 0xf) ^ 8; } else { /* type ikari */ tile_number |= (attributes & 0x03) << 8; color = attributes >> 4; } sx = x * 512 / x_size; sy = y * 512 / y_size; drawgfx(tmpbitmap,gfx,tile_number,color,0,0,sx,sy,0,TRANSPARENCY_NONE,0); } }
static void popper_draw_sprites(mame_bitmap *bitmap,const rectangle *cliprect) { int offs,sx,sy,flipx,flipy; for (offs = 0; offs < popper_spriteram_size-4; offs += 4) { /*if y position is in the current strip */ if(popper_spriteram[offs+1] && (((popper_spriteram[offs]+(popper_flipscreen?2:0))&0xf0) == (0x0f-offs/0x80)<<4)) { /*offs y pos */ /*offs+1 sprite number */ /*offs+2 */ /*76543210 */ /*x------- flipy */ /*-x------ flipx */ /*--xx---- unused */ /*----xxxx colour */ /*offs+3 x pos */ sx = popper_spriteram[offs+3]; sy = 240-popper_spriteram[offs]; flipx = (popper_spriteram[offs+2]&0x40)>>6; flipy = (popper_spriteram[offs+2]&0x80)>>7; if (popper_flipscreen) { sx = 248 - sx; sy = 242 - sy; flipx = !flipx; flipy = !flipy; } drawgfx(bitmap,Machine->gfx[1], popper_spriteram[offs+1], (popper_spriteram[offs+2]&0x0f), flipx,flipy, sx,sy, cliprect,TRANSPARENCY_PEN,0); } }
static void mustache_draw_sprites( struct mame_bitmap *bitmap, const struct rectangle *cliprect ) { struct rectangle clip = *cliprect; const struct GfxElement *gfx = Machine->gfx[1]; int offs; for (offs = 0;offs < spriteram_size;offs += 4) { int sy = 240-spriteram[offs]; int sx = 240-spriteram[offs+3]; int code = spriteram[offs+2]; int attr = spriteram[offs+1]; int color = (attr & 0xe0)>>5; if (sy == 240) continue; code+=(attr&0x0c)<<6; if ((control_byte & 0xa)) clip.max_y = Machine->visible_area.max_y; else if (flip_screen) clip.min_y = Machine->visible_area.min_y + 56; else clip.max_y = Machine->visible_area.max_y - 56; if (flip_screen) { sx = 240 - sx; sy = 240 - sy; } drawgfx(bitmap,gfx, code, color, flip_screen,flip_screen, sx,sy, &clip,TRANSPARENCY_PEN,0); } }
static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect) { int offs,sx,sy,flipx,flipy; for (offs = 0; offs < popper_spriteram_size-4; offs += 4) { //if y position is in the current strip if(popper_spriteram[offs+1] && (((popper_spriteram[offs]+(popper_flipscreen?2:0))&0xf0) == (0x0f-offs/0x80)<<4)) { //offs y pos //offs+1 sprite number //offs+2 //76543210 //x------- flipy //-x------ flipx //--xx---- unused //----xxxx colour //offs+3 x pos sx = popper_spriteram[offs+3]; sy = 240-popper_spriteram[offs]; flipx = (popper_spriteram[offs+2]&0x40)>>6; flipy = (popper_spriteram[offs+2]&0x80)>>7; if (popper_flipscreen) { sx = 248 - sx; sy = 242 - sy; flipx = !flipx; flipy = !flipy; } drawgfx(bitmap,machine->gfx[1], popper_spriteram[offs+1], (popper_spriteram[offs+2]&0x0f), flipx,flipy, sx,sy, cliprect,TRANSPARENCY_PEN,0); } }
static void draw_bg(mame_bitmap *bitmap) { int offs; int scroll[256]; for (offs = 0;offs < 0x400;offs++) { int code = videoram[0x400+offs]; if (dirtybuffer[0x400+offs] || dirtychar[code]) { int sx = offs % 32; int sy = offs / 32; dirtybuffer[0x400+offs] = 0; if (flip_screen_x) sx = 31 - sx; if (flip_screen_y) sy = 31 - sy; drawgfx(tmpbitmap1,Machine->gfx[0], code, 2, flip_screen_x,flip_screen_y, 8*sx,8*sy, NULL,TRANSPARENCY_NONE,0); } } /* first copy to a temp bitmap doing column scroll */ for (offs = 0;offs < 256;offs++) scroll[offs] = -buggychl_scrollv[offs/8]; copyscrollbitmap(tmpbitmap2,tmpbitmap1,1,&bg_scrollx,256,scroll,NULL,TRANSPARENCY_NONE,0); /* then copy to the screen doing row scroll */ for (offs = 0;offs < 256;offs++) scroll[offs] = -buggychl_scrollh[offs]; copyscrollbitmap(bitmap,tmpbitmap2,256,scroll,0,0,&Machine->screen[0].visarea,TRANSPARENCY_COLOR,32); }
static void circus_draw_fg( mame_bitmap *bitmap ) { /* The sync generator hardware is used to */ /* draw the border and diving boards */ draw_line (bitmap,0,18,255,18,0); draw_line (bitmap,0,249,255,249,1); draw_line (bitmap,0,18,0,248,0); draw_line (bitmap,247,18,247,248,0); draw_line (bitmap,0,137,17,137,0); draw_line (bitmap,231,137,248,137,0); draw_line (bitmap,0,193,17,193,0); draw_line (bitmap,231,193,248,193,0); drawgfx(bitmap,Machine->gfx[1], clown_z, 0, 0,0, clown_y,clown_x, &Machine->screen[0].visarea,TRANSPARENCY_PEN,0); }
static void champbas_draw_sprites( mame_bitmap *bitmap ) { int offs; for (offs = spriteram_size - 2; offs >= 0; offs -= 2) { int code = spriteram[offs] >> 2; int color = spriteram[offs + 1]; int flipx = spriteram[offs] & 0x01; int flipy = spriteram[offs] & 0x02; int sx = ((256 + 16 - spriteram_2[offs + 1]) & 0xff) - 16; int sy = spriteram_2[offs] - 16; drawgfx(bitmap, Machine->gfx[2 + gfxbank], code, color, flipx, flipy, sx, sy, &Machine->screen[0].visarea, TRANSPARENCY_COLOR, 0); } }
static void rshark_draw_layer(struct mame_bitmap *bitmap,int gfx,data16_t *scroll, const unsigned char *tilemap,const unsigned char *tilemap2,int transparency) { int offs; int scrollx,scrolly; scrollx = (scroll[0]&0xff) + ((scroll[1]&0xff) << 8); scrolly = (scroll[3]&0xff) + ((scroll[4]&0xff) << 8); for (offs = 0;offs < 0x800;offs += 2) { int sx,sy,code,color,attr,attr2,flipx,flipy; int toffs = offs+((scrollx&~0x0f)<<2); attr = tilemap[toffs]; attr2 = tilemap2[toffs/2]; code = tilemap[toffs+1] | ((attr & 0x1f) << 8); color = attr2 & 0x0f; sx = 16 * ((offs/2) / 32) - (scrollx & 0x0f); sy = (16 * ((offs/2) % 32) - scrolly) & 0x1ff; if (sy > 256) sy -= 512; flipx = attr & 0x40; flipy = attr & 0x80; if (flip_screen) { sx = 512-16 - sx; sy = 256-16 - sy; flipx = !flipx; flipy = !flipy; } drawgfx(bitmap,Machine->gfx[gfx], code, color, flipx,flipy, sx,sy, &Machine->visible_area,transparency,15); } }
static void circus_draw_fg(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect) { /* The sync generator hardware is used to */ /* draw the border and diving boards */ draw_line (bitmap,cliprect,0,18,255,18,0); draw_line (bitmap,cliprect,0,249,255,249,1); draw_line (bitmap,cliprect,0,18,0,248,0); draw_line (bitmap,cliprect,247,18,247,248,0); draw_line (bitmap,cliprect,0,137,17,137,0); draw_line (bitmap,cliprect,231,137,248,137,0); draw_line (bitmap,cliprect,0,193,17,193,0); draw_line (bitmap,cliprect,231,193,248,193,0); drawgfx(bitmap,machine->gfx[1], clown_z, 0, 0,0, clown_y,clown_x, cliprect,TRANSPARENCY_PEN,0); }
static VIDEO_UPDATE( galaxia ) { int x,y, count; fillbitmap(bitmap,0,cliprect); count = 0; for (y=0;y<256/8;y++) { for (x=0;x<256/8;x++) { int tile = galaxia_video[count]; drawgfx(bitmap,screen->machine->gfx[0],tile,0,0,0,x*8,y*8,cliprect,TRANSPARENCY_NONE,0); count++; } } return 0; }
static void draw_chars(mame_bitmap *bitmap, int priority) { int offs, transparency; transparency = (priority == 0) ? TRANSPARENCY_NONE : TRANSPARENCY_PEN; for (offs = 0; offs < videoram_size; offs++) { int code,sx,sy,col; UINT8 scroll; sy = (offs / 32); sx = (offs % 32); col = colorram[((sy & 0x1c) << 3) + sx]; if ((col & 0x10) != priority) continue; scroll = ~ambush_scrollram[sx]; code = videoram[offs] | ((col & 0x60) << 3); if (flip_screen) { sx = 31 - sx; sy = 31 - sy; scroll = ~scroll - 1; } drawgfx(bitmap,Machine->gfx[0], code, (col & 0x0f) | ((*ambush_colorbank & 0x03) << 4), flip_screen,flip_screen, 8*sx, (8*sy + scroll) & 0xff, &Machine->screen[0].visarea,transparency,0); } }
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap, const rectangle *cliprect) { const gfx_element *gfx = machine->gfx[1]; int offs; int line; int coloffset = ((col0&0x07) << 4); for (line = cliprect->min_y; line <= cliprect->max_y; line++) { UINT8 *sr; rectangle clip = *cliprect; sr = sprite_mux_buffer + line * spriteram_size; clip.min_y = clip.max_y = line; for (offs = spriteram_size - 4;offs >= 0;offs -= 4) { int code,color,sx,sy,flipx,flipy; sx = sr[offs]; sy = 240 - sr[offs + 3]; if (sy > line-16 && sy <= line) { code = sr[offs + 1]; color = (sr[offs + 2] & 0x0f) + coloffset; flipx = ~sr[offs + 2] & 0x40; flipy = sr[offs + 2] & 0x80; drawgfx(bitmap,gfx, code, color, flipx,flipy, sx,sy, &clip,TRANSPARENCY_COLOR,0); } } } }
static void draw_background(struct mame_bitmap *bitmap, int bank, int colortype) { int offs; /* for every character in the Video RAM, check if it has been modified */ /* since last time and update it accordingly. */ for (offs = videoram_size - 1;offs >= 0;offs--) { int scroll,sx,sy,col; sx = offs % 32; sy = offs / 32; if (colortype) { col = (wiz_attributesram[2 * sx + 1] & 0x07); } else { col = (wiz_attributesram[2 * (offs % 32) + 1] & 0x04) + (videoram[offs] & 3); } scroll = (8*sy + 256 - wiz_attributesram[2 * sx]) % 256; if (flipy) { scroll = (248 - scroll) % 256; } if (flipx) sx = 31 - sx; drawgfx(bitmap,Machine->gfx[bank], videoram[offs], col + 8 * palette_bank, flipx,flipy, 8*sx,scroll, &Machine->visible_area,TRANSPARENCY_PEN,0); } }
static void talbot_draw_sprites( mame_bitmap *bitmap ) { int offs; for (offs = spriteram_size - 2; offs >= 0; offs -= 2) { int code = spriteram[offs] >> 2; int color = spriteram[offs + 1]; int flipx = spriteram[offs] & 0x01; int flipy = spriteram[offs] & 0x02; int sx = ((256 + 16 - spriteram_2[offs + 1]) & 0xff) - 16; int sy = spriteram_2[offs] - 16; drawgfx(bitmap, Machine->gfx[1], code, color, flipx, flipy, sx, sy, &Machine->visible_area, TRANSPARENCY_PEN, 0); } }
void xybots_vh_screenrefresh(struct osd_bitmap *bitmap, int full_refresh) { int i; /* update the palette */ if (update_palette()) memset(atarigen_pf_dirty, 1, atarigen_playfieldram_size / 2); /* set up the all-transparent overrender palette */ for (i = 0; i < 16; i++) atarigen_overrender_colortable[i] = palette_transparent_pen; /* render the playfield */ atarigen_pf_process(pf_render_callback, bitmap, &Machine->visible_area); /* render the motion objects */ atarigen_mo_process(mo_render_callback, bitmap); /* redraw the alpha layer completely */ { const struct GfxElement *gfx = Machine->gfx[2]; int sx, sy, offs; for (sy = 0; sy < YCHARS; sy++) for (sx = 0, offs = sy * 64; sx < XCHARS; sx++, offs++) { int data = READ_WORD(&atarigen_alpharam[offs * 2]); int code = data & 0x3ff; int opaque = data & 0x8000; if (code || opaque) { int color = (data >> 12) & 7; drawgfx(bitmap, gfx, code, color, 0, 0, 8 * sx, 8 * sy, 0, opaque ? TRANSPARENCY_NONE : TRANSPARENCY_PEN, 0); } } }
static void draw_sprites( struct osd_bitmap *bitmap ){ const struct rectangle *clip = &Machine->visible_area; const struct GfxElement *gfx = Machine->gfx[1]; UINT16 *source = (UINT16 *)spriteram; UINT16 *finish = source+0x800; while( source<finish ){ UINT16 attributes = source[1]; if( attributes&0x01 ){ /* enable */ int flipx = attributes&0x10; int flipy = attributes&0x08; int height = (attributes>>5)&0x7; int sy = source[0]&0xff; int sx = source[5]&0xff; UINT16 tile_number = source[2]&0xff; UINT16 color = source[4]&0xf; int bank = source[3]&0xff; int i; if (attributes&0x04) sx|=0x100; if (attributes&0x02) sy=239+(0x100-sy); else sy=240-sy; if (sx>0x17f) sx=0-(0x200-sx); tile_number += (bank*256); for( i=0; i<=height; i++ ){ int tile_index = tile_number + i; drawgfx(bitmap,gfx, tile_index, color, flipx,flipy, sx,sy-i*16, clip,TRANSPARENCY_PEN,0); } } source+=8; }
static void tdfever_draw_tx(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int attributes, int dx, int dy, int base ) { const UINT8 *source = snk_rambase - 0xd000 + base; const gfx_element *gfx = machine->gfx[0]; int tile_high = (attributes & 0xf0) << 4; int color = attributes & 0xf; int tile_number, sx, sy; int x, y; for(x = 0; x < 64; x++) for(y = 0; y < 32; y++) { tile_number = source[(x<<5)+y]; if(tile_number == 0x20) continue; sx = dx + x*8; sy = dy + y*8; drawgfx(bitmap,gfx,tile_high|tile_number,color,0,0,sx,sy,cliprect,TRANSPARENCY_PEN,15); } }
void exidy_check_collision(struct osd_bitmap *bitmap) { int sx,sy,org_x,org_y; struct rectangle clip; unsigned char enable_set=0; int collision; /* reset collision flags */ exidy_collision &= 0xEB; clip.min_x=0; clip.max_x=15; clip.min_y=0; clip.max_y=15; org_x = 236-*exidy_sprite1_xpos-4; org_y = 244-*exidy_sprite1_ypos-4; if ((*exidy_sprite_enable&0x20)==0x20) enable_set=1; fillbitmap(motion_object_1_vid,Machine->pens[0],&clip); fillbitmap(motion_object_2_vid,Machine->pens[0],&clip); /* Draw Motion Object 1 */ drawgfx(motion_object_1_vid,Machine->gfx[1], (*exidy_sprite_no & 0x0F)+16*enable_set,0, 0,0,0,0,&clip,TRANSPARENCY_NONE,0); /* Draw Motion Object 2 clipped to Motion Object 1's location */ if (!(*exidy_sprite_enable&0x40)) { sx = (236-*exidy_sprite2_xpos-4)-org_x; sy = (244-*exidy_sprite2_ypos-4)-org_y; drawgfx(motion_object_2_vid,Machine->gfx[1], ((*exidy_sprite_no>>4) & 0x0F)+32,1, 0,0,sx,sy,&clip,TRANSPARENCY_NONE,0); }
static void draw_foreground(struct mame_bitmap *bitmap, int colortype) { int offs; /* draw the frontmost playfield. They are characters, but draw them as sprites. */ for (offs = videoram_size - 1;offs >= 0;offs--) { int scroll,sx,sy,col; sx = offs % 32; sy = offs / 32; if (colortype) { col = (wiz_attributesram2[2 * sx + 1] & 0x07); } else { col = (wiz_colorram2[offs] & 0x07); } scroll = (8*sy + 256 - wiz_attributesram2[2 * sx]) % 256; if (flipy) { scroll = (248 - scroll) % 256; } if (flipx) sx = 31 - sx; drawgfx(bitmap,Machine->gfx[char_bank[1]], wiz_videoram2[offs], col + 8 * palette_bank, flipx,flipy, 8*sx,scroll, &Machine->visible_area,TRANSPARENCY_PEN,0); } }
static void draw_sprites( mame_bitmap *bitmap, const rectangle *cliprect ) { int offs,code,attr,sx,sy,flipx,flipy,color; for (offs = 0;offs < spriteram_size;offs += 4) { code = spriteram[offs+1]; attr = spriteram[offs+2]; /* xxxx---- color * ----xx-- flipy,flipx * -------x msbx */ color = attr>>4; flipx = attr & 0x04; flipy = attr & 0x08; sx = (spriteram[offs+3] - 0x80) + 256 * (attr & 0x01); sy = 240 - spriteram[offs]; if (flip_screen) { sx = 240 - sx; sy = 240 - sy; flipx = !flipx; flipy = !flipy; } if (code&0x80) code += (mightguy_vreg[0]&0x30)<<3; drawgfx(bitmap,Machine->gfx[2], code, color, flipx,flipy, sx,sy, cliprect,TRANSPARENCY_PEN,0 ); } }
static void draw_sprites(mame_bitmap *bitmap,const rectangle *cliprect) { int flipscreen = 0; int offs,sx,sy; for (offs = 0x1000-0x40;offs >= 0;offs -= 0x20) { int code = egghunt_spram[offs]; int attr = egghunt_spram[offs+1]; int color = attr & 0x0f; sx = egghunt_spram[offs+3] + ((attr & 0x10) << 4); sy = ((egghunt_spram[offs+2] + 8) & 0xff) - 8; code += (attr & 0xe0) << 3; if(attr & 0xe0) { switch(egghunt_gfx_banking & 0x30) { /* case 0x00: */ /* case 0x10: code += 0; break; */ case 0x20: code += 0x400; break; case 0x30: code += 0x800; break; } } if (flipscreen) { sx = 496 - sx; sy = 240 - sy; } drawgfx(bitmap,Machine->gfx[1], code, color, flipscreen,flipscreen, sx,sy, cliprect,TRANSPARENCY_PEN,15); } }
static void draw_torpedo(struct mame_bitmap* bitmap, const struct rectangle* cliprect) { int count = 0; int x; int y; drawgfx(bitmap, Machine->gfx[3], wolfpack_torpedo_pic, 0, 0, 0, 2 * (244 - wolfpack_torpedo_h), 224 - wolfpack_torpedo_v, cliprect, TRANSPARENCY_PEN, 0); for (y = 16; y < 224 - wolfpack_torpedo_v; y++) { int x1; int x2; if (y % 16 == 1) { count = (count - 1) & 7; } x1 = 248 - wolfpack_torpedo_h - count; x2 = 248 - wolfpack_torpedo_h + count; for (x = 2 * x1; x < 2 * x2; x++) { if (LFSR[(current_index + 0x300 * y + x) % 0x8000]) { plot_pixel(bitmap, x, y, 1); } } } }
static void bigstrkb_drawsprites( struct mame_bitmap *bitmap, const struct rectangle *cliprect ) { /*- SPR RAM Format -** 16 bytes per sprite nnnn nnnn nnnn nnnn aaaa aaaa aaaa aaaa xxxx xxxx xxxx xxxx yyyy yyyy yyyy yyyy ( rest unused ) **- End of Comments -*/ const struct GfxElement *gfx = Machine->gfx[2]; data16_t *source = bigstrkb_spriteram; data16_t *finish = source + 0x800/2; while( source<finish ) { int xpos, ypos, num, attr; int flipx, col; xpos = source[2]; ypos = source[3]; num = source[0]; attr = source[1]; ypos = 0xffff - ypos; xpos -= 126; ypos -= 16; flipx = attr & 0x0100; col = attr & 0x000f; drawgfx(bitmap,gfx,num,col,flipx,0,xpos,ypos,cliprect,TRANSPARENCY_PEN,15); source+=8; } }