本文整理汇总了C++中palette_device::set_pen_color方法的典型用法代码示例。如果您正苦于以下问题:C++ palette_device::set_pen_color方法的具体用法?C++ palette_device::set_pen_color怎么用?C++ palette_device::set_pen_color使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类palette_device
的用法示例。
在下文中一共展示了palette_device::set_pen_color方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: subs_palette
void subs_state::subs_palette(palette_device &palette) const
{
palette.set_pen_color(0, rgb_t(0x00, 0x00, 0x00)); // BLACK - modified on video invert
palette.set_pen_color(1, rgb_t(0xff, 0xff, 0xff)); // WHITE - modified on video invert
palette.set_pen_color(2, rgb_t(0x00, 0x00, 0x00)); // BLACK - modified on video invert
palette.set_pen_color(3, rgb_t(0xff, 0xff, 0xff)); // WHITE - modified on video invert
}
示例2: canyon_palette
void canyon_state::canyon_palette(palette_device &palette) const
{
palette.set_pen_color(0, rgb_t(0x80, 0x80, 0x80)); // GREY
palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); // BLACK
palette.set_pen_color(2, rgb_t(0x80, 0x80, 0x80)); // GREY
palette.set_pen_color(3, rgb_t(0xff, 0xff, 0xff)); // WHITE
}
示例3:
void p2000m_state::p2000m_palette(palette_device &palette) const
{
palette.set_pen_color(0, rgb_t::white()); // white
palette.set_pen_color(1, rgb_t::black()); // black
palette.set_pen_color(2, rgb_t::black()); // black
palette.set_pen_color(3, rgb_t::white()); // white
}
示例4: gamecom_palette
INPUT_PORTS_END
void gamecom_state::gamecom_palette(palette_device &palette) const
{
palette.set_pen_color(0, 0x00, 0x00, 0x00); // Black
palette.set_pen_color(1, 0x0f, 0x4f, 0x2f); // Gray 1
palette.set_pen_color(2, 0x6f, 0x8f, 0x4f); // Gray 2
palette.set_pen_color(3, 0x8f, 0xcf, 0x8f); // Grey 3
palette.set_pen_color(4, 0xdf, 0xff, 0x8f); // White
}
示例5: lazercmd_palette
GFXDECODE_END
void lazercmd_state::lazercmd_palette(palette_device &palette) const
{
palette.set_pen_color(0, rgb_t(0xb0, 0xb0, 0xb0)); // white
palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); // black
palette.set_pen_color(2, rgb_t(0x00, 0x00, 0x00)); // black
palette.set_pen_color(3, rgb_t(0xb0, 0xb0, 0xb0)); // white
palette.set_pen_color(4, rgb_t(0xff, 0xff, 0xff)); // bright white
}
示例6:
INPUT_PORTS_END
//**************************************************************************
// MACHINE EMULATION
//**************************************************************************
void cz101_state::cz101_palette(palette_device &palette) const
{
palette.set_pen_color(0, rgb_t(138, 146, 148)); // background
palette.set_pen_color(1, rgb_t( 92, 83, 88)); // lcd pixel on
palette.set_pen_color(2, rgb_t(131, 136, 139)); // lcd pixel off
}
示例7: alphatro_palette
void alphatro_state::alphatro_palette(palette_device &palette) const
{
// RGB colours
palette.set_pen_color(0, 0x00, 0x00, 0x00);
palette.set_pen_color(1, 0x00, 0x00, 0xff);
palette.set_pen_color(2, 0xff, 0x00, 0x00);
palette.set_pen_color(3, 0xff, 0x00, 0xff);
palette.set_pen_color(4, 0x00, 0xff, 0x00);
palette.set_pen_color(5, 0x00, 0xff, 0xff);
palette.set_pen_color(6, 0xff, 0xff, 0x00);
palette.set_pen_color(7, 0xff, 0xff, 0xff);
// Amber
palette.set_pen_color(8, 0xf7, 0xaa, 0x00);
}
示例8: INPUT_PORTS_START
//.........这里部分代码省略.........
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
PORT_START("IN2")
PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)
PORT_BIT( 0x80, IP_ACTIVE_LOW,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x03, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00)
PORT_DIPSETTING( 0x02, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40)
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00)
PORT_DIPSETTING( 0x08, DEF_STR( 1C_6C ) ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40)
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x10, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0) /* same coinage as COIN1 */
PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "1" )
PORT_DIPSETTING( 0x01, "2" )
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) /* table at 0xd16e (4 * 3 bytes, LSB first) - no multiple bonus lives */
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x02, "30000" )
PORT_DIPSETTING( 0x04, "50000" )
PORT_DIPSETTING( 0x06, DEF_STR( None ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Difficulty ) ) /* code at 0xd188 */
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPNAME( 0x10, 0x00, "Display Strength and Position" )
PORT_DIPSETTING( 0x10, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPNAME( 0x20, 0x00, "Force Coinage = A 1C/3C - B 1C/8C" ) /* SERVICE1 = 2C/1C */
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
PORT_DIPNAME( 0x40, 0x00, "Coin Mode" )
PORT_DIPSETTING( 0x00, "Mode 1" )
PORT_DIPSETTING( 0x40, "Mode 2" )
PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH )
INPUT_PORTS_END
static const gfx_layout charlayout =
{
8,8, /* 8*8 characters */
RGN_FRAC(1,3), /* 512 characters */
3, /* 3 bits per pixel */
{ RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) }, /* the bitplanes are separated */
{ 0, 1, 2, 3, 4, 5, 6, 7 },
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
8*8 /* every char takes 8 consecutive bytes */
};
static GFXDECODE_START( gfx_progolf )
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 8 ) /* sprites */
GFXDECODE_END
void progolf_state::progolf_palette(palette_device &palette) const
{
const uint8_t *color_prom = memregion("proms")->base();
for (int i = 0; i < palette.entries(); i++)
{
int bit0, bit1, bit2;
// red component
bit0 = BIT(color_prom[i], 0);
bit1 = BIT(color_prom[i], 1);
bit2 = BIT(color_prom[i], 2);
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// green component
bit0 = BIT(color_prom[i], 3);
bit1 = BIT(color_prom[i], 4);
bit2 = BIT(color_prom[i], 5);
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// blue component
bit0 = 0;
bit1 = BIT(color_prom[i], 6);
bit2 = BIT(color_prom[i], 7);
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
palette.set_pen_color(i, rgb_t(r, g, b));
}
}
示例9: olibochu_palette
void olibochu_state::olibochu_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0; i < palette.entries(); i++)
{
int bit0, bit1, bit2;
uint8_t const pen = (color_prom[0x20 + i] & 0x0f) | ((i < 0x100) ? 0x10 : 0x00);
// red component
bit0 = BIT(color_prom[pen], 0);
bit1 = BIT(color_prom[pen], 1);
bit2 = BIT(color_prom[pen], 2);
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// green component
bit0 = BIT(color_prom[pen], 3);
bit1 = BIT(color_prom[pen], 4);
bit2 = BIT(color_prom[pen], 5);
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// blue component
bit0 = BIT(color_prom[pen], 6);
bit1 = BIT(color_prom[pen], 7);
int const b = 0x4f * bit0 + 0xa8 * bit1;
palette.set_pen_color(i, rgb_t(r, g, b));
}
}
示例10: lgp_palette
void lgp_state::lgp_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0; i < 0x20; i++)
{
int bit0, bit1, bit2;
// red component
bit0 = 0; //BIT(color_prom[i], 0);
bit1 = BIT(color_prom[i], 0);
bit2 = BIT(color_prom[i], 1);
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// green component
bit0 = 0; //BIT(color_prom[i], 3);
bit1 = BIT(color_prom[i], 2);
bit2 = BIT(color_prom[i], 3);
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// blue component
bit0 = 0; //BIT(color_prom[i], 5);
bit1 = BIT(color_prom[i], 4);
bit2 = BIT(color_prom[i], 5);
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
palette.set_pen_color(i,rgb_t(r,g,b));
}
}
示例11: mogura_palette
void mogura_state::mogura_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0, j = 0; i < 0x20; i++)
{
int bit0, bit1, bit2;
// red component
bit0 = BIT(color_prom[i], 0);
bit1 = BIT(color_prom[i], 1);
bit2 = BIT(color_prom[i], 2);
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// green component
bit0 = BIT(color_prom[i], 3);
bit1 = BIT(color_prom[i], 4);
bit2 = BIT(color_prom[i], 5);
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// blue component
bit0 = 0;
bit1 = BIT(color_prom[i], 6);
bit2 = BIT(color_prom[i], 7);
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
palette.set_pen_color(j, rgb_t(r, g, b));
j += 4;
if (j > 31)
j -= 31;
}
}
示例12: funkybee_palette
void funkybee_state::funkybee_palette(palette_device &palette) const
{
const uint8_t *color_prom = memregion("proms")->base();
// first, the character/sprite palette
for (int i = 0; i < 32; i++)
{
int bit0, bit1, bit2;
// red component
bit0 = BIT(*color_prom, 0);
bit1 = BIT(*color_prom, 1);
bit2 = BIT(*color_prom, 2);
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// green component
bit0 = BIT(*color_prom, 3);
bit1 = BIT(*color_prom, 4);
bit2 = BIT(*color_prom, 5);
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// blue component
bit0 = 0;
bit1 = BIT(*color_prom, 6);
bit2 = BIT(*color_prom, 7);
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
palette.set_pen_color(i, rgb_t(r, g, b));
color_prom++;
}
}
示例13: docastle_palette
void docastle_state::docastle_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
for (int i = 0; i < 256; i++)
{
int bit0, bit1, bit2;
// red component
bit0 = BIT(color_prom[i], 5);
bit1 = BIT(color_prom[i], 6);
bit2 = BIT(color_prom[i], 7);
int const r = 0x23 * bit0 + 0x4b * bit1 + 0x91 * bit2;
// green component
bit0 = BIT(color_prom[i], 2);
bit1 = BIT(color_prom[i], 3);
bit2 = BIT(color_prom[i], 4);
int const g = 0x23 * bit0 + 0x4b * bit1 + 0x91 * bit2;
// blue component
bit0 = 0;
bit1 = BIT(color_prom[i], 0);
bit2 = BIT(color_prom[i], 1);
int const b = 0x23 * bit0 + 0x4b * bit1 + 0x91 * bit2;
/* because the graphics are decoded as 4bpp with the top bit used for transparency
or priority, we create matching 3bpp sets of palette entries, which effectively
ignores the value of the top bit */
palette.set_pen_color(((i & 0xf8) << 1) | 0x00 | (i & 0x07), rgb_t(r, g, b));
palette.set_pen_color(((i & 0xf8) << 1) | 0x08 | (i & 0x07), rgb_t(r, g, b));
}
}
示例14: yiear_palette
void yiear_state::yiear_palette(palette_device &palette) const
{
uint8_t const *color_prom = memregion("proms")->base();
for (int i = 0; i < palette.entries(); i++)
{
int bit0, bit1, bit2;
// red component
bit0 = BIT(*color_prom, 0);
bit1 = BIT(*color_prom, 1);
bit2 = BIT(*color_prom, 2);
int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// green component
bit0 = BIT(*color_prom, 3);
bit1 = BIT(*color_prom, 4);
bit2 = BIT(*color_prom, 5);
int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
// blue component
bit0 = 0;
bit1 = BIT(*color_prom, 6);
bit2 = BIT(*color_prom, 7);
int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
palette.set_pen_color(i, rgb_t(r,g,b));
color_prom++;
}
}
示例15: ettrivia_palette
void ettrivia_state::ettrivia_palette(palette_device &palette) const
{
uint8_t const *const color_prom = memregion("proms")->base();
static constexpr int resistances[2] = { 270, 130 };
// compute the color output resistor weights
double weights[2];
compute_resistor_weights(0, 255, -1.0,
2, resistances, weights, 0, 0,
2, resistances, weights, 0, 0,
0, nullptr, nullptr, 0, 0);
for (int i = 0; i < palette.entries(); i++)
{
int bit0, bit1;
// red component
bit0 = BIT(color_prom[i], 0);
bit1 = BIT(color_prom[i+0x100], 0);
int const r = combine_weights(weights, bit0, bit1);
// green component
bit0 = BIT(color_prom[i], 2);
bit1 = BIT(color_prom[i+0x100], 2);
int const g = combine_weights(weights, bit0, bit1);
// blue component
bit0 = BIT(color_prom[i], 1);
bit1 = BIT(color_prom[i+0x100], 1);
int const b = combine_weights(weights, bit0, bit1);
palette.set_pen_color(bitswap<8>(i,5,7,6,2,1,0,4,3), rgb_t(r, g, b));
}
}