本文整理汇总了C++中MAKE_RGB函数的典型用法代码示例。如果您正苦于以下问题:C++ MAKE_RGB函数的具体用法?C++ MAKE_RGB怎么用?C++ MAKE_RGB使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAKE_RGB函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: memset
void nubus_procolor816_device::device_reset()
{
m_count = 0;
m_clutoffs = 0;
m_vbl_disable = 1;
m_mode = 3;
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
m_palette[0] = MAKE_RGB(255, 255, 255);
m_palette[0x80] = MAKE_RGB(0, 0, 0);
}
示例2: palette_set_color
GFXDECODE_END
void lazercmd_state::palette_init()
{
palette_set_color(machine(), 0, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
palette_set_color(machine(), 2, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
palette_set_color(machine(), 3, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
palette_set_color(machine(), 4, MAKE_RGB(0xff, 0xff, 0xff)); /* bright white */
}
示例3: memset
void nubus_radiustpd_device::device_reset()
{
m_count = 0;
m_clutoffs = 0;
m_vbl_disable = 1;
m_mode = 0;
memset(m_vram, 0, VRAM_SIZE);
memset(m_palette, 0, sizeof(m_palette));
m_palette[1] = MAKE_RGB(255, 255, 255);
m_palette[0] = MAKE_RGB(0, 0, 0);
}
示例4: PALETTE_INIT
GFXDECODE_END
static PALETTE_INIT( lazercmd )
{
palette_set_color(machine, 0, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
palette_set_color(machine, 1, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
palette_set_color(machine, 2, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
palette_set_color(machine, 3, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
palette_set_color(machine, 4, MAKE_RGB(0xff, 0xff, 0xff)); /* bright white */
}
示例5: AddDebugBone
void AddDebugBone( const Mth::Vector& p1, const Mth::Vector& p2, float red, float green, float blue )
{
#ifdef __DEBUG_CODE__
// GJ: Pretty much the same as AddDebugLine, but with
// a more convenient interface for the skeleton code
Gfx::AddDebugLine( p1, p2,
MAKE_RGB( (int)(red * 255), (int)(green * 255), (int)(blue * 255) ),
MAKE_RGB( (int)(red * 255), (int)(green * 255), (int)(blue * 255) ),
1 );
#endif
}
示例6: palette_set_color
INPUT_PORTS_END
/***************************************************************************
PALETTE
***************************************************************************/
void apricot_state::palette_init()
{
palette_set_color(machine(), 0, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x7f, 0x00)); /* low intensity */
palette_set_color(machine(), 2, MAKE_RGB(0x00, 0xff, 0x00)); /* high intensitiy */
}
示例7: palette_set_color
INPUT_PORTS_END
//**************************************************************************
// VIDEO
//**************************************************************************
void portfolio_state::palette_init()
{
palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
}
示例8: PALETTE_INIT
INPUT_PORTS_END
/***************************************************************************
PALETTE
***************************************************************************/
static PALETTE_INIT( apricot )
{
palette_set_color(machine, 0, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
palette_set_color(machine, 1, MAKE_RGB(0x00, 0x7f, 0x00)); /* low intensity */
palette_set_color(machine, 2, MAKE_RGB(0x00, 0xff, 0x00)); /* high intensitiy */
}
示例9: MAKE_RGB
void uv201_device::initialize_palette()
{
UINT8 offlointensity = 0x00;
UINT8 offhiintensity = 0xc0;
UINT8 onlointensity = 0xa0;
UINT8 onhiintensity = 0xff;
for (int i = 0; i < 4; i++)
{
int offset = i * 8;
UINT8 onvalue, offvalue;
if (offset < 16)
{
offvalue = offlointensity;
onvalue = onlointensity;
}
else
{
offvalue = offhiintensity;
onvalue = onhiintensity;
}
m_palette[offset + 0] = MAKE_RGB(offvalue, offvalue, offvalue); // black
m_palette[offset + 1] = MAKE_RGB(onvalue, offvalue, offvalue); // red
m_palette[offset + 2] = MAKE_RGB(offvalue, onvalue, offvalue); // green
m_palette[offset + 3] = MAKE_RGB(onvalue, onvalue, offvalue); // red-green
m_palette[offset + 4] = MAKE_RGB(offvalue, offvalue, onvalue); // blue
m_palette[offset + 5] = MAKE_RGB(onvalue, offvalue, onvalue); // red-blue
m_palette[offset + 6] = MAKE_RGB(offvalue, onvalue, onvalue); // green-blue
m_palette[offset + 7] = MAKE_RGB(onvalue, onvalue, onvalue); // white
}
}
示例10: gfxset_draw_item
static void gfxset_draw_item(running_machine &machine, gfx_element *gfx, int index, bitmap_rgb32 &bitmap, int dstx, int dsty, int color, int rotate)
{
static const pen_t default_palette[] =
{
MAKE_RGB(0,0,0), MAKE_RGB(0,0,255), MAKE_RGB(0,255,0), MAKE_RGB(0,255,255),
MAKE_RGB(255,0,0), MAKE_RGB(255,0,255), MAKE_RGB(255,255,0), MAKE_RGB(255,255,255)
};
int width = (rotate & ORIENTATION_SWAP_XY) ? gfx->height() : gfx->width();
int height = (rotate & ORIENTATION_SWAP_XY) ? gfx->width() : gfx->height();
const rgb_t *palette = (machine.total_colors() != 0) ? palette_entry_list_raw(machine.palette) : NULL;
UINT32 palette_mask = ~0;
int x, y;
if (palette != NULL)
palette += gfx->colorbase() + color * gfx->granularity();
else
{
palette = default_palette;
palette_mask = 7;
}
/* loop over rows in the cell */
for (y = 0; y < height; y++)
{
UINT32 *dest = &bitmap.pix32(dsty + y, dstx);
const UINT8 *src = gfx->get_data(index);
/* loop over columns in the cell */
for (x = 0; x < width; x++)
{
int effx = x, effy = y;
const UINT8 *s;
/* compute effective x,y values after rotation */
if (!(rotate & ORIENTATION_SWAP_XY))
{
if (rotate & ORIENTATION_FLIP_X)
effx = gfx->width() - 1 - effx;
if (rotate & ORIENTATION_FLIP_Y)
effy = gfx->height() - 1 - effy;
}
else
{
int temp;
if (rotate & ORIENTATION_FLIP_X)
effx = gfx->height() - 1 - effx;
if (rotate & ORIENTATION_FLIP_Y)
effy = gfx->width() - 1 - effy;
temp = effx; effx = effy; effy = temp;
}
/* get a pointer to the start of this source row */
s = src + effy * gfx->rowbytes();
/* extract the pixel */
*dest++ = 0xff000000 | palette[s[effx] & palette_mask];
}
}
}
示例11: qt_convert_NV21_to_ARGB32
void qt_convert_NV21_to_ARGB32(const uchar *yuv, quint32 *rgb, int width, int height)
{
const uchar *y0 = yuv;
const uchar *y1 = yuv + width;
const uchar *vu = yuv + width * height;
quint32 *rgb0 = rgb;
quint32 *rgb1 = rgb + width;
for (int i = 0; i < height; i += 2) {
for (int j = 0; j < width; j += 2) {
int v = *vu++;
int u = *vu++;
int ruv = coefficientsRV[v] >> 15;
int guv = (coefficientsGU[u] + coefficientsGV[v]) >> 15;
int buv = coefficientsBU[u] >> 15;
int y = coefficientsY[*y0++] >> 15;
int r = y + ruv;
int g = y + guv;
int b = y + buv;
*rgb0++ = MAKE_RGB(r, g, b);
y = coefficientsY[*y0++] >> 15;
r = y + ruv;
g = y + guv;
b = y + buv;
*rgb0++ = MAKE_RGB(r, g, b);
y = coefficientsY[*y1++] >> 15;
r = y + ruv;
g = y + guv;
b = y + buv;
*rgb1++ = MAKE_RGB(r, g, b);
y = coefficientsY[*y1++] >> 15;
r = y + ruv;
g = y + guv;
b = y + buv;
*rgb1++ = MAKE_RGB(r, g, b);
}
rgb0 += width;
rgb1 += width;
y0 += width;
y1 += width;
}
}
示例12: PALETTE_INIT
INPUT_PORTS_END
//**************************************************************************
// VIDEO
//**************************************************************************
//-------------------------------------------------
// PALETTE_INIT( portfolio )
//-------------------------------------------------
static PALETTE_INIT( portfolio )
{
palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
}
示例13: memregion
void strnskil_state::palette_init()
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
/* allocate the colortable */
machine().colortable = colortable_alloc(machine(), 0x100);
/* create a lookup table for the palette */
for (i = 0; i < 0x100; i++)
{
int r = pal4bit(color_prom[i + 0x000]);
int g = pal4bit(color_prom[i + 0x100]);
int b = pal4bit(color_prom[i + 0x200]);
colortable_palette_set_color(machine().colortable, i, MAKE_RGB(r, g, b));
}
/* color_prom now points to the beginning of the lookup table */
color_prom += 0x300;
/* sprites lookup table */
for (i = 0; i < 0x400; i++)
{
UINT8 ctabentry = color_prom[i];
colortable_entry_set_value(machine().colortable, i, ctabentry);
}
}
示例14: get_safe_token
const pen_t *tlc34076_get_pens(device_t *device)
{
tlc34076_state *state = get_safe_token(device);
offs_t i;
for (i = 0; i < 0x100; i++)
{
int r, g, b;
if ((i & state->regs[PIXEL_READ_MASK]) == i)
{
r = state->local_paletteram[3 * i + 0];
g = state->local_paletteram[3 * i + 1];
b = state->local_paletteram[3 * i + 2];
if (state->dacbits == 6)
{
r = pal6bit(r);
g = pal6bit(g);
b = pal6bit(b);
}
}
else
{
r = 0;
g = 0;
b = 0;
}
state->pens[i] = MAKE_RGB(r, g, b);
}
return state->pens;
}
示例15: memregion
/***************************************************************************
Convert the color PROMs into a more useable format.
Mat Mania is unusual in that it has both PROMs and RAM to control the
palette. PROMs are used for characters and background tiles, RAM for
sprites.
I don't know for sure how the PROMs are connected to the RGB output,
but it's probably the usual:
bit 7 -- 220 ohm resistor -- GREEN
-- 470 ohm resistor -- GREEN
-- 1 kohm resistor -- GREEN
-- 2.2kohm resistor -- GREEN
-- 220 ohm resistor -- RED
-- 470 ohm resistor -- RED
-- 1 kohm resistor -- RED
bit 0 -- 2.2kohm resistor -- RED
bit 3 -- 220 ohm resistor -- BLUE
-- 470 ohm resistor -- BLUE
-- 1 kohm resistor -- BLUE
bit 0 -- 2.2kohm resistor -- BLUE
***************************************************************************/
void matmania_state::palette_init()
{
const UINT8 *color_prom = memregion("proms")->base();
int i;
for (i = 0; i < 64; i++)
{
int bit0, bit1, bit2, bit3, r, g, b;
bit0 = BIT(color_prom[0], 0);
bit1 = BIT(color_prom[0], 1);
bit2 = BIT(color_prom[0], 2);
bit3 = BIT(color_prom[0], 3);
r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
bit0 = BIT(color_prom[0], 4);
bit1 = BIT(color_prom[0], 5);
bit2 = BIT(color_prom[0], 6);
bit3 = BIT(color_prom[0], 7);
g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
bit0 = BIT(color_prom[64], 0);
bit1 = BIT(color_prom[64], 1);
bit2 = BIT(color_prom[64], 2);
bit3 = BIT(color_prom[64], 3);
b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
palette_set_color(machine(),i,MAKE_RGB(r,g,b));
color_prom++;
}
}