• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ NAME函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NAME函数的典型用法代码示例。如果您正苦于以下问题:C++ NAME函数的具体用法?C++ NAME怎么用?C++ NAME使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NAME函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: common_start

void nes_whirl2706_device::device_start()
{
	common_start();
	save_item(NAME(m_latch));
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:5,代码来源:nes_bootleg.c


示例2: read8_delegate

void sb16_device::device_start()
{
	ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262");
	m_isa->install_device(0x0200, 0x0207, read8_delegate(FUNC(pc_joy_device::joy_port_r), subdevice<pc_joy_device>("pc_joy")), write8_delegate(FUNC(pc_joy_device::joy_port_w), subdevice<pc_joy_device>("pc_joy")));
	m_isa->install_device(0x0226, 0x0227, read8_delegate(FUNC(sb_device::dsp_reset_r), this), write8_delegate(FUNC(sb_device::dsp_reset_w), this));
	m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(sb_device::dsp_data_r), this), write8_delegate(FUNC(sb_device::dsp_data_w), this) );
	m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_cmd_w), this) );
	m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) );
	m_isa->install_device(0x0224, 0x0225, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this));
	m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_device::mpu401_r), this), write8_delegate(FUNC(sb16_device::mpu401_w), this));
	m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
	m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
	m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));

	save_item(NAME(m_mixer.data));
	save_item(NAME(m_mixer.status));
	save_item(NAME(m_mixer.main_vol));
	save_item(NAME(m_mixer.dac_vol));
	save_item(NAME(m_mixer.fm_vol));
	save_item(NAME(m_mixer.cd_vol));
	save_item(NAME(m_mixer.line_vol));
	save_item(NAME(m_mixer.mic_vol));
	save_item(NAME(m_mixer.pc_speaker_vol));
	save_item(NAME(m_mixer.output_ctl));
	save_item(NAME(m_mixer.input_ctl));
	save_item(NAME(m_mixer.input_gain));
	save_item(NAME(m_mixer.output_gain));
	save_item(NAME(m_mixer.agc));
	save_item(NAME(m_mixer.treble));
	save_item(NAME(m_mixer.bass));

	sb_device::device_start();
}
开发者ID:broftkd,项目名称:mame,代码行数:33,代码来源:sblaster.cpp


示例3: machine

void usb_sound_device::device_start()
{
	g80_filter_state temp;
	int tchan, tgroup;

	/* find the CPU we are associated with */
	m_maincpu = machine().device("maincpu");
	assert(m_maincpu != nullptr);

	/* create a sound stream */
	m_stream = machine().sound().stream_alloc(*this, 0, 1, SAMPLE_RATE);

	/* initialize state */
	m_noise_shift = 0x15555;

	for (timer8253 &g : m_timer_group)
	{
		g.chan_filter[0].configure(10e3, 1e-6);
		g.chan_filter[1].configure(10e3, 1e-6);
		g.gate1.configure(100e3, 0.01e-6);
		g.gate2.configure(2 * 100e3, 0.01e-6);
	}

	temp.configure(100e3, 0.01e-6);
	m_gate_rc1_exp[0] = temp.exponent;
	temp.configure(1e3, 0.01e-6);
	m_gate_rc1_exp[1] = temp.exponent;
	temp.configure(2 * 100e3, 0.01e-6);
	m_gate_rc2_exp[0] = temp.exponent;
	temp.configure(2 * 1e3, 0.01e-6);
	m_gate_rc2_exp[1] = temp.exponent;

	m_noise_filters[0].configure(2.7e3 + 2.7e3, 1.0e-6);
	m_noise_filters[1].configure(2.7e3 + 1e3, 0.30e-6);
	m_noise_filters[2].configure(2.7e3 + 270, 0.15e-6);
	m_noise_filters[3].configure(2.7e3 + 0, 0.082e-6);
	m_noise_filters[4].configure(33e3, 0.1e-6);

	m_final_filter.configure(100e3, 4.7e-6);

	/* register for save states */
	save_item(NAME(m_in_latch));
	save_item(NAME(m_out_latch));
	save_item(NAME(m_last_p2_value));
	save_item(NAME(m_work_ram_bank));
	save_item(NAME(m_t1_clock));

	for (tgroup = 0; tgroup < 3; tgroup++)
	{
		timer8253 *group = &m_timer_group[tgroup];
		for (tchan = 0; tchan < 3; tchan++)
		{
			timer8253::channel *channel = &group->chan[tchan];
			save_item(NAME(channel->holding), tgroup * 3 + tchan);
			save_item(NAME(channel->latchmode), tgroup * 3 + tchan);
			save_item(NAME(channel->latchtoggle), tgroup * 3 + tchan);
			save_item(NAME(channel->clockmode), tgroup * 3 + tchan);
			save_item(NAME(channel->bcdmode), tgroup * 3 + tchan);
			save_item(NAME(channel->output), tgroup * 3 + tchan);
			save_item(NAME(channel->lastgate), tgroup * 3 + tchan);
			save_item(NAME(channel->gate), tgroup * 3 + tchan);
			save_item(NAME(channel->subcount), tgroup * 3 + tchan);
			save_item(NAME(channel->count), tgroup * 3 + tchan);
			save_item(NAME(channel->remain), tgroup * 3 + tchan);
		}
		save_item(NAME(group->env), tgroup);
		save_item(NAME(group->chan_filter[0].capval), tgroup);
		save_item(NAME(group->chan_filter[1].capval), tgroup);
		save_item(NAME(group->gate1.capval), tgroup);
		save_item(NAME(group->gate2.capval), tgroup);
		save_item(NAME(group->config), tgroup);
	}

	save_item(NAME(m_timer_mode));
	save_item(NAME(m_noise_shift));
	save_item(NAME(m_noise_state));
	save_item(NAME(m_noise_subcount));
	save_item(NAME(m_final_filter.capval));
	save_item(NAME(m_noise_filters[0].capval));
	save_item(NAME(m_noise_filters[1].capval));
	save_item(NAME(m_noise_filters[2].capval));
	save_item(NAME(m_noise_filters[3].capval));
	save_item(NAME(m_noise_filters[4].capval));
}
开发者ID:system11b,项目名称:mame,代码行数:84,代码来源:segasnd.cpp


示例4: CUnknown

CBaseGraph::CBaseGraph()
	: CUnknown(NAME("CBaseGraph"), NULL)
	, m_hNotifyWnd(NULL)
{
}
开发者ID:Tphive,项目名称:mpc-be,代码行数:5,代码来源:BaseGraph.cpp


示例5: CBaseOutputPin

CTextPassThruOutputPin::CTextPassThruOutputPin(CTextPassThruFilter* pTPTFilter, CCritSec* pLock, HRESULT* phr)
	: CBaseOutputPin(NAME(""), pTPTFilter, pLock, phr, L"Out")
	, m_pTPTFilter(pTPTFilter)
{
}
开发者ID:Fluffiest,项目名称:splayer,代码行数:5,代码来源:TextPassThruFilter.cpp


示例6: save_item

void crt9212_t::device_start()
{
	// resolve callbacks
	m_write_dout.resolve_safe();
	m_write_rof.resolve_safe();
	m_write_wof.resolve_safe();

	// state saving
	save_item(NAME(m_data));
	save_item(NAME(m_clrcnt));
	save_item(NAME(m_tog));
	save_item(NAME(m_ren));
	save_item(NAME(m_wen1));
	save_item(NAME(m_wen2));
	save_item(NAME(m_oe));
	save_item(NAME(m_rclk));
	save_item(NAME(m_wclk));
	save_item(NAME(m_clrcnt_edge));
	save_item(NAME(m_data_latch));
	save_item(NAME(m_ren_int));
	save_item(NAME(m_wen_int));
	save_item(NAME(m_ram[0]));
	save_item(NAME(m_ram[1]));
	save_item(NAME(m_buffer));
	save_item(NAME(m_rac));
	save_item(NAME(m_wac));
}
开发者ID:crazii,项目名称:mameplus,代码行数:27,代码来源:crt9212.c


示例7: _audit_add_head

/*
 * la_objopen() caller for the head link-map.  Global auditors, or an auditor
 * started from the object that heads a link-map list (typically the dynamic
 * executable), are passed to la_objopen().  However, local auditors can
 * provide activity and preinit events, and for these events, a cookie
 * representing the head link-map list object is expected.  This routine obtains
 * these cookies from the link-map list lm_cookies element.  This element
 * ensures all clients of the same auditor use the same cookie.
 *
 * Although a local auditor will get an la_objopen() call for the object that
 * heads the link-map list of the object being audited, the auditor is not
 * permitted to request binding information for this head object.  The head
 * object has already been in existence, and bindings may have been resolved
 * with it.  This local auditor is coming into existence too late, and thus we
 * don't allow any bindings to be caught at all.
 */
static int
_audit_add_head(Rt_map *clmp, Rt_map *hlmp, int preinit, int activity)
{
	Lm_list		*clml = LIST(clmp);
	Lmid_t		lmid = get_linkmap_id(clml);
	Audit_list	*alp;
	Aliste		idx;
	int		save = 0;

	for (APLIST_TRAVERSE(AUDITORS(clmp)->ad_list, idx, alp)) {
		Audit_client	*acp;
		Rt_map		*almp = alp->al_lmp;
		Lm_list		*alml = LIST(almp);
		uintptr_t	*cookie;
		uint_t		rtldflags;

		/*
		 * Ensure this local auditor isn't already in existence as an
		 * auditor for the head of the link-map list.  If it is, then
		 * this auditor will have already receive preinit and activity
		 * events.
		 */
		if (AUDITORS(hlmp) && _audit_used_by_head(hlmp, almp))
			continue;

		/*
		 * Create a cookie that represents the object that heads the
		 * link-map list.  If the cookie already exists, then this
		 * auditor has already been established for another objects
		 * local auditing.  In this case, do not issue a la_objopen()
		 * or la_activity() event, as these will have already occurred.
		 */
		if ((acp = _audit_get_head_client(clml->lm_head, almp)) != NULL)
			continue;
		if ((acp =
		    _audit_create_head_client(clml->lm_head, almp)) == NULL)
			return (0);

		cookie = &(acp->ac_cookie);
		save++;

		/*
		 * Call the la_objopen() if available.
		 */
		if (alp->al_objopen) {
			uint_t	flags;

			DBG_CALL(Dbg_audit_objopen(clml, DBG_AUD_CALL,
			    alp->al_libname, NAME(hlmp), 0, FALSE));

			APPLICATION_ENTER(rtldflags);
			leave(alml, thr_flg_reenter);
			flags = (*alp->al_objopen)((Link_map *)hlmp, lmid,
			    cookie);
			(void) enter(thr_flg_reenter);
			APPLICATION_RETURN(rtldflags);

			if (flags) {
				DBG_CALL(Dbg_audit_objopen(clml, DBG_AUD_RET,
				    alp->al_libname, NAME(hlmp), flags, TRUE));
			}
		}

		/*
		 * Call the la_activity() if available.
		 */
		if (alp->al_activity) {
			alml->lm_flags |= LML_FLG_AUDITNOTIFY;
			clml->lm_flags |= LML_FLG_ACTAUDIT;

			DBG_CALL(Dbg_audit_activity(clml, alp->al_libname,
			    NAME(clml->lm_head), LA_ACT_ADD));

			APPLICATION_ENTER(rtldflags);
			leave(alml, thr_flg_reenter);
			(*alp->al_activity)(cookie, LA_ACT_ADD);
			(void) enter(thr_flg_reenter);
			APPLICATION_RETURN(rtldflags);
		}
	}

	/*
	 * If new head link-map cookies have been generated, then maintain
	 * any preinit and/or activity requirements.
//.........这里部分代码省略.........
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:101,代码来源:audit.c


示例8: save_item

void pacland_state::machine_start()
{
    save_item(NAME(m_main_irq_mask));
    save_item(NAME(m_mcu_irq_mask));
}
开发者ID:gregdickhudl,项目名称:mame,代码行数:5,代码来源:pacland.cpp


示例9: MACHINE_START_MEMBER

MACHINE_START_MEMBER(niyanpai_state, musobana)
{
	save_item(NAME(m_motor_on));
	save_item(NAME(m_musobana_inputport));
	save_item(NAME(m_musobana_outcoin_flag));
}
开发者ID:Fulg,项目名称:mame,代码行数:6,代码来源:niyanpai.cpp


示例10: save_item

void chanbara_state::machine_start()
{
	save_item(NAME(m_scroll));
	save_item(NAME(m_scrollhi));
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:5,代码来源:chanbara.c


示例11: CASAPSourceStream

	CASAPSourceStream(HRESULT *phr, CSource *pFilter)
		: CSourceStream(NAME("ASAPSourceStream"), phr, pFilter, L"Out"), loaded(FALSE), duration(0)
	{
	}
开发者ID:070499,项目名称:xbmc,代码行数:4,代码来源:asap_dsf.cpp


示例12: CBaseOutputPin

CTTASplitterOutputPin::CTTASplitterOutputPin(CTTASplitter *pParentFilter, CCritSec *pLock, HRESULT *phr) :
	CBaseOutputPin(NAME("CTTASplitterOutputPin"), (CBaseFilter*)pParentFilter, pLock, phr, L"Output"),
	m_pParentFilter(pParentFilter)
{
}
开发者ID:avdbg,项目名称:MPC-BE,代码行数:5,代码来源:TTASplitter.cpp


示例13: DECL_STATE_ACTION

DECL_STATE_ACTION(_)
DECL_STATE_ACTION(T)
DECL_STATE_ACTION(U)
DECL_STATE_ACTION(W)
DECL_STATE_ACTION(V)
DECL_STATE_ACTION(O)
DECL_STATE_ACTION(S)
DECL_STATE_ACTION(P)
DECL_STATE_ACTION(R)
DECL_STATE_ACTION(Q)
DECL_STATE_ACTION(A)
#undef DECL_STATE_ACTION

#define NAME(action) tc_state_##action
static state_func const state_table[eTCStateMax] = {
	NAME(start), NAME(end) , NAME(H), NAME(X), NAME(N), NAME(D), NAME(C), NAME(E),
	NAME(F), NAME(G), NAME(I), NAME(J), NAME(K), NAME(M), NAME(Z), NAME(_),
	NAME(T), NAME(U), NAME(W), NAME(V), NAME(O), NAME(S), NAME(P), NAME(R),
	NAME(Q), NAME(A)
};
#undef NAME
///////////////////////////////////////////////////////////////////////////////
// End of data types for state machine which parse type codes
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// State machine for parsing type codes functions
///////////////////////////////////////////////////////////////////////////////

static EDemanglerErr get_type_code_string(	char *sym,
											unsigned int *amount_of_read_chars,
开发者ID:13572293130,项目名称:radare2,代码行数:31,代码来源:microsoft_demangle.c


示例14: save_item

void galaxian_state::state_save_register()
{
	save_item(NAME(m_flipscreen_x));
	save_item(NAME(m_flipscreen_y));
	save_item(NAME(m_background_enable));
	save_item(NAME(m_background_red));
	save_item(NAME(m_background_green));
	save_item(NAME(m_background_blue));

	save_item(NAME(m_sprites_base));
	save_item(NAME(m_bullets_base));
	save_item(NAME(m_gfxbank));

	save_item(NAME(m_stars_enabled));
	save_item(NAME(m_star_rng_origin));
	save_item(NAME(m_star_rng_origin_frame));
	save_item(NAME(m_stars_blink_state));
}
开发者ID:dinkc64,项目名称:mame,代码行数:18,代码来源:galaxian.c


示例15: CSourceStream

//////////////////////////////////////////////////////////////////////////
// CVCamStream is the one and only output pin of CVCam which handles 
// all the stuff.
//////////////////////////////////////////////////////////////////////////
CVCamStream::CVCamStream(HRESULT *phr, CVCam *pParent, LPCWSTR pPinName) :
    CSourceStream(NAME("Audio Out"),phr, pParent, pPinName), m_pParent(pParent)
{
    // Set the media type...
	GetMediaType(0, &m_mt);
}
开发者ID:taqattack,项目名称:virtual-audio-capture-grabber-device,代码行数:10,代码来源:directshow_stuff.cpp


示例16: _audit_objopen

/*
 * la_objopen() caller.  Create an audit information structure for the indicated
 * link-map, regardless of an la_objopen() entry point.  This structure is used
 * to supply information to various audit interfaces (see LML_MSK_AUDINFO).
 * Traverse through all audit libraries and call any la_objopen() entry points
 * found.
 */
static int
_audit_objopen(APlist *list, Rt_map *nlmp, Lmid_t lmid, Audit_info *aip,
    int *ndx)
{
	Lm_list		*nlml = LIST(nlmp);
	Audit_list	*alp;
	Aliste		idx;

	for (APLIST_TRAVERSE(list, idx, alp)) {
		uint_t		flags;
		Audit_client	*acp;
		Rt_map		*almp = alp->al_lmp;
		Lm_list		*alml = LIST(almp);

		/*
		 * Associate a cookie with the audit library, and assign the
		 * initial cookie as the present link-map.
		 */
		acp = &aip->ai_clients[(*ndx)++];
		acp->ac_lmp = alp->al_lmp;
		acp->ac_cookie = (uintptr_t)nlmp;

		if (alp->al_objopen == NULL)
			continue;

		DBG_CALL(Dbg_audit_objopen(nlml, DBG_AUD_CALL, alp->al_libname,
		    NAME(nlmp), 0, FALSE));

		leave(alml, thr_flg_reenter);
		flags = (*alp->al_objopen)((Link_map *)nlmp, lmid,
		    &(acp->ac_cookie));
		(void) enter(thr_flg_reenter);

		/*
		 * Diagnose any flags returned by the auditor.
		 */
		if (flags) {
			DBG_CALL(Dbg_audit_objopen(nlml, DBG_AUD_RET,
			    alp->al_libname, NAME(nlmp), flags, FALSE));
		}

		if (flags & LA_FLG_BINDTO)
			acp->ac_flags |= FLG_AC_BINDTO;

		if (flags & LA_FLG_BINDFROM) {
			ulong_t		pltcnt;

			acp->ac_flags |= FLG_AC_BINDFROM;

			/*
			 * We only need dynamic plt's if a pltenter and/or a
			 * pltexit() entry point exist in one of our auditing
			 * libraries.
			 */
			if (aip->ai_dynplts || (JMPREL(nlmp) == 0) ||
			    ((audit_flags & (AF_PLTENTER | AF_PLTEXIT)) == 0))
				continue;

			/*
			 * Create one dynplt for every 'PLT' that exists in the
			 * object.
			 */
			pltcnt = PLTRELSZ(nlmp) / RELENT(nlmp);
			if ((aip->ai_dynplts = calloc(pltcnt,
			    dyn_plt_ent_size)) == NULL)
				return (0);
		}
	}
	return (1);
}
开发者ID:AlainODea,项目名称:illumos-gate,代码行数:77,代码来源:audit.c


示例17: save_item

void bt459_device::device_start()
{
	save_item(NAME(m_address));
	save_item(NAME(m_address_rgb));

	save_item(NAME(m_overlay_color));
	save_item(NAME(m_cursor_color));

	save_item(NAME(m_command_0));
	save_item(NAME(m_command_1));
	save_item(NAME(m_command_2));
	save_item(NAME(m_pixel_read_mask));
	save_item(NAME(m_pixel_blink_mask));
	save_item(NAME(m_overlay_read_mask));
	save_item(NAME(m_overlay_blink_mask));
	save_item(NAME(m_interleave));
	save_item(NAME(m_test));
	save_item(NAME(m_red_signature));
	save_item(NAME(m_green_signature));
	save_item(NAME(m_blue_signature));
	save_item(NAME(m_cursor_command));

	save_item(NAME(m_cursor_x));
	save_item(NAME(m_cursor_y));
	save_item(NAME(m_window_x));
	save_item(NAME(m_window_y));
	save_item(NAME(m_window_w));
	save_item(NAME(m_window_h));

	save_item(NAME(m_cursor_ram));
	save_item(NAME(m_palette_ram));

	save_item(NAME(m_blink_start));
	save_item(NAME(m_contrast));
}
开发者ID:Dagarman,项目名称:mame,代码行数:35,代码来源:bt459.cpp


示例18: AM_RANGE

	AM_RANGE( 0x00, 0x7f ) AM_RAM
ADDRESS_MAP_END


static void cpu_init_tms_common( legacy_cpu_device *device, const UINT32* decode_table, UINT16 o_mask, UINT16 r_mask, UINT8 pc_size, UINT8 byte_size )
{
	tms0980_state *cpustate = get_safe_token( device );

	cpustate->config = (const tms0980_config *) device->baseconfig().static_config();

	assert( cpustate->config != NULL );

	cpustate->decode_table = decode_table;
	cpustate->o_mask = o_mask;
	cpustate->r_mask = r_mask;
	cpustate->pc_size = pc_size;
	cpustate->byte_size = byte_size;

	cpustate->program = device->space( AS_PROGRAM );
	cpustate->data = device->space( AS_PROGRAM );

	device->save_item( NAME(cpustate->prev_pc) );
	device->save_item( NAME(cpustate->prev_pa) );
	device->save_item( NAME(cpustate->pc) );
	device->save_item( NAME(cpustate->pa) );
	device->save_item( NAME(cpustate->sr) );
	device->save_item( NAME(cpustate->pb) );
	device->save_item( NAME(cpustate->a) );
	device->save_item( NAME(cpustate->x) );
	device->save_item( NAME(cpustate->y) );
	device->save_item( NAME(cpustate->dam) );
	device->save_item( NAME(cpustate->ca) );
	device->save_item( NAME(cpustate->cb) );
	device->save_item( NAME(cpustate->cs) );
	device->save_item( NAME(cpustate->r) );
	device->save_item( NAME(cpustate->o) );
	device->save_item( NAME(cpustate->cki_bus) );
	device->save_item( NAME(cpustate->p) );
	device->save_item( NAME(cpustate->n) );
	device->save_item( NAME(cpustate->adder_result) );
	device->save_item( NAME(cpustate->carry_in) );
	device->save_item( NAME(cpustate->status) );
	device->save_item( NAME(cpustate->status_latch) );
	device->save_item( NAME(cpustate->special_status) );
	device->save_item( NAME(cpustate->call_latch) );
	device->save_item( NAME(cpustate->add_latch) );
	device->save_item( NAME(cpustate->branch_latch) );
	device->save_item( NAME(cpustate->subcycle) );
	device->save_item( NAME(cpustate->ram_address) );
	device->save_item( NAME(cpustate->ram_data) );
	device->save_item( NAME(cpustate->rom_address) );
	device->save_item( NAME(cpustate->opcode) );
	device->save_item( NAME(cpustate->decode) );
}
开发者ID:cdenix,项目名称:psmame,代码行数:54,代码来源:tms0980.c


示例19: auto_alloc_array

void esripsys_state::video_start()
{
	struct line_buffer_t *line_buffer = m_line_buffer;
	int i;

	/* Allocate memory for the two 512-pixel line buffers */
	line_buffer[0].colour_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[0].intensity_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[0].priority_buf = auto_alloc_array(machine(), UINT8, 512);

	line_buffer[1].colour_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[1].intensity_buf = auto_alloc_array(machine(), UINT8, 512);
	line_buffer[1].priority_buf = auto_alloc_array(machine(), UINT8, 512);

	/* Create and initialise the HBLANK timers */
	m_hblank_start_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(esripsys_state::hblank_start_callback),this));
	m_hblank_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(esripsys_state::hblank_end_callback),this));
	m_hblank_start_timer->adjust(m_screen->time_until_pos(0, ESRIPSYS_HBLANK_START));

	/* Create the sprite scaling table */
	m_scale_table = auto_alloc_array(machine(), UINT8, 64 * 64);

	for (i = 0; i < 64; ++i)
	{
		int j;

		for (j = 1; j < 65; ++j)
		{
			int p0 = 0;
			int p1 = 0;
			int p2 = 0;
			int p3 = 0;
			int p4 = 0;
			int p5 = 0;

			if (i & 0x1)
				p0 = BIT(j, 5) && !BIT(j, 4) && !BIT(j,3) && !BIT(j, 2) && !BIT(j, 1) && !BIT(j, 0);
			if (i & 0x2)
				p1 = BIT(j, 4) && !BIT(j, 3) && !BIT(j, 2) && !BIT(j, 1) && !BIT(j, 0);
			if (i & 0x4)
				p2 = BIT(j,3) && !BIT(j, 2) && !BIT(j, 1) && !BIT(j, 0);
			if (i & 0x8)
				p3 = BIT(j, 2) && !BIT(j,1) && !BIT(j,0);
			if (i & 0x10)
				p4 = BIT(j, 1) && !BIT(j, 0);
			if (i & 0x20)
				p5 = BIT(j, 0);

			m_scale_table[i * 64 + j - 1] = p0 | p1 | p2 | p3 | p4 | p5;
		}
	}

	/* Now create a lookup table for scaling the sprite 'fig' value */
	m_fig_scale_table = auto_alloc_array(machine(), UINT8, 1024 * 64);

	for (i = 0; i < 1024; ++i)
	{
		int scale;

		for (scale = 0; scale < 64; ++scale)
		{
			int input_pixels = i + 1;
			int scaled_pixels = 0;

			while (input_pixels)
			{
				if (m_scale_table[scale * 64 + (scaled_pixels & 0x3f)] == 0)
					input_pixels--;

				scaled_pixels++;
			}

			m_fig_scale_table[i * 64 + scale] = scaled_pixels - 1;
		}
	}

	/* Register stuff for state saving */
	save_pointer(NAME(line_buffer[0].colour_buf), 512);
	save_pointer(NAME(line_buffer[0].intensity_buf), 512);
	save_pointer(NAME(line_buffer[0].priority_buf), 512);

	save_pointer(NAME(line_buffer[1].colour_buf), 512);
	save_pointer(NAME(line_buffer[1].intensity_buf), 512);
	save_pointer(NAME(line_buffer[1].priority_buf), 512);

	save_item(NAME(m_video_firq));
	save_item(NAME(m_bg_intensity));
	save_item(NAME(m_hblank));
	save_item(NAME(m_video_firq_en));
	save_item(NAME(m_frame_vbl));
	save_item(NAME(m_12sel));
}
开发者ID:dinkc64,项目名称:mame,代码行数:92,代码来源:esripsys.c


示例20: save_item

void pce_sf2_device::device_start()
{
	save_item(NAME(m_bank_base));
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:4,代码来源:pce_rom.c



注:本文中的NAME函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NAPI_CALL函数代码示例发布时间:2022-05-30
下一篇:
C++ NADELETEBASIC函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap