本文整理汇总了C++中tilemap_t类的典型用法代码示例。如果您正苦于以下问题:C++ tilemap_t类的具体用法?C++ tilemap_t怎么用?C++ tilemap_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了tilemap_t类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
void igs_m027_state::video_start()
{
m_igs_tx_tilemap= &machine().tilemap().create(tilemap_get_info_delegate(FUNC(igs_m027_state::get_tx_tilemap_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32);
m_igs_tx_tilemap->set_transparent_pen(15);
m_igs_bg_tilemap= &machine().tilemap().create(tilemap_get_info_delegate(FUNC(igs_m027_state::get_bg_tilemap_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32);
//m_igs_bg_tilemap= &machine().tilemap().create(tilemap_get_info_delegate(FUNC(igs_m027_state::get_bg_tilemap_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32);
//m_igs_bg_tilemap->set_transparent_pen(15);
logerror("Video START OK!\n");
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:9,代码来源:igs_m027.c
示例2: configure_tilemap_groups
void palette_device::configure_tilemap_groups(tilemap_t &tmap, gfx_element &gfx, int transcolor)
{
int color;
assert(gfx.colors() <= TILEMAP_NUM_GROUPS);
// iterate over all colors in the tilemap
for (color = 0; color < gfx.colors(); color++)
tmap.set_transmask(color, transpen_mask(gfx, color, transcolor), 0);
}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:10,代码来源:emupal.c
示例3: screen_update_galaxi
UINT32 galaxi_state::screen_update_galaxi(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_bg3_tmap->set_scrollx(m_bg3_xscroll);
m_bg3_tmap->set_scrolly(m_bg3_yscroll);
int layers_ctrl = -1;
#ifdef MAME_DEBUG
if (machine().input().code_pressed(KEYCODE_R)) // remapped due to inputs changes.
{
int msk = 0;
if (machine().input().code_pressed(KEYCODE_T)) msk |= 1;
if (machine().input().code_pressed(KEYCODE_Y)) msk |= 2;
if (machine().input().code_pressed(KEYCODE_U)) msk |= 4;
if (machine().input().code_pressed(KEYCODE_I)) msk |= 8;
if (machine().input().code_pressed(KEYCODE_O)) msk |= 16;
if (msk != 0) layers_ctrl &= msk;
}
#endif
if (layers_ctrl & 1) m_bg1_tmap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
else bitmap.fill(m_palette->black_pen(), cliprect);
if (layers_ctrl & 2) m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 4) m_bg3_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 8) m_bg4_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 16) m_fg_tmap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
开发者ID:bradhugh,项目名称:mame,代码行数:31,代码来源:galaxi.cpp
示例4: video_start
GFXDECODE_END
void witch_state::video_start()
{
m_gfx0a_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(witch_state::get_gfx0a_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
m_gfx0b_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(witch_state::get_gfx0b_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
m_gfx1_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(witch_state::get_gfx1_tile_info),this),TILEMAP_SCAN_ROWS,8,8,32,32);
m_gfx0a_tilemap->set_transparent_pen(0);
m_gfx0b_tilemap->set_transparent_pen(0);
m_gfx0a_tilemap->set_palette_offset(0x100);
m_gfx0b_tilemap->set_palette_offset(0x100);
m_gfx1_tilemap->set_palette_offset(0x200);
save_item(NAME(m_scrollx));
save_item(NAME(m_scrolly));
save_item(NAME(m_reg_a002));
}
开发者ID:bradhugh,项目名称:mame,代码行数:18,代码来源:witch.cpp
示例5: video_start
void clpoker_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(clpoker_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(clpoker_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
m_fg_tilemap->set_transparent_pen(0);
m_nmi_enable = false;
save_item(NAME(m_nmi_enable));
}
开发者ID:Tauwasser,项目名称:mame,代码行数:9,代码来源:clpoker.cpp
示例6: video_start
void lbeach_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(lbeach_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 16);
m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(lbeach_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 32, 32);
m_fg_tilemap->set_transparent_pen(0);
m_screen->register_screen_bitmap(m_colmap_car);
}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:9,代码来源:lbeach.c
示例7: video_start
void dmndrby_state::video_start()
{
m_bg = 0;
m_racetrack_tilemap_rom = memregion("user1")->base();
m_racetrack_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(dmndrby_state::get_dmndrby_tile_info),this),TILEMAP_SCAN_ROWS,16,16, 16, 512);
m_racetrack_tilemap->mark_all_dirty();
}
开发者ID:PugsyMAME,项目名称:mame,代码行数:9,代码来源:dmndrby.cpp
示例8: screen_update_bestleaw
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
示例9: video_start
void pipeline_state::video_start()
{
m_palram=std::make_unique<UINT8[]>(0x1000);
m_tilemap1 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info),this),TILEMAP_SCAN_ROWS,8,8,64,32 );
m_tilemap2 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(pipeline_state::get_tile_info2),this),TILEMAP_SCAN_ROWS,8,8,64,32 );
m_tilemap2->set_transparent_pen(0);
save_item(NAME(m_vidctrl));
save_pointer(NAME(m_palram.get()), 0x1000);
}
开发者ID:bradhugh,项目名称:mame,代码行数:10,代码来源:pipeline.cpp
示例10: screen_update_pzletime
UINT32 pzletime_state::screen_update_pzletime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int count;
int y, x;
bitmap.fill(machine().pens[0], cliprect); //bg pen
m_txt_tilemap->set_scrolly(0, m_tilemap_regs[0] - 3);
m_txt_tilemap->set_scrollx(0, m_tilemap_regs[1]);
m_mid_tilemap->set_scrolly(0, m_tilemap_regs[2] - 3);
m_mid_tilemap->set_scrollx(0, m_tilemap_regs[3] - 7);
if (m_video_regs[2] & 1)
{
count = 0;
for (y = 255; y >= 0; y--)
{
for (x = 0; x < 512; x++)
{
if (m_bg_videoram[count] & 0x8000)
bitmap.pix16((y - 18) & 0xff, (x - 32) & 0x1ff) = 0x300 + (m_bg_videoram[count] & 0x7fff);
count++;
}
}
}
m_mid_tilemap->draw(screen, bitmap, cliprect, 0, 0);
{
UINT16 *spriteram = m_spriteram;
int offs, spr_offs, colour, sx, sy;
for(offs = 0; offs < 0x2000 / 2; offs += 4)
{
if(spriteram[offs + 0] == 8)
break;
spr_offs = spriteram[offs + 3] & 0x0fff;
sy = 0x200 - (spriteram[offs + 0] & 0x1ff) - 35;
sx = (spriteram[offs + 1] & 0x1ff) - 30;
colour = (spriteram[offs + 0] & 0xf000) >> 12;
// is spriteram[offs + 0] & 0x200 flipy? it's always set
drawgfx_transpen(bitmap, cliprect, machine().gfx[1], spr_offs, colour, 0, 1, sx, sy, 0);
}
}
m_txt_tilemap->draw(screen, bitmap, cliprect, 0, 0);
if ((screen.frame_number() % 16) != 0)
m_txt_tilemap->draw(screen, bitmap, cliprect, 1, 0);
return 0;
}
开发者ID:felipesanches,项目名称:ume,代码行数:57,代码来源:pzletime.c
示例11: screen_update
UINT32 joystand_state::screen_update( screen_device &screen, bitmap_rgb32 &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;
}
#endif
m_bg1_tmap->set_scrollx(0, 0);
m_bg1_tmap->set_scrolly(0, 0);
m_bg2_tmap->set_scrollx(0, m_scroll[0] - 0xa);
m_bg2_tmap->set_scrolly(0, m_scroll[1]);
draw_bg15_tilemap();
bitmap.fill(m_palette->black_pen(), cliprect);
if (layers_ctrl & 4) copybitmap_trans(bitmap, m_bg15_bitmap[0], 0, 0, 1, 0, cliprect, BG15_TRANSPARENT);
if (layers_ctrl & 8) copybitmap_trans(bitmap, m_bg15_bitmap[1], 0, 0, 0, 0, cliprect, BG15_TRANSPARENT);
if (layers_ctrl & 1) m_bg1_tmap->draw(screen, bitmap, cliprect, 0, 0);
if (layers_ctrl & 2) m_bg2_tmap->draw(screen, bitmap, cliprect, 0, 0);
popmessage("S0: %04X S1: %04X EN: %04X OUT: %04X", m_scroll[0], m_scroll[1], m_enable[0], m_outputs[0]);
return 0;
}
开发者ID:j105rob,项目名称:mame,代码行数:33,代码来源:joystand.c
示例12:
UINT32 quizpun2_state::screen_update_quizpun2(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 (msk != 0) layers_ctrl &= msk;
}
#endif
if (layers_ctrl & 1) m_bg_tmap->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
else bitmap.fill(get_black_pen(machine()), cliprect);
bitmap.fill(get_black_pen(machine()), cliprect);
if (layers_ctrl & 2) m_fg_tmap->draw(bitmap, cliprect, 0, 0);
return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:22,代码来源:quizpun2.c
示例13: video_start
void patapata_state::video_start()
{
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024,16*2);
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_fg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024,16*2);
// 2nd half of the ram seems unused, maybe it's actually a mirror meaning this would be the correct tilemap sizes
// m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_bg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024/2,16*2);
// m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(patapata_state::get_fg_tile_info),this), tilemap_mapper_delegate(FUNC(patapata_state::pagescan),this), 16, 16, 1024/2,16*2);
m_fg_tilemap->set_transparent_pen(0xf);
save_item(NAME(m_fg_bank));
}
开发者ID:k2-git,项目名称:mame,代码行数:13,代码来源:patapata.cpp
示例14: screen_update_cball
UINT32 cball_state::screen_update_cball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* draw playfield */
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
/* draw sprite */
drawgfx_transpen(bitmap, cliprect, machine().gfx[1],
m_video_ram[0x399] >> 4,
0,
0, 0,
240 - m_video_ram[0x390],
240 - m_video_ram[0x398], 0);
return 0;
}
开发者ID:AreaScout,项目名称:mame-libretro,代码行数:14,代码来源:cball.c
示例15: screen_update_majorpkr
UINT32 majorpkr_state::screen_update_majorpkr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(get_black_pen(machine()), cliprect);
rectangle custom_clip;
/* The following custom_clip is to exclude the last char column (unused)
form the render. We need more proof about how the video is working.
*/
custom_clip = cliprect;
custom_clip.max_x -= 16;
m_bg_tilemap->draw(screen, bitmap, custom_clip, 0, 0);
m_fg_tilemap->draw(screen, bitmap, custom_clip, 0, 0);
if (m_flip_state == 1)
{
m_bg_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
m_fg_tilemap->set_flip(TILEMAP_FLIPX | TILEMAP_FLIPY);
}
return 0;
}
开发者ID:felipesanches,项目名称:ume,代码行数:23,代码来源:majorpkr.c
示例16: screen_update_umipoker
UINT32 umipoker_state::screen_update_umipoker(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
m_tilemap_0->set_scrolly(0, m_umipoker_scrolly[0]);
m_tilemap_1->set_scrolly(0, m_umipoker_scrolly[1]);
m_tilemap_2->set_scrolly(0, m_umipoker_scrolly[2]);
m_tilemap_3->set_scrolly(0, m_umipoker_scrolly[3]);
bitmap.fill(get_black_pen(machine()), cliprect);
m_tilemap_0->draw(screen, bitmap, cliprect, 0,0);
m_tilemap_1->draw(screen, bitmap, cliprect, 0,0);
m_tilemap_2->draw(screen, bitmap, cliprect, 0,0);
m_tilemap_3->draw(screen, bitmap, cliprect, 0,0);
return 0;
}
开发者ID:cyberkni,项目名称:276in1JAMMA,代码行数:16,代码来源:umipoker.c
示例17: screen_update
UINT32 pturn_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(m_bgcolor, cliprect);
m_bgmap->draw(screen, bitmap, cliprect, 0,0);
for (int offs = 0x80-4 ; offs >=0 ; offs -= 4)
{
int sy=256-m_spriteram[offs]-16 ;
int sx=m_spriteram[offs+3]-16 ;
int flipx=m_spriteram[offs+1]&0x40;
int flipy=m_spriteram[offs+1]&0x80;
if (flip_screen_x())
{
sx = 224 - sx;
flipx ^= 0x40;
}
if (flip_screen_y())
{
flipy ^= 0x80;
sy = 224 - sy;
}
if(sx|sy)
{
m_gfxdecode->m_gfx[2]->transpen(bitmap,cliprect,
m_spriteram[offs+1] & 0x3f ,
(m_spriteram[offs+2] & 0x1f),
flipx, flipy,
sx,sy,0);
}
}
m_fgmap->draw(screen, bitmap, cliprect, 0,0);
return 0;
}
开发者ID:libretro,项目名称:mame2014-libretro,代码行数:37,代码来源:pturn.c
示例18: video_start
void cultures_state::video_start()
{
m_bg0_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cultures_state::get_bg0_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8, 64, 128);
m_bg1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cultures_state::get_bg1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8, 512, 512);
m_bg2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(cultures_state::get_bg2_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8, 512, 512);
m_bg1_tilemap->set_transparent_pen(0);
m_bg0_tilemap->set_transparent_pen(0);
m_bg0_tilemap->set_scrolldx(502, 10);
m_bg1_tilemap->set_scrolldx(502, 10);
m_bg2_tilemap->set_scrolldx(502, 10);
m_bg0_tilemap->set_scrolldy(255, 0);
m_bg1_tilemap->set_scrolldy(255, 0);
m_bg2_tilemap->set_scrolldy(255, 0);
}
开发者ID:jiangzhonghui,项目名称:mame,代码行数:17,代码来源:cultures.c
示例19: screen_update
UINT32 flyball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int pitcherx = m_pitcher_horz;
int pitchery = m_pitcher_vert - 31;
int ballx = m_ball_horz - 1;
int bally = m_ball_vert - 17;
m_tmap->mark_all_dirty();
/* draw playfield */
m_tmap->draw(screen, bitmap, cliprect, 0, 0);
/* draw pitcher */
m_gfxdecode->m_gfx[1]->transpen(bitmap,cliprect, m_pitcher_pic ^ 0xf, 0, 1, 0, pitcherx, pitchery, 1);
/* draw ball */
for (int y = bally; y < bally + 2; y++)
for (int x = ballx; x < ballx + 2; x++)
if (cliprect.contains(x, y))
bitmap.pix16(y, x) = 1;
return 0;
}
开发者ID:libretro,项目名称:mame2014-libretro,代码行数:24,代码来源:flyball.c
示例20: video_start
void luckgrln_state::video_start()
{
m_reel1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel1_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
m_reel2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel2_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
m_reel3_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel3_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
m_reel4_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(luckgrln_state::get_luckgrln_reel4_tile_info),this),TILEMAP_SCAN_ROWS, 8, 32, 64, 8);
m_reel1_tilemap->set_scroll_cols(64);
m_reel2_tilemap->set_scroll_cols(64);
m_reel3_tilemap->set_scroll_cols(64);
m_reel4_tilemap->set_scroll_cols(64);
m_reel1_tilemap->set_transparent_pen(0 );
m_reel2_tilemap->set_transparent_pen(0 );
m_reel3_tilemap->set_transparent_pen(0 );
m_reel4_tilemap->set_transparent_pen(0 );
}
开发者ID:DragonMinded,项目名称:mame,代码行数:17,代码来源:luckgrln.cpp
注:本文中的tilemap_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论