void game_init() { // Graphics : one bg + one cursor (simple) blitter_init(); sampler.bg = tilemap_new (dessin_tset, 640, 480, TMAP_HEADER(64,64,TSET_16, TMAP_U8), vram); sampler.cursor = sprite_new((uint32_t *)cursor_spr,5,5,-1); sampler.cursor_x = 5; sampler.cursor_y = 5; // Filesystem : load all drumkits to table. // XXX better check those errors ! int res; f_mount(&fso,"",1); //mount now res = f_opendir(&dir, MOD_PATH); if (res != FR_OK) { die(3,res); } // MOD loadNextFile(); loadPattern(0); zap_pattern(&clipboard); // disable auto next pattern (or taken care by following) Player.follow_song = 0; // inject a loop to start of current pattern ? }
VIDEO_START_MEMBER(blaster_state,blaster) { blitter_init(m_blitter_config, memregion("proms")->base()); create_palette_lookup(); state_save_register(); save_item(NAME(m_blaster_color0)); save_item(NAME(m_blaster_video_control)); }
VIDEO_START_MEMBER(williams2_state,williams2) { blitter_init(m_blitter_config, nullptr); /* create the tilemap */ m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(williams2_state::get_tile_info),this), TILEMAP_SCAN_COLS, 24,16, 128,16); m_bg_tilemap->set_scrolldx(2, 0); state_save_register(); save_item(NAME(m_tilemap_xscroll)); save_item(NAME(m_williams2_fg_color)); }
VIDEO_START_MEMBER(williams_state,williams2) { blitter_init(machine(), m_blitter_config, NULL); /* allocate paletteram */ m_generic_paletteram_8.allocate(0x400 * 2); /* create the tilemap */ m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(williams_state::get_tile_info),this), TILEMAP_SCAN_COLS, 24,16, 128,16); m_bg_tilemap->set_scrolldx(2, 0); state_save_register(machine()); }
// return ptr to new object // append to end of list ; list ends up unsorted now object* blitter_new() { // auto initialize in case it wasn't done if (!blitter_initialized) blitter_init(); if (blt.nb_objects<MAX_OBJECTS) { return blt.objects[blt.nb_objects++]; // index of free object IN ! } else { message ("Object memory full, too many objects ! Increase MAX_OBJECTS in lib/blitter.h\n"); die(1,3); // die immediately return 0; // never reached } }
VIDEO_START_MEMBER(williams_state,blaster) { blitter_init(machine(), m_blitter_config, memregion("proms")->base()); create_palette_lookup(machine()); state_save_register(machine()); }
VIDEO_START_MEMBER(williams_state,williams) { blitter_init(machine(), m_blitter_config, NULL); create_palette_lookup(machine()); state_save_register(machine()); }
VIDEO_START_MEMBER(williams_state,williams) { blitter_init(m_blitter_config, nullptr); create_palette_lookup(); state_save_register(); }