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

C++ MAKE_ARGB函数代码示例

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

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



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

示例1: VIDEO_UPDATE

static VIDEO_UPDATE( alg )
{
	/* composite the video */
	if (!video_skip_this_frame())
	{
		mame_bitmap *vidbitmap;
		rectangle fixedvis = Machine->screen[screen].visarea;
		fixedvis.max_x++;
		fixedvis.max_y++;

		/* first lay down the video data */
		laserdisc_get_video(discinfo, &vidbitmap);
		if (video_texture == NULL)
			video_texture = render_texture_alloc(vidbitmap, NULL, 0, TEXFORMAT_YUY16, NULL, NULL);
		else
			render_texture_set_bitmap(video_texture, vidbitmap, NULL, 0, TEXFORMAT_YUY16);

		/* then overlay the Amiga video */
		if (overlay_texture == NULL)
			overlay_texture = render_texture_alloc(tmpbitmap, &fixedvis, 0, TEXFORMAT_PALETTEA16, NULL, NULL);
		else
			render_texture_set_bitmap(overlay_texture, tmpbitmap, &fixedvis, 0, TEXFORMAT_PALETTEA16);

		/* add both quads to the screen */
		render_screen_add_quad(0, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), video_texture, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));
		render_screen_add_quad(0, 0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), overlay_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
	}

	/* display disc information */
	if (discinfo != NULL)
		popmessage("%s", laserdisc_describe_state(discinfo));

	return 0;
}
开发者ID:broftkd,项目名称:mess-cvs,代码行数:34,代码来源:alg.c


示例2: create_bitmap

static void create_bitmap(running_machine &machine, int player)
{
	int x, y;
	char filename[20];
	rgb_t color = crosshair_colors[player];

	/* if we have a bitmap and texture for this player, kill it */
	if (global.bitmap[player] == NULL)
		global.bitmap[player] = global_alloc(bitmap_argb32);
	machine.render().texture_free(global.texture[player]);

	emu_file crossfile(machine.options().crosshair_path(), OPEN_FLAG_READ);
	if (global.name[player][0] != 0)
	{
		/* look for user specified file */
		sprintf(filename, "%s.png", global.name[player]);
		render_load_png(*global.bitmap[player], crossfile, NULL, filename);
	}
	else
	{
		/* look for default cross?.png in crsshair\game dir */
		sprintf(filename, "cross%d.png", player + 1);
		render_load_png(*global.bitmap[player], crossfile, machine.system().name, filename);

		/* look for default cross?.png in crsshair dir */
		if (!global.bitmap[player]->valid())
			render_load_png(*global.bitmap[player], crossfile, NULL, filename);
	}

	/* if that didn't work, use the built-in one */
	if (!global.bitmap[player]->valid())
	{
		/* allocate a blank bitmap to start with */
		global.bitmap[player]->allocate(CROSSHAIR_RAW_SIZE, CROSSHAIR_RAW_SIZE);
		global.bitmap[player]->fill(MAKE_ARGB(0x00,0xff,0xff,0xff));

		/* extract the raw source data to it */
		for (y = 0; y < CROSSHAIR_RAW_SIZE / 2; y++)
		{
			/* assume it is mirrored vertically */
			UINT32 *dest0 = &global.bitmap[player]->pix32(y);
			UINT32 *dest1 = &global.bitmap[player]->pix32(CROSSHAIR_RAW_SIZE - 1 - y);

			/* extract to two rows simultaneously */
			for (x = 0; x < CROSSHAIR_RAW_SIZE; x++)
				if ((crosshair_raw_top[y * CROSSHAIR_RAW_ROWBYTES + x / 8] << (x % 8)) & 0x80)
					dest0[x] = dest1[x] = MAKE_ARGB(0xff,0x00,0x00,0x00) | color;
		}
	}

	/* create a texture to reference the bitmap */
	global.texture[player] = machine.render().texture_alloc(render_texture::hq_scale);
	global.texture[player]->set_bitmap(*global.bitmap[player], global.bitmap[player]->cliprect(), TEXFORMAT_ARGB32);
}
开发者ID:broftkd,项目名称:mess-svn,代码行数:54,代码来源:crsshair.c


示例3: clip

UINT32 laserdisc_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	// handle the overlay if present
	screen_bitmap &overbitmap = m_overbitmap[m_overindex];
	if (overbitmap.valid() && (!m_overupdate_ind16.isnull() || !m_overupdate_rgb32.isnull()))
	{
		// scale the cliprect to the overlay size
		rectangle clip(m_overclip);
		clip.min_y = cliprect.min_y * overbitmap.height() / bitmap.height();
		if (cliprect.min_y == screen.visible_area().min_y)
			clip.min_y = MIN(clip.min_y, m_overclip.min_y);
		clip.max_y = (cliprect.max_y + 1) * overbitmap.height() / bitmap.height() - 1;

		// call the update callback
		if (!m_overupdate_ind16.isnull())
			m_overupdate_ind16(screen, overbitmap.as_ind16(), clip);
		else
			m_overupdate_rgb32(screen, overbitmap.as_rgb32(), clip);
	}

	// if this is the last update, do the rendering
	if (cliprect.max_y == screen.visible_area().max_y)
	{
		// update the texture with the overlay contents
		if (overbitmap.valid())
			m_overtex->set_bitmap(overbitmap, m_overclip, overbitmap.texformat());

		// get the laserdisc video
		bitmap_yuy16 &vidbitmap = get_video();
		m_videotex->set_bitmap(vidbitmap, vidbitmap.cliprect(), TEXFORMAT_YUY16);

		// reset the screen contents
		screen.container().empty();

		// add the video texture
		if (m_videoenable)
			screen.container().add_quad(0.0f, 0.0f, 1.0f, 1.0f, MAKE_ARGB(0xff,0xff,0xff,0xff), m_videotex, PRIMFLAG_BLENDMODE(BLENDMODE_NONE) | PRIMFLAG_SCREENTEX(1));

		// add the overlay
		if (m_overenable && overbitmap.valid())
		{
			float x0 = 0.5f - 0.5f * m_overscalex + m_overposx;
			float y0 = 0.5f - 0.5f * m_overscaley + m_overposy;
			float x1 = x0 + m_overscalex;
			float y1 = y0 + m_overscaley;
			screen.container().add_quad(x0, y0, x1, y1, MAKE_ARGB(0xff,0xff,0xff,0xff), m_overtex, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_SCREENTEX(1));
		}

		// swap to the next bitmap
		m_overindex = (m_overindex + 1) % ARRAY_LENGTH(m_overbitmap);
	}
	return 0;
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:53,代码来源:laserdsc.c


示例4: create_bitmap

static void create_bitmap(running_machine *machine, int player)
{
    int x, y;
    char filename[20];
    rgb_t color = crosshair_colors[player];

    /* if we have a bitmap for this player, kill it */
    if (global.bitmap[player] != NULL)
        bitmap_free(global.bitmap[player]);

    if (global.name[player][0] != 0)
    {
        /* look for user specified file */
        sprintf(filename, "%s.png", global.name[player]);
        global.bitmap[player] = render_load_png(OPTION_CROSSHAIRPATH, NULL, filename, NULL, NULL);
    }
    else
    {
        /* look for default cross?.png in crsshair\game dir */
        sprintf(filename, "cross%d.png", player + 1);
        global.bitmap[player] = render_load_png(OPTION_CROSSHAIRPATH, machine->gamedrv->name, filename, NULL, NULL);

        /* look for default cross?.png in crsshair dir */
        if (global.bitmap[player] == NULL)
            global.bitmap[player] = render_load_png(OPTION_CROSSHAIRPATH, NULL, filename, NULL, NULL);
    }

    /* if that didn't work, use the built-in one */
    if (global.bitmap[player] == NULL)
    {
        /* allocate a blank bitmap to start with */
        global.bitmap[player] = bitmap_alloc(CROSSHAIR_RAW_SIZE, CROSSHAIR_RAW_SIZE, BITMAP_FORMAT_ARGB32);
        bitmap_fill(global.bitmap[player], NULL, MAKE_ARGB(0x00,0xff,0xff,0xff));

        /* extract the raw source data to it */
        for (y = 0; y < CROSSHAIR_RAW_SIZE / 2; y++)
        {
            /* assume it is mirrored vertically */
            UINT32 *dest0 = BITMAP_ADDR32(global.bitmap[player], y, 0);
            UINT32 *dest1 = BITMAP_ADDR32(global.bitmap[player], CROSSHAIR_RAW_SIZE - 1 - y, 0);

            /* extract to two rows simultaneously */
            for (x = 0; x < CROSSHAIR_RAW_SIZE; x++)
                if ((crosshair_raw_top[y * CROSSHAIR_RAW_ROWBYTES + x / 8] << (x % 8)) & 0x80)
                    dest0[x] = dest1[x] = MAKE_ARGB(0xff,0x00,0x00,0x00) | color;
        }
    }

    /* create a texture to reference the bitmap */
    global.texture[player] = render_texture_alloc(render_texture_hq_scale, NULL);
    render_texture_set_bitmap(global.texture[player], global.bitmap[player], NULL, TEXFORMAT_ARGB32, NULL);
}
开发者ID:i-willh,项目名称:imame4all,代码行数:52,代码来源:crsshair.c


示例5: Ned3DObjectManager

void StatePlaying::initiate()
{
  float farClippingPlane = 2000.0f;

  // Set far clipping plane
  gRenderer.setNearFarClippingPlanes(1.0f,farClippingPlane);    

  m_objects = new Ned3DObjectManager();	
	m_objects->setNumberOfDeadFrames(2);
	m_tetherCamera = new TetherCamera(m_objects);
	
  // Create terrain
  terrain = new Terrain(8,"terrain.xml"); //powers of two for terrain size
  m_objects->spawnTerrain(terrain);
  
  // Load models
  m_objects->setModelManager(gModelManager);
  gModelManager.importXml("models.xml");

  // Loads game objects like the crows, plane, and silo
	resetGame();
  
  // set fog
  gRenderer.setFogEnable(true);
  gRenderer.setFogDistance(farClippingPlane - 1000.0f,farClippingPlane);
  gRenderer.setFogColor(MAKE_ARGB(0,60,180,254));

  // set lights
  gRenderer.setAmbientLightColor(MAKE_ARGB(255,100,100,100));
  gRenderer.setDirectionalLightColor(0XFFFFFFFF);
  Vector3 dir = Vector3(5.0f,-5.0f, 6.0f);
  dir.normalize();
  gRenderer.setDirectionalLightVector(dir);
  	
  // Create water now that we know what camera to use
  float fov = degToRad(gGame.m_currentCam->fov);
  water = new Water(fov, farClippingPlane, "water.xml");
  
  m_objects->spawnWater(water);

	// aquire sounds  
  gSoundManager.setDopplerUnit(1.0f/3.0f); // sound factors
  // get windmill sound
  m_windmillSound = gSoundManager.requestSoundHandle("windmill2.wav");
  m_windmillSoundInstance = gSoundManager.requestInstance(m_windmillSound);  

  // add console commands  
  gConsole.addFunction("camerafollow","",consoleSetFollowCamera);
  gConsole.addFunction("cameratarget","s",consoleSetCameraTarget);
  gConsole.addFunction("godmode","b",consoleGodMode);

}
开发者ID:kmh0237,项目名称:GameProgramming2Project,代码行数:52,代码来源:StatePlaying.cpp


示例6: ChainGetEntry

static BackgroundStatus *b2D_GetStatus(Background2DStack *bck, RenderEffect2D *eff)
{
	u32 i;
	BackgroundStatus *status;
	Chain *stack;

	stack = eff->back_stack;
	if (!stack) return NULL;

	for (i=0; i<ChainGetCount(bck->surfaces_links); i++) {
		status = ChainGetEntry(bck->surfaces_links, i);
		if (status->bind_stack == stack) return status;
	}

	status = malloc(sizeof(BackgroundStatus));
	memset(status, 0, sizeof(BackgroundStatus));
	mx2d_init(status->ctx.transform);
	status->ctx.surface = eff->surface;
	status->ctx.aspect.filled = 1;
	status->ctx.node = bck->node;
	status->ctx.h_texture = &bck->txh;
	status->ctx.is_background = 1;

	status->bind_stack = stack;
	status->ctx.aspect.fill_color = MAKE_ARGB(0, 0, 0, 0);
	ChainAddEntry(bck->surfaces_links, status);
	ChainAddEntry(stack, bck->owner);
	return status;
}
开发者ID:DmitrySigaev,项目名称:DSMedia,代码行数:29,代码来源:background2d.c


示例7: SCREEN_UPDATE

/* VIDEO GOODS */
static SCREEN_UPDATE( lgp )
{
	lgp_state *state = screen->machine().driver_data<lgp_state>();
	int charx, chary;

	/* make color 0 transparent */
	palette_set_color(screen->machine(), 0, MAKE_ARGB(0,0,0,0));

	/* clear */
	bitmap_fill(bitmap, cliprect, 0);

	/* Draw tiles */
	for (charx = 0; charx < 32; charx++)
	{
		for (chary = 0; chary < 32; chary++)
		{
			int current_screen_character = (chary*32) + charx;

			/* Somewhere there's a flag that offsets the tilemap by 0x100*x */
			/* Palette is likely set somewhere as well (tile_control_ram?) */
			drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[0],
					state->m_tile_ram[current_screen_character],
					0,
					0, 0, charx*8, chary*8, 0);
		}
	}

	return 0;
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:30,代码来源:lgp.c


示例8: MAKE_ARGB

/// This must be called everyframe so that the texture coordinates can be
/// updated.
void Water::setupMesh()
{
  /////// Fill the vertex buffer
  if (!m_vertexBuffer->lock()) 
    return;

  float locX, locZ;
  float spacing = dimensions/ (numVertsPerSide - 1);
  float startX = - dimensions / 2.0f;
  float startZ = - dimensions / 2.0f;

  unsigned int color = MAKE_ARGB(alpha * 255, 255,255,255);

  for (int z = 0; z < numVertsPerSide;z++)
    for (int x = 0; x< numVertsPerSide; x++)
    {
      locX = startX + x * spacing;
      locZ = startZ + z * spacing;
      (*m_vertexBuffer)[x + z * numVertsPerSide].p = Vector3(locX, 0.0f, locZ);
      (*m_vertexBuffer)[x + z * numVertsPerSide].u = m_texturePos.x + x * textureScale;
      (*m_vertexBuffer)[x + z * numVertsPerSide].v = m_texturePos.y  + z * textureScale;
      (*m_vertexBuffer)[x + z * numVertsPerSide].argb = color;
    }
    
	m_vertexBuffer->unlock();
}
开发者ID:carussell,项目名称:nvvg,代码行数:28,代码来源:Water.cpp


示例9: auto_bitmap_rgb32_alloc

void ui_menu::init(running_machine &machine)
{
	int x;

	/* initialize the menu stack */
	ui_menu::stack_reset(machine);

	/* create a texture for hilighting items */
	hilight_bitmap = auto_bitmap_rgb32_alloc(machine, 256, 1);
	for (x = 0; x < 256; x++)
	{
		int alpha = 0xff;
		if (x < 25) alpha = 0xff * x / 25;
		if (x > 256 - 25) alpha = 0xff * (255 - x) / 25;
		hilight_bitmap->pix32(0, x) = MAKE_ARGB(alpha,0xff,0xff,0xff);
	}
	hilight_texture = machine.render().texture_alloc();
	hilight_texture->set_bitmap(*hilight_bitmap, hilight_bitmap->cliprect(), TEXFORMAT_ARGB32);

	/* create a texture for arrow icons */
	arrow_texture = machine.render().texture_alloc(render_triangle);

	/* add an exit callback to free memory */
	machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_menu::exit), &machine));
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:25,代码来源:uimenu.c


示例10: MAKE_ARGB

void RendererD3D::DrawPoint(Vector position, Vector color, unsigned int alpha, unsigned int size)
{
	// Need to clear out previous textures so they don't get blended to our triangle
	//HRESULT result = m_pd3dDevice->SetTexture(0, NULL);
	//result = m_pd3dDevice->SetTexture(1, NULL);

	DWORD tmpColor = MAKE_ARGB(255,((unsigned int) color.x * 255),((unsigned int) color.y * 255),((unsigned int) color.z * 255));
	VertV3FDWORDUV0UV1 point[1] = 
	{
		{ position.x, position.y, position.z,0.0f,0.0f,0.0f, tmpColor, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, },
		//{ position.x, position.y, position.z, tmpColor, },
	};

	m_pd3dDevice->SetFVF( D3DFVF_MYVERTEX );
	/*m_pEffect->SetTechnique("PrimitiveShader");
		unsigned int numpasses;
		if(FAILED(m_pEffect->Begin(&numpasses, D3DXFX_DONOTSAVESTATE))){
			MessageBox(NULL, "Failed to begin shader draw", "Error", MB_OK);
			assert("DEAD");
		}

		for(unsigned int i = 0; i<numpasses; ++i){
			if(FAILED(m_pEffect->BeginPass(i))){
				MessageBox(NULL, "Failed to begin pass", "Error", MB_OK);
				assert("DEAD");
			}*/
			m_pd3dDevice->DrawPrimitiveUP(D3DPT_POINTLIST,1, &point, sizeof(VertV3FDWORDUV0UV1));
	
			/*m_pEffect->EndPass();
		}
		m_pEffect->End();	*/
}
开发者ID:sknutson,项目名称:Base_Repo,代码行数:32,代码来源:RendererD3D.cpp


示例11: MIN

void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param)
{
	int halfwidth = dest.width() / 2;
	int height = dest.height();
	int x, y;

	/* start with all-transparent */
	dest.fill(MAKE_ARGB(0x00,0x00,0x00,0x00));

	/* render from the tip to the bottom */
	for (y = 0; y < height; y++)
	{
		int linewidth = (y * (halfwidth - 1) + (height / 2)) * 255 * 2 / height;
		UINT32 *target = &dest.pix32(y, halfwidth);

		/* don't antialias if height < 12 */
		if (dest.height() < 12)
		{
			int pixels = (linewidth + 254) / 255;
			if (pixels % 2 == 0) pixels++;
			linewidth = pixels * 255;
		}

		/* loop while we still have data to generate */
		for (x = 0; linewidth > 0; x++)
		{
			int dalpha;

			/* first column we only consume one pixel */
			if (x == 0)
			{
				dalpha = MIN(0xff, linewidth);
				target[x] = MAKE_ARGB(dalpha,0xff,0xff,0xff);
			}

			/* remaining columns consume two pixels, one on each side */
			else
			{
				dalpha = MIN(0x1fe, linewidth);
				target[x] = target[-x] = MAKE_ARGB(dalpha/2,0xff,0xff,0xff);
			}

			/* account for the weight we consumed */
			linewidth -= dalpha;
		}
	}
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:47,代码来源:uimenu.c


示例12: DRIVER_INIT

static DRIVER_INIT( astdelux )
{
	OVERLAY_START( astdelux_overlay )
		OVERLAY_RECT( 0.0, 0.0, 1.0, 1.0, MAKE_ARGB(0x04,0x88,0xff,0xff) )
	OVERLAY_END

	artwork_set_overlay(astdelux_overlay);
}
开发者ID:libretro,项目名称:mame2003-libretro,代码行数:8,代码来源:asteroid.c


示例13: adjust_palette_entry

INLINE rgb_t adjust_palette_entry(rgb_t entry, float brightness, float contrast, const UINT8 *gamma_map)
{
	int r = rgb_clamp((float)gamma_map[RGB_RED(entry)] * contrast + brightness);
	int g = rgb_clamp((float)gamma_map[RGB_GREEN(entry)] * contrast + brightness);
	int b = rgb_clamp((float)gamma_map[RGB_BLUE(entry)] * contrast + brightness);
	int a = RGB_ALPHA(entry);
	return MAKE_ARGB(a,r,g,b);
}
开发者ID:nitrologic,项目名称:emu,代码行数:8,代码来源:palette.c


示例14: memset

bool sdl_osd_interface::font_get_bitmap(osd_font font, unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
#if !(SDLMAME_SDL2)
	TTF_Font *ttffont;
	SDL_Surface *drawsurf;
	SDL_Color fcol = { 0xff, 0xff, 0xff };
	UINT16 ustr[16];

	ttffont = (TTF_Font *)font;

	memset(ustr,0,sizeof(ustr));
	ustr[0] = (UINT16)chnum;
	drawsurf = TTF_RenderUNICODE_Solid(ttffont, ustr, fcol);

	// was nothing returned?
	if (drawsurf)
	{
		// allocate a MAME destination bitmap
		bitmap.allocate(drawsurf->w, drawsurf->h);

		// copy the rendered character image into it
		for (int y = 0; y < bitmap.height(); y++)
		{
			UINT32 *dstrow = &bitmap.pix32(y);
			UINT8 *srcrow = (UINT8 *)drawsurf->pixels;

			srcrow += (y * drawsurf->pitch);

			for (int x = 0; x < drawsurf->w; x++)
			{
				dstrow[x] = srcrow[x] ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
			}
		}

		// what are these?
		xoffs = yoffs = 0;
		width = drawsurf->w;

		SDL_FreeSurface(drawsurf);
	}

	return bitmap.valid();
#else
	return false;
#endif
}
开发者ID:felipesanches,项目名称:ume,代码行数:46,代码来源:sdlmain.c


示例15: DRIVER_INIT

static DRIVER_INIT( redbaron )
{
	OVERLAY_START( redbaron_overlay )
		OVERLAY_RECT( 0.0, 0.0, 1.0, 1.0, MAKE_ARGB(0x04,0x88,0xff,0xff) )
	OVERLAY_END

	artwork_set_overlay(redbaron_overlay);
}
开发者ID:Sunoo,项目名称:nonamemame,代码行数:8,代码来源:bzone.c


示例16: map_attr_to_fg_bg

INLINE void map_attr_to_fg_bg(unsigned char attr, rgb_t *fg, rgb_t *bg)
{

	*bg = MAKE_ARGB(0xff,0xff,0xff,0xff);
	*fg = MAKE_ARGB(0xff,0x00,0x00,0x00);

	if(attr & DCA_ANCILLARY)
		*bg = MAKE_ARGB(0xff,0xe0,0xe0,0xe0);
	if(attr & DCA_SELECTED) {
		*bg = MAKE_ARGB(0xff,0xff,0x80,0x80);
	}
	if(attr & DCA_CURRENT) {
		*bg = MAKE_ARGB(0xff,0xff,0xff,0x00);
	}
	if(attr & DCA_CHANGED) {
		*fg = MAKE_ARGB(0xff,0xff,0x00,0x00);
	}
	if(attr & DCA_INVALID) {
		*fg = MAKE_ARGB(0xff,0x00,0x00,0xff);
	}
	if(attr & DCA_DISABLED) {
		*fg = MAKE_ARGB(RGB_ALPHA(*fg),
				(RGB_RED(*fg)+RGB_RED(*bg)) >> 1,
				(RGB_GREEN(*fg)+RGB_GREEN(*bg)) >> 1,
				(RGB_BLUE(*fg)+RGB_BLUE(*bg)) >> 1);
	}
开发者ID:johkelly,项目名称:MAME_hi,代码行数:26,代码来源:debugint.c


示例17: VIDEO_START_MEMBER

VIDEO_START_MEMBER(alg_state,alg)
{
	/* standard video start */
	VIDEO_START_CALL_MEMBER(amiga);

	/* configure pen 4096 as transparent in the renderer and use it for the genlock color */
	palette_set_color(machine(), 4096, MAKE_ARGB(0,0,0,0));
	amiga_set_genlock_color(machine(), 4096);
}
开发者ID:dezi,项目名称:mame-libretro-odroid,代码行数:9,代码来源:alg.c


示例18: palette_set_color

void hp48_state::palette_init()
{
	int i;
	for ( i = 0; i < 255; i++ )
	{
		float c = i/255.;
		palette_set_color( machine(), i, MAKE_ARGB( 0, mix2(0,c), mix2(1,c), mix2(2,c) ) );
	}
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:9,代码来源:hp48.c


示例19: dview_draw_size

static void dview_draw_size(DView *dv)
{
	rectangle r;

	dview_get_rect(dv, RECT_DVIEW_SIZE, &r);

	dview_draw_outlined_box(dv, RECT_DVIEW_SIZE, 0, 0,
			rect_get_width(&r),rect_get_height(&r), MAKE_ARGB(0xff, 0xff, 0xff, 0x00));
}
开发者ID:johkelly,项目名称:MAME_hi,代码行数:9,代码来源:debugint.c


示例20: DRIVER_INIT

static DRIVER_INIT( redbaron )
{
	OVERLAY_START( redbaron_overlay )
		OVERLAY_RECT( 0.0, 0.0, 1.0, 1.0, MAKE_ARGB(0x04,0x88,0xff,0xff) )
	OVERLAY_END

	artwork_set_overlay(redbaron_overlay);
	state_save_register_global(analog_data);
	state_save_register_global(rb_input_select);
}
开发者ID:BirchJD,项目名称:xmame-0.103-RPi,代码行数:10,代码来源:bzone.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MAKE_CLASS函数代码示例发布时间:2022-05-30
下一篇:
C++ MAKEWPARAM函数代码示例发布时间: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