本文整理汇总了C++中draw_sprites函数的典型用法代码示例。如果您正苦于以下问题:C++ draw_sprites函数的具体用法?C++ draw_sprites怎么用?C++ draw_sprites使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了draw_sprites函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: popmessage
uint32_t wyvernf0_state::screen_update_wyvernf0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int layers_ctrl = -1;
#ifdef MAME_DEBUG
if (machine().input().code_pressed(KEYCODE_Z))
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_Q)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_W)) msk |= 2;
if (machine().input().code_pressed(KEYCODE_A)) msk |= 4;
if (machine().input().code_pressed(KEYCODE_S)) msk |= 8;
if (msk != 0) layers_ctrl &= msk;
popmessage("fg:%02x %02x bg:%02x %02x ROM:%02x RAM:%02x",
m_scrollram[0],m_scrollram[1],m_scrollram[2],m_scrollram[3],
m_rombank, m_rambank
);
}
#endif
m_fg_tilemap->set_scrollx(0, m_scrollram[0]);
m_fg_tilemap->set_scrolly(0, m_scrollram[1]);
m_bg_tilemap->set_scrollx(0, m_scrollram[2]);
m_bg_tilemap->set_scrolly(0, m_scrollram[3]);
bitmap.fill(0, cliprect);
// background monitor
if (layers_ctrl & 1) m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 4) draw_sprites(bitmap, cliprect, false);
// foreground monitor
if (layers_ctrl & 8) draw_sprites(bitmap, cliprect, true);
if (layers_ctrl & 2) m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
开发者ID:Robbbert,项目名称:store1,代码行数:39,代码来源:wyvernf0.cpp
示例2: draw_sprites
UINT32 triplhnt_state::screen_update_triplhnt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->mark_all_dirty();
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
draw_sprites(bitmap, cliprect);
address_space &space = machine().driver_data()->generic_space();
m_discrete->write(space, TRIPLHNT_BEAR_ROAR_DATA, m_playfield_ram[0xfa] & 15);
m_discrete->write(space, TRIPLHNT_SHOT_DATA, m_playfield_ram[0xfc] & 15);
return 0;
}
开发者ID:NULUSIOS,项目名称:mame,代码行数:13,代码来源:triplhnt.cpp
示例3: draw_sprites
UINT32 stuntair_state::screen_update_stuntair(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->set_scrollx(0, m_bg_xscroll);
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
m_fg_tilemap->draw(bitmap, cliprect, 0, TILEMAP_PIXEL_LAYER0);
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(bitmap, cliprect, 0, TILEMAP_PIXEL_LAYER1|TILEMAP_DRAW_OPAQUE);
return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:13,代码来源:stuntair.c
示例4: thoop2_sort_sprites
UINT32 thoop2_state::screen_update_thoop2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* set scroll registers */
m_pant[0]->set_scrolly(0, m_vregs[0]);
m_pant[0]->set_scrollx(0, m_vregs[1]+4);
m_pant[1]->set_scrolly(0, m_vregs[2]);
m_pant[1]->set_scrollx(0, m_vregs[3]);
thoop2_sort_sprites();
bitmap.fill(0, cliprect );
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 3,0);
draw_sprites(bitmap,cliprect,3);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 3,0);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 2,0);
draw_sprites(bitmap,cliprect,2);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 2,0);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 1,0);
draw_sprites(bitmap,cliprect,1);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 1,0);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1 | 0,0);
draw_sprites(bitmap,cliprect,0);
m_pant[1]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0,0);
m_pant[0]->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0 | 0,0);
draw_sprites(bitmap,cliprect,4);
return 0;
}
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:39,代码来源:thoop2.c
示例5: draw_sprites
UINT32 canyon_state::screen_update_canyon(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(bitmap, cliprect);
draw_bombs(bitmap, cliprect);
/* watchdog is disabled during service mode */
machine().watchdog_enable(!(ioport("IN2")->read() & 0x10));
return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:13,代码来源:canyon.c
示例6: draw_bitmap
UINT32 splash_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* set scroll registers */
m_bg_tilemap[0]->set_scrolly(0, m_vregs[0]);
m_bg_tilemap[1]->set_scrolly(0, m_vregs[1]);
draw_bitmap(bitmap, cliprect);
m_bg_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0);
draw_sprites(bitmap, cliprect);
m_bg_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
开发者ID:NULUSIOS,项目名称:mame,代码行数:13,代码来源:splash.c
示例7: draw_sprites
uint32_t witch_state::screen_update_witch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_gfx1_tilemap->set_scrollx(0, m_scrollx-7 ); //offset to have it aligned with the sprites
m_gfx1_tilemap->set_scrolly(0, m_scrolly+8 );
m_gfx1_tilemap->draw(screen, bitmap, cliprect, 0,0);
m_gfx0a_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap, cliprect);
m_gfx0b_tilemap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}
开发者ID:Robbbert,项目名称:store1,代码行数:13,代码来源:witch.cpp
示例8: draw_sprites
uint32_t tail2nos_state::screen_update_tail2nos(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_video_enable)
{
m_k051316->zoom_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
draw_sprites(bitmap, cliprect);
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
}
else
bitmap.fill(0, cliprect);
return 0;
}
开发者ID:Robbbert,项目名称:store1,代码行数:13,代码来源:tail2nos.cpp
示例9: draw_sprites
UINT32 stlforce_state::screen_update_stlforce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int i;
if (m_vidattrram[6] & 1)
{
for(i=0;i<256;i++)
m_bg_tilemap->set_scrollx(i, m_bg_scrollram[i]+9); //+9 for twinbrat
}
else
{
for(i=0;i<256;i++)
m_bg_tilemap->set_scrollx(i, m_bg_scrollram[0]+9); //+9 for twinbrat
}
if (m_vidattrram[6] & 4)
{
for(i=0;i<256;i++)
m_mlow_tilemap->set_scrollx(i, m_mlow_scrollram[i]+8);
}
else
{
for(i=0;i<256;i++)
m_mlow_tilemap->set_scrollx(i, m_mlow_scrollram[0]+8);
}
if (m_vidattrram[6] & 0x10)
{
for(i=0;i<256;i++)
m_mhigh_tilemap->set_scrollx(i, m_mhigh_scrollram[i]+8);
}
else
{
for(i=0;i<256;i++)
m_mhigh_tilemap->set_scrollx(i, m_mhigh_scrollram[0]+8);
}
m_bg_tilemap->set_scrolly(0, m_vidattrram[1]);
m_mlow_tilemap->set_scrolly(0, m_vidattrram[2]);
m_mhigh_tilemap->set_scrolly(0, m_vidattrram[3]);
m_tx_tilemap->set_scrollx(0, m_vidattrram[0]+8);
m_tx_tilemap->set_scrolly(0,m_vidattrram[4]);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
m_mlow_tilemap->draw(screen, bitmap, cliprect, 0,0);
m_mhigh_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
m_tx_tilemap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:51,代码来源:stlforce.c
示例10: draw_sprites
UINT32 wwfwfest_state::screen_update_wwfwfest(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_pri == 0x78) {
m_fg_tilemap->set_scrolly(0, m_fg_scrolly );
m_fg_tilemap->set_scrollx(0, m_fg_scrollx + m_bg0_dx);
m_bg_tilemap->set_scrolly(0, m_bg_scrolly );
m_bg_tilemap->set_scrollx(0, m_bg_scrollx + m_bg1_dx[0]);
} else {
m_bg_tilemap->set_scrolly(0, m_fg_scrolly );
m_bg_tilemap->set_scrollx(0, m_fg_scrollx + m_bg1_dx[1]);
m_fg_tilemap->set_scrolly(0, m_bg_scrolly );
m_fg_tilemap->set_scrollx(0, m_bg_scrollx + m_bg0_dx);
}
/* todo : which bits of pri are significant to the order */
if (m_pri == 0x7b) {
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
}
if (m_pri == 0x7c) {
m_fg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
draw_sprites(bitmap,cliprect);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
}
if (m_pri == 0x78) {
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
}
m_fg0_tilemap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}
开发者ID:NULUSIOS,项目名称:mame,代码行数:38,代码来源:ddragon3.c
示例11: draw_sprites
UINT32 kyugo_state::screen_update_kyugo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_flipscreen)
m_bg_tilemap->set_scrollx(0, -(m_scroll_x_lo + (m_scroll_x_hi * 256)));
else
m_bg_tilemap->set_scrollx(0, m_scroll_x_lo + (m_scroll_x_hi * 256));
m_bg_tilemap->set_scrolly(0, m_scroll_y);
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(bitmap, cliprect, 0, 0);
return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:14,代码来源:kyugo.c
示例12: draw_sprites
UINT32 gunbustr_state::screen_update_gunbustr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
UINT8 layer[5];
UINT16 priority;
static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0};
m_tc0480scp->tilemap_update();
priority = m_tc0480scp->get_bg_priority();
layer[0] = (priority & 0xf000) >> 12; /* tells us which bg layer is bottom */
layer[1] = (priority & 0x0f00) >> 8;
layer[2] = (priority & 0x00f0) >> 4;
layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */
layer[4] = 4; /* text layer always over bg layers */
screen.priority().fill(0, cliprect);
/* We have to assume 2nd to bottom layer is always underneath
sprites as pdrawgfx cannot yet cope with more than 4 layers */
#ifdef MAME_DEBUG
if (!machine().input().code_pressed (KEYCODE_Z)) m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[0],TILEMAP_DRAW_OPAQUE, 0);
if (!machine().input().code_pressed (KEYCODE_X)) m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 1);
if (!machine().input().code_pressed (KEYCODE_C)) m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 2);
if (!machine().input().code_pressed (KEYCODE_V)) m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[3], 0, 4);
if (!machine().input().code_pressed (KEYCODE_B)) m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[4], 0, 8);
if (!machine().input().code_pressed (KEYCODE_N)) draw_sprites(screen, bitmap, cliprect, primasks, 48, -116);
#else
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[0], TILEMAP_DRAW_OPAQUE, 0);
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 1);
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 2);
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[3], 0, 4);
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[4], 0, 8); /* text layer */
draw_sprites(screen, bitmap, cliprect, primasks, 48, -116);
#endif
return 0;
}
开发者ID:NULUSIOS,项目名称:mame,代码行数:37,代码来源:gunbustr.cpp
示例13: handle_visible_line_without_cache
static void handle_visible_line_without_cache(raster_t *raster)
{
geometry_t *geometry;
raster_cache_t *cache;
geometry = raster->geometry;
/* If screen is scrolled to the right, we need to fill with the
background color the blank part on the left. */
fill_background(raster);
/* Draw the graphics and sprites. */
raster_modes_draw_line(raster->modes, raster_line_get_real_mode(raster));
draw_sprites(raster);
raster_line_draw_borders(raster);
cache = &raster->cache[raster->current_line];
if (raster->dont_cache
|| (raster->sprite_status != NULL
&& raster->sprite_status->dma_msk != 0)
|| cache->is_dirty
|| cache->blank
|| cache->border_color != raster->border_color
/* FIXME: Done differently in another place. */
|| cache->open_right_border != raster->open_right_border
|| cache->open_left_border != raster->open_left_border
|| cache->idle_background_color != raster->idle_background_color
|| cache->xsmooth_color != raster->xsmooth_color) {
cache->blank = 0;
cache->is_dirty = 0;
cache->border_color = raster->border_color;
cache->open_right_border = raster->open_right_border;
cache->open_left_border = raster->open_left_border;
cache->xsmooth_color = raster->xsmooth_color;
cache->idle_background_color = raster->idle_background_color;
add_line_to_area(raster->update_area, map_current_line_to_area(raster),
0, raster->geometry->screen_size.width - 1);
} else {
/* Still do some minimal caching anyway. */
/* Only update the part between the borders. */
add_line_to_area(raster->update_area, map_current_line_to_area(raster),
geometry->gfx_position.x,
geometry->gfx_position.x
+ geometry->gfx_size.width - 1);
}
}
开发者ID:SMTDDR,项目名称:droidsound,代码行数:49,代码来源:raster-line.c
示例14: draw_sky
uint32_t buggychl_state::screen_update_buggychl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_sky_on)
draw_sky(bitmap, cliprect);
else
bitmap.fill(0x20, cliprect); // stage 3 disables sky, wants background pen to be blue
draw_bg(bitmap, cliprect);
draw_sprites(bitmap, cliprect);
draw_fg(bitmap, cliprect);
return 0;
}
开发者ID:MASHinfo,项目名称:mame,代码行数:15,代码来源:buggychl.cpp
示例15: VIDEO_UPDATE
static VIDEO_UPDATE(bestleag)
{
tilemap_set_scrollx(bg_tilemap,0,(bestleag_vregs[0x00/2] & 0xfff) + (bestleag_vregs[0x08/2] & 0x7) - 3);
tilemap_set_scrolly(bg_tilemap,0,bestleag_vregs[0x02/2]);
tilemap_set_scrollx(tx_tilemap,0,bestleag_vregs[0x04/2]);
tilemap_set_scrolly(tx_tilemap,0,bestleag_vregs[0x06/2]);
tilemap_set_scrollx(fg_tilemap,0,bestleag_vregs[0x08/2] & 0xfff8);
tilemap_set_scrolly(fg_tilemap,0,bestleag_vregs[0x0a/2]);
tilemap_draw(bitmap,cliprect,bg_tilemap,0,0);
tilemap_draw(bitmap,cliprect,fg_tilemap,0,0);
draw_sprites(screen->machine,bitmap,cliprect);
tilemap_draw(bitmap,cliprect,tx_tilemap,0,0);
return 0;
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:15,代码来源:bestleag.c
示例16: draw_sprites
UINT32 clshroad_state::screen_update_clshroad(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int scrollx = m_vregs[ 0 ] + (m_vregs[ 1 ] << 8);
// int priority = m_vregs[ 2 ];
/* Only horizontal scrolling (these 2 layers use the same value) */
m_tilemap_0a->set_scrollx(0, scrollx);
m_tilemap_0b->set_scrollx(0, scrollx);
m_tilemap_0a->draw(bitmap, cliprect, 0,0); // Opaque
m_tilemap_0b->draw(bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
m_tilemap_1->draw(bitmap, cliprect, 0,0);
return 0;
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:15,代码来源:clshroad.c
示例17: draw_sprites
UINT32 vball_state::screen_update_vb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int i;
m_bg_tilemap->set_scrolly(0,m_vb_scrolly_hi + *m_vb_scrolly_lo);
/*To get linescrolling to work properly, we must ignore the 1st two scroll values, no idea why! -SJE */
for (i = 2; i < 256; i++) {
m_bg_tilemap->set_scrollx(i,m_vb_scrollx[i-2]);
//logerror("scrollx[%d] = %d\n",i,m_vb_scrollx[i]);
}
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
return 0;
}
开发者ID:antervud,项目名称:MAMEHub,代码行数:15,代码来源:vball.c
示例18: draw_sprites
UINT32 sslam_state::screen_update_powerbls(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (!(m_regs[6] & 1))
{
bitmap.fill(get_black_pen(machine()), cliprect);
return 0;
}
m_bg_tilemap->set_scrollx(0, m_regs[0]+21);
m_bg_tilemap->set_scrolly(0, m_regs[1]-240);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
return 0;
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:15,代码来源:sslam.c
示例19: draw_sprites
UINT32 sf_state::screen_update_sf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
if (m_sf_active & 0x20)
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
else
bitmap.fill(0, cliprect);
m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
if (m_sf_active & 0x80)
draw_sprites(bitmap, cliprect);
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
开发者ID:Archlogic,项目名称:libretro-mame,代码行数:15,代码来源:sf.c
示例20: draw_sprites
UINT32 bestleag_state::screen_update_bestleaw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg_tilemap->set_scrollx(0,m_vregs[0x08/2]);
m_bg_tilemap->set_scrolly(0,m_vregs[0x0a/2]);
m_tx_tilemap->set_scrollx(0,m_vregs[0x00/2]);
m_tx_tilemap->set_scrolly(0,m_vregs[0x02/2]);
m_fg_tilemap->set_scrollx(0,m_vregs[0x04/2]);
m_fg_tilemap->set_scrolly(0,m_vregs[0x06/2]);
m_bg_tilemap->draw(bitmap, cliprect, 0,0);
m_fg_tilemap->draw(bitmap, cliprect, 0,0);
draw_sprites(bitmap,cliprect);
m_tx_tilemap->draw(bitmap, cliprect, 0,0);
return 0;
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:15,代码来源:bestleag.c
注:本文中的draw_sprites函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论