• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ drawgfx_transpen函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中drawgfx_transpen函数的典型用法代码示例。如果您正苦于以下问题:C++ drawgfx_transpen函数的具体用法?C++ drawgfx_transpen怎么用?C++ drawgfx_transpen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了drawgfx_transpen函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: VIDEO_UPDATE

static VIDEO_UPDATE( laserbat )
{
	laserbat_state *state = (laserbat_state *)screen->machine->driver_data;
	int y;
	bitmap_t *s2636_1_bitmap;
	bitmap_t *s2636_2_bitmap;
	bitmap_t *s2636_3_bitmap;

	tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);

	/* update the S2636 chips */
	s2636_1_bitmap = s2636_update(state->s2636_1, cliprect);
	s2636_2_bitmap = s2636_update(state->s2636_2, cliprect);
	s2636_3_bitmap = s2636_update(state->s2636_3, cliprect);

	/* copy the S2636 images into the main bitmap */
	for (y = cliprect->min_y; y <= cliprect->max_y; y++)
	{
		int x;

		for (x = cliprect->min_x; x <= cliprect->max_x; x++)
		{
			int pixel1 = *BITMAP_ADDR16(s2636_1_bitmap, y, x);
			int pixel2 = *BITMAP_ADDR16(s2636_2_bitmap, y, x);
			int pixel3 = *BITMAP_ADDR16(s2636_3_bitmap, y, x);

			if (S2636_IS_PIXEL_DRAWN(pixel1))
				*BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel1);

			if (S2636_IS_PIXEL_DRAWN(pixel2))
				*BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel2);

			if (S2636_IS_PIXEL_DRAWN(pixel3))
				*BITMAP_ADDR16(bitmap, y, x) = S2636_PIXEL_COLOR(pixel3);
		}
	}

	if (state->sprite_enable)
		drawgfx_transpen(bitmap,cliprect,screen->machine->gfx[1],
		        state->sprite_code,
				state->sprite_color,
				0,0,
				state->sprite_x - 6,state->sprite_y,0);

	return 0;
}
开发者ID:hstampfl,项目名称:mame2010-libretro,代码行数:46,代码来源:laserbat.c


示例2: gpworld_draw_tiles

/* VIDEO GOODS */
static void gpworld_draw_tiles(running_machine &machine, bitmap_rgb32 &bitmap,const rectangle &cliprect)
{
	gpworld_state *state = machine.driver_data<gpworld_state>();
	UINT8 characterX, characterY;

	/* Temporarily set to 64 wide to accommodate two screens */
	for (characterX = 0; characterX < 64; characterX++)
	{
		for (characterY = 0; characterY < 32; characterY++)
		{
			int current_screen_character = (characterY*64) + characterX;

			drawgfx_transpen(bitmap, cliprect, machine.gfx[0], state->m_tile_ram[current_screen_character],
					characterY, 0, 0, characterX*8, characterY*8, 0);
		}
	}
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:18,代码来源:gpworld.c


示例3: draw_sprites

static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	starshp1_state *state = machine.driver_data<starshp1_state>();
	int i;

	for (i = 0; i < 14; i++)
	{
		int code = (state->m_obj_ram[i] & 0xf) ^ 0xf;

		drawgfx_transpen(bitmap, cliprect, machine.gfx[1],
			code % 8,
			code / 8,
			0, 0,
			get_sprite_hpos(state, i),
			get_sprite_vpos(state, i), 0);
	}
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:17,代码来源:starshp1.c


示例4: funystrp_draw_sprites

static void funystrp_draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect)
{
	int i;
	const gfx_element *gfx = machine->gfx[1];

	for (i = 0; i < 0x400; i += 4){
		int sx = splash_spriteram[i+2] & 0x1ff;
		int sy = (240 - (splash_spriteram[i+1] & 0xff)) & 0xff;
		int attr = splash_spriteram[i+3] & 0xff;
		int attr2 = splash_spriteram[i+0x400] >> splash_sprite_attr2_shift;
		int number = (splash_spriteram[i] & 0xff) + (attr & 0xf)*256;

		drawgfx_transpen(bitmap,cliprect,gfx,number,
			(attr2 & 0x7f),attr & 0x40,attr & 0x80,
			sx-8,sy,0);
	}
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:17,代码来源:splash.c


示例5: drawgfx_transpen

UINT32 sbrkout_state::screen_update_sbrkout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT8 *videoram = m_videoram;
	int ball;

	m_bg_tilemap->draw(bitmap, cliprect, 0, 0);

	for (ball = 2; ball >= 0; ball--)
	{
		int code = ((videoram[0x380 + 0x18 + ball * 2 + 1] & 0x80) >> 7);
		int sx = 31 * 8 - videoram[0x380 + 0x10 + ball * 2];
		int sy = 30 * 8 - videoram[0x380 + 0x18 + ball * 2];

		drawgfx_transpen(bitmap, cliprect, machine().gfx[1], code, 0, 0, 0, sx, sy, 0);
	}
	return 0;
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:17,代码来源:sbrkout.c


示例6: machine

UINT32 trvmadns_state::screen_update_trvmadns(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	int x,y,count;
	gfx_element *gfx = machine().gfx[0];

	bitmap.fill(0xd, cliprect);

	count = 0;

	for (y=0;y<32;y++)
	{
		for (x=0;x<32;x++)
		{
			int attr = m_tileram[count*2+0];
			int tile = m_tileram[count*2+1] | ((attr & 0x01) << 8);
			int color = (attr & 0x18) >> 3;
			int flipx = attr & 4;
			int flipy = attr & 2;

			if(!(attr & 0x20))
				drawgfx_opaque(bitmap,cliprect,gfx,tile,color,flipx,flipy,(x*8),(y*8));
			count++;
		}
	}

	count = 0;

	for (y=0;y<32;y++)
	{
		for (x=0;x<32;x++)
		{
			int attr = m_tileram[count*2+0];
			int tile = m_tileram[count*2+1] | ((attr & 0x01) << 8);
			int color = (attr & 0x18) >> 3;
			int flipx = attr & 4;
			int flipy = attr & 2;

			if(attr & 0x20)
				drawgfx_transpen(bitmap,cliprect,gfx,tile,color,flipx,flipy,(x*8),(y*8),1);
			count++;
		}
	}

	return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:45,代码来源:trvmadns.c


示例7: draw_sprites

static void draw_sprites(running_machine &machine, bitmap_t *bitmap,const rectangle *cliprect)
{
	travrusa_state *state = machine.driver_data<travrusa_state>();
	int offs;
	static const rectangle spritevisiblearea =
	{
		1*8, 31*8-1,
		0*8, 24*8-1
	};
	static const rectangle spritevisibleareaflip =
	{
		1*8, 31*8-1,
		8*8, 32*8-1
	};
	rectangle clip = *cliprect;
	if (flip_screen_get(machine))
		sect_rect(&clip, &spritevisibleareaflip);
	else
		sect_rect(&clip, &spritevisiblearea);


	for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
	{
		int sx = ((state->m_spriteram[offs + 3] + 8) & 0xff) - 8;
		int sy = 240 - state->m_spriteram[offs];
		int code = state->m_spriteram[offs + 2];
		int attr = state->m_spriteram[offs + 1];
		int flipx = attr & 0x40;
		int flipy = attr & 0x80;

		if (flip_screen_get(machine))
		{
			sx = 240 - sx;
			sy = 240 - sy;
			flipx = !flipx;
			flipy = !flipy;
		}

		drawgfx_transpen(bitmap, &clip, machine.gfx[1],
				code,
				attr & 0x0f,
				flipx, flipy,
				sx, sy, 0);
	}
}
开发者ID:kkalmaz,项目名称:psmame,代码行数:45,代码来源:travrusa.c


示例8: machine

void drgnmst_state::draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect )
{
	gfx_element *gfx = machine().gfx[0];
	UINT16 *source = m_spriteram;
	UINT16 *finish = source + 0x800 / 2;

	while (source < finish)
	{
		int xpos, ypos, number, flipx, flipy, wide, high;
		int x, y;
		int incx, incy;
		int colr;

		number = source[2];
		xpos = source[0];
		ypos = source[1];
		flipx = source[3] & 0x0020;
		flipy = source[3] & 0x0040;
		wide = (source[3] & 0x0f00) >> 8;
		high = (source[3] & 0xf000) >> 12;
		colr = (source[3] & 0x001f);

		if ((source[3] & 0xff00) == 0xff00) break;


		if (!flipx) { incx = 16;} else { incx = -16; xpos += 16 * wide; }
		if (!flipy) { incy = 16;} else { incy = -16; ypos += 16 * high; }


		for (y = 0; y <= high; y++)
		{
			for (x = 0; x <= wide; x++)
			{
				int realx, realy, realnumber;

				realx = xpos + incx * x;
				realy = ypos + incy * y;
				realnumber = number + x + y * 16;

				drawgfx_transpen(bitmap, cliprect, gfx, realnumber, colr, flipx, flipy, realx, realy, 15);
			}
		}
		source += 4;
	}
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:45,代码来源:drgnmst.c


示例9: draw_sprites

static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT8 *buffered_spriteram = machine.generic.buffered_spriteram.u8;
	int offs;

	/* Draw the sprites. */
	for (offs = machine.generic.spriteram_size-4; offs>=0;offs -= 4)
	{
		/* SPRITES
        =====
        Attribute
        0x80 Code MSB
        0x40 Code MSB
        0x20 Code MSB
        0x10 Colour
        0x08 Colour
        0x04 Colour
        0x02 y Flip
        0x01 X MSB
        */


		int code,colour,sx,sy,flipy;
		int attr = buffered_spriteram[offs+1];
		code = buffered_spriteram[offs];
		code += ( (attr&0xe0) << 3 );
		colour = (attr & 0x1c)>>2;
		sy = buffered_spriteram[offs + 2];
		sx = buffered_spriteram[offs + 3] + 0x100 * ( attr & 0x01);
		flipy = attr & 0x02;

		if (flip_screen_get(machine))
		{
			sx = 496 - sx;
			sy = 240 - sy;
			flipy = !flipy;
		}

		drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
				code,
				colour,
				flip_screen_get(machine),flipy,
				sx, sy,15);
	}
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:45,代码来源:srumbler.c


示例10: draw_sprites

static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &clip)
{
	meadows_state *state = machine.driver_data<meadows_state>();
	UINT8 *spriteram = state->m_spriteram;
	int i;

	for (i = 0; i < 4; i++)
	{
		int x = spriteram[i+0] + SPR_ADJUST_X;
		int y = spriteram[i+4] + SPR_ADJUST_Y;
		int code = spriteram[i+8] & 0x0f;		/* bit #0 .. #3 select sprite */
/*      int bank = (spriteram[i+8] >> 4) & 1;      bit #4 selects prom ???    */
		int bank = i;							/* that fixes it for now :-/ */
		int flip = spriteram[i+8] >> 5;			/* bit #5 flip vertical flag */

		drawgfx_transpen(bitmap, clip, machine.gfx[bank + 1], code, 0, flip, 0, x, y, 0);
	}
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:18,代码来源:meadows.c


示例11: draw_sprites

static void draw_sprites( running_machine* machine, bitmap_t *bitmap, const rectangle *cliprect )
{
	ddragon3_state *state = (ddragon3_state *)machine->driver_data;
	UINT16 *source = state->spriteram;
	UINT16 *finish = source + 0x800;

	while (source < finish)
	{
		UINT16 attr = source[1];

		if (attr & 0x01)	/* enable */
		{
			int i;
			int bank = source[3] & 0xff;
			int code = (source[2] & 0xff) + (bank * 256);
			int color = source[4] & 0xf;
			int flipx = attr & 0x10;
			int flipy = attr & 0x08;
			int sx = source[5] & 0xff;
			int sy = source[0] & 0xff;
			int height = (attr >> 5) & 0x07;

			if (attr & 0x04) sx |= 0x100;
			if (attr & 0x02) sy = 239 + (0x100 - sy); else sy = 240 - sy;
			if (sx > 0x17f) sx = 0 - (0x200 - sx);

			if (flip_screen_get(machine))
			{
				sx = 304 - sx;
				sy = 224 - sy;
				flipx = !flipx;
				flipy = !flipy;
			}

			for (i = 0; i <= height; i++)
			{
				drawgfx_transpen(bitmap, cliprect,
					machine->gfx[1], code + i, color, flipx, flipy,
					sx, sy + (flip_screen_get(machine) ? (i * 16) : (-i * 16)), 0);
			}
		}

		source += 8;
	}
开发者ID:hstampfl,项目名称:mame2010-libretro,代码行数:44,代码来源:ddragon3.c


示例12: draw_sprites

static void draw_sprites(running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int pri)
{
    thoop2_state *state = machine.driver_data<thoop2_state>();
    int j, x, y, ex, ey;
    const gfx_element *gfx = machine.gfx[0];

    static const int x_offset[2] = {0x0,0x2};
    static const int y_offset[2] = {0x0,0x1};

    for (j = 0; j < state->m_sprite_count[pri]; j++) {
        int i = state->m_sprite_table[pri][j];
        int sx = state->m_spriteram[i+2] & 0x01ff;
        int sy = (240 - (state->m_spriteram[i] & 0x00ff)) & 0x00ff;
        int number = state->m_spriteram[i+3];
        int color = (state->m_spriteram[i+2] & 0x7e00) >> 9;
        int attr = (state->m_spriteram[i] & 0xfe00) >> 9;

        int xflip = attr & 0x20;
        int yflip = attr & 0x40;
        int spr_size;

        number |= ((number & 0x03) << 16);

        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_transpen(bitmap,cliprect,gfx,number + x_offset[ex] + y_offset[ey],
                                 color,xflip,yflip,
                                 sx-0x0f+x*8,sy+y*8,0);
            }
        }
    }
}
开发者ID:stuartcarnie,项目名称:MAME-OS-X,代码行数:44,代码来源:thoop2.c


示例13: draw_sprites

static void draw_sprites( running_machine &machine,  bitmap_ind16 &bitmap, const rectangle &cliprect )
{
	bsktball_state *state = machine.driver_data<bsktball_state>();
	int mot;

	for (mot = 0; mot < 16; mot++)
	{
		int pic = state->m_motion[mot * 4];
		int sy = 28 * 8 - state->m_motion[mot * 4 + 1];
		int sx = state->m_motion[mot * 4 + 2];
		int color = state->m_motion[mot * 4 + 3];
		int flipx = (pic & 0x80) >> 7;

		pic = (pic & 0x3f);
		color = (color & 0x3f);

		drawgfx_transpen(bitmap, cliprect, machine.gfx[1], pic, color, flipx, 0, sx, sy, 0);
	}
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:19,代码来源:bsktball.c


示例14: draw_sprites

static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
{
	funybubl_state *state = machine.driver_data<funybubl_state>();
	UINT8 *source = &state->m_banked_vram[0x2000 - 0x20];
	UINT8 *finish = source - 0x1000;

	while (source > finish)
	{
		int xpos, ypos, tile;

		/* the sprites are in the sprite list twice
         the first format (in comments) appears to be a buffer, if you use
         this list you get garbage sprites in 2 player mode
         the second format (used) seems correct

         */
/*
        ypos = 0xff - source[1 + 0x10];
        xpos = source[2 + 0x10];
        tile = source[0 + 0x10] | ( (source[3 + 0x10] & 0x0f) <<8);
        if (source[3 + 0x10] & 0x80) tile += 0x1000;
        if (source[3 + 0x10] & 0x20) xpos += 0x100;
        // bits 0x40 (not used?) and 0x10 (just set during transition period of x co-ord 0xff and 0x00) ...
        xpos -= 8;
        ypos -= 14;

*/
		ypos = source[2];
		xpos = source[3];
		tile = source[0] | ( (source[1] & 0x0f) << 8);
		if (source[1] & 0x80) tile += 0x1000;
		if (source[1] & 0x20)
		{
			if (xpos < 0xe0)
				xpos += 0x100;
		}

		// bits 0x40 and 0x10 not used?...

		drawgfx_transpen(bitmap, cliprect, machine.gfx[1], tile, 0, 0, 0, xpos, ypos, 255);
		source -= 0x20;
	}
}
开发者ID:kleopatra999,项目名称:mess-svn,代码行数:43,代码来源:funybubl.c


示例15: draw_sprites

static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int priority )
{
	tigeroad_state *state = machine.driver_data<tigeroad_state>();
	UINT16 *source = &state->m_spriteram->buffer()[state->m_spriteram->bytes()/2] - 4;
	UINT16 *finish = state->m_spriteram->buffer();

	// TODO: The Track Map should probably be drawn on top of the background tilemap...
	//       Also convert the below into a for loop!

	while (source >= finish)
	{
		int tile_number = source[0];

		if (tile_number != 0xfff) {
			int attr = source[1];
			int sy = source[2] & 0x1ff;
			int sx = source[3] & 0x1ff;

			int flipx = attr & 0x02;
			int flipy = attr & 0x01;
			int color = (attr >> 2) & 0x0f;

			if (sx > 0x100) sx -= 0x200;
			if (sy > 0x100) sy -= 0x200;

			if (state->flip_screen())
			{
				sx = 240 - sx;
				sy = 240 - sy;
				flipx = !flipx;
				flipy = !flipy;
			}

			drawgfx_transpen(bitmap, cliprect,
				machine.gfx[2],
				tile_number,
				color,
				flipx, flipy,
				sx, 240 - sy, 15);
		}

		source -= 4;
	}
开发者ID:kleopatra999,项目名称:mess-svn,代码行数:43,代码来源:tigeroad.c


示例16: drawgfx_transpen

inline void nmk16_state::nmk16_draw_sprite(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority, UINT16 *spr)
{
	if ((spr[0] & 0x0001))
	{
	int sx    = (spr[4] & 0x1FF) + m_videoshift;
	int sy    =  spr[6] & 0x1FF;
	int code  =  spr[3];
	int color =  spr[7];
	int w     =  spr[1] & 0x00F;
	int h     = (spr[1] & 0x0F0) >> 4;
	int pri   = (spr[0] & 0x0C0) >> 6;
	int xx,yy,x;
	int delta = 16;

	if(pri != priority)
		return;

	if (flip_screen())
	{
		sx = 368 - sx;
		sy = 240 - sy;
		delta = -16;
	}

	yy = h;
	do
	{
		x = sx;
		xx = w;
		do
		{
		drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
			code,
			color,
			flip_screen(), flip_screen(),
			((x + 16) & 0x1FF) - 16,sy & 0x1FF,15);
		code++;
		x += delta;
		} while (--xx >= 0);

		sy += delta;
	} while (--yy >= 0);
	}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:43,代码来源:nmk16.c


示例17: SCREEN_UPDATE_IND16

static SCREEN_UPDATE_IND16( laserbat )
{
	laserbat_state *state = screen.machine().driver_data<laserbat_state>();
	int y;

	state->m_bg_tilemap->draw(bitmap, cliprect, 0, 0);

	/* update the S2636 chips */
	bitmap_ind16 &s2636_1_bitmap = s2636_update(state->m_s2636_1, cliprect);
	bitmap_ind16 &s2636_2_bitmap = s2636_update(state->m_s2636_2, cliprect);
	bitmap_ind16 &s2636_3_bitmap = s2636_update(state->m_s2636_3, cliprect);

	/* copy the S2636 images into the main bitmap */
	for (y = cliprect.min_y; y <= cliprect.max_y; y++)
	{
		int x;

		for (x = cliprect.min_x; x <= cliprect.max_x; x++)
		{
			int pixel1 = s2636_1_bitmap.pix16(y, x);
			int pixel2 = s2636_2_bitmap.pix16(y, x);
			int pixel3 = s2636_3_bitmap.pix16(y, x);

			if (S2636_IS_PIXEL_DRAWN(pixel1))
				bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel1);

			if (S2636_IS_PIXEL_DRAWN(pixel2))
				bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel2);

			if (S2636_IS_PIXEL_DRAWN(pixel3))
				bitmap.pix16(y, x) = S2636_PIXEL_COLOR(pixel3);
		}
	}

	if (state->m_sprite_enable)
		drawgfx_transpen(bitmap,cliprect,screen.machine().gfx[1],
		        state->m_sprite_code,
				state->m_sprite_color,
				0,0,
				state->m_sprite_x - 6,state->m_sprite_y,0);

	return 0;
}
开发者ID:LibXenonProject,项目名称:mame-lx,代码行数:43,代码来源:laserbat.c


示例18: draw_sprites

static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int priority )
{
	UINT16 *source = &buffered_spriteram16[spriteram_size/2] - 4;
	UINT16 *finish = buffered_spriteram16;

	// TODO: The Track Map should probably be drawn on top of the background tilemap...
	//       Also convert the below into a for loop!

	while (source >= finish)
	{
		int tile_number = source[0];

		if (tile_number != 0xfff) {
			int attr = source[1];
			int sy = source[2] & 0x1ff;
			int sx = source[3] & 0x1ff;

			int flipx = attr & 0x02;
			int flipy = attr & 0x01;
			int color = (attr >> 2) & 0x0f;

			if (sx > 0x100) sx -= 0x200;
			if (sy > 0x100) sy -= 0x200;

			if (flip_screen_get(machine))
			{
				sx = 240 - sx;
				sy = 240 - sy;
				flipx = !flipx;
				flipy = !flipy;
			}

			drawgfx_transpen(bitmap, cliprect,
				machine->gfx[2],
				tile_number,
				color,
				flipx, flipy,
				sx, 240 - sy, 15);
		}

		source -= 4;
	}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:42,代码来源:tigeroad.c


示例19: drawgfx_transpen

UINT32 sprint2_state::screen_update_sprint2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	UINT8 *video_ram = m_video_ram;
	int i;

	m_bg_tilemap->draw(bitmap, cliprect, 0, 0);

	/* draw the sprites */

	for (i = 0; i < 4; i++)
	{
		drawgfx_transpen(bitmap, cliprect, machine().gfx[1],
			get_sprite_code(video_ram, i),
			i,
			0, 0,
			get_sprite_x(video_ram, i),
			get_sprite_y(video_ram, i), 0);
	}
	return 0;
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:20,代码来源:sprint2.c


示例20: draw_sprites

static void draw_sprites(running_machine *machine, bitmap_t *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_transpen(bitmap,cliprect,gfx,number,
				0x20 + color,xflip,yflip,
				sx - 0x0f,sy,0);
	}
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:20,代码来源:targeth.c



注:本文中的drawgfx_transpen函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ drawstr函数代码示例发布时间:2022-05-30
下一篇:
C++ drawgfx_opaque函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap