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

C++ sound_send函数代码示例

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

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



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

示例1: tnf_exit_deff

void tnf_exit_deff (void)
{	
	dmd_alloc_pair_clean ();
	U16 fno;
	sound_send (SND_CLOCK_CHAOS_END_BOOM);
	for (fno = IMG_EXPLODE_START; fno <= IMG_EXPLODE_END; fno += 2)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
		
		sprintf_score (tnf_score);
		font_render_string_center (&font_fixed6, 64, 8, sprintf_buffer);
		font_render_string_center (&font_var5, 64, 20, "POINTS EARNED FROM DOINKS");
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (fno);
		dmd_overlay_outline ();
		dmd_show2 ();
		task_sleep (TIME_33MS);
	}
	if (tnf_buttons_pressed >= tnf_target)
		sound_send (SND_OOH_GIMME_SHELTER);
	else
		sound_send (SND_RETURN_TO_YOUR_HOMES);
	dmd_alloc_pair_clean ();
	sprintf_score (tnf_score);
	font_render_string_center (&font_fixed6, 64, 8, sprintf_buffer);
	font_render_string_center (&font_var5, 64, 20, "POINTS EARNED FROM DOINKS");
	dmd_copy_low_to_high ();
	dmd_show2 ();
	task_sleep_sec (2);
	deff_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:33,代码来源:tnf.c


示例2: CALLSET_ENTRY

CALLSET_ENTRY (clock_millions, sw_clock_target)
{
	
	if (timed_mode_running_p (&clock_millions_mode))
	{
		leff_start (LEFF_CLOCK_TARGET);
		/* Award bonus if hit 6 times */
		if (++clock_mode_hits > 5)
		{
			sound_send (SND_EXPLOSION_3);
			score (SC_20M);
			score_add (clock_mode_score, score_table[SC_20M]);
			deff_start (DEFF_CLOCK_MILLIONS_EXPLODE);
			timed_mode_end (&clock_millions_mode);
		}
		else
		{
			sound_send (SND_CLOCK_BELL);
			score (SC_5M);
			score_add (clock_mode_score, score_table[SC_5M]);	
			deff_start (DEFF_CLOCK_MILLIONS_HIT);
		}
		if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING))
			tz_clock_reverse_direction ();
		tz_clock_set_speed (clock_mode_hits);
	}
	else if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING))
	{
		callset_invoke (sw_jet_noflash);
		score (SC_50K);
		sound_send (SND_NO_CREDITS);
	}
}
开发者ID:CardonaPinball,项目名称:freewpc,代码行数:33,代码来源:clockmillions.c


示例3: left_ramp_speech_subtask

static inline void left_ramp_speech_subtask (void)
{
	switch (left_ramps)
	{
		default:
			break;
		case 3:
			sound_send (SND_MOST_UNUSUAL_CAMERA);
			break;
		case 6:
			sound_send (SND_THIS_IS_NO_ORDINARY_GUMBALL);
			break;
		case 10:
			if (can_award_extra_ball ())
				sound_send (SND_GET_THE_EXTRA_BALL);
			else
				sound_send (SND_TEN_MILLION_POINTS);
			break;
		case 20:	
			sound_send (SND_YES);
			break;
	}


}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:25,代码来源:leftramp.c


示例4: amode_talking_task

static void amode_talking_task (void)
{
	sound_send (SND_NOT_AN_ORDINARY_DAY);
	task_sleep_sec (2);
	sound_send (SND_OR_AN_ORDINARY_PLAYER);
	task_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:7,代码来源:tz_amode.c


示例5: award_unlit_shot

void award_unlit_shot (U8 unlit_called_from)
{
    if (can_award_unlit_shot (unlit_called_from))
    {
        unlit_shot_count++;
        /* Don't allow collecting from Hitchhiker or jets */
        if (unlit_shot_count > 4 && unlit_called_from != (SW_HITCHHIKER)
                && unlit_called_from != (SW_BOTTOM_JET))
        {
            sound_send (SND_JUST_TAKEN_A_DETOUR);
            deff_start (DEFF_BACKDOOR_AWARD);
            backdoor_award_collected = TRUE;
            unlit_shot_count = 0;
            callset_invoke (award_door_panel);
        }
        /* Reset if the player hits the same unlit shot twice */
        if (unlit_called_from == unlit_called_from_stored)
            unlit_shot_count = 0;
        if (unlit_shot_count == 4 )
        {
            //TODO Check for unlit shots
            /* Hint to the player that backdoor award is ready */
            sound_send (SND_TWILIGHT_ZONE_SHORT_SOUND);
        }
        /* Store where we were called from */
        unlit_called_from_stored = unlit_called_from;
    }
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:28,代码来源:unlit.c


示例6: tnf_sound_task

static void tnf_sound_task (void)
{
	if (tnf_buttons_pressed < tnf_target - 10)
		sound_send (SND_BUYIN_CANCELLED);
	else
		sound_send (SND_CLOCK_CHAOS_END_BOOM);
	task_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:8,代码来源:tnf.c


示例7: sssmb_jackpot_collected_deff

void sssmb_jackpot_collected_deff (void)
{
	dmd_alloc_low_clean ();
	font_render_string_center (&font_term6, 64, 10, "SKILL JACKPOT");
	printf_millions (sssmb_jackpot_value);
	font_render_string_center (&font_fixed6, 64, 21, sprintf_buffer);
	sound_send (SND_SKILL_SHOT_CRASH_3);
	dmd_show_low ();
	task_sleep_sec (1);
	sound_send (SND_SKILL_SHOT_CRASH_3);
	task_sleep_sec (1);
	deff_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:13,代码来源:sssmb.c


示例8: CALLSET_ENTRY

CALLSET_ENTRY (leftramp, sw_left_ramp_enter)
{
	if (!event_did_follow (left_ramp, left_ramp_fail))
	{
		sound_send (SND_SHUTTLE_LAUNCH);
		deff_start (DEFF_SHUTTLE_LAUNCH);
		head_divert_to_mpf ();
	}
	else
	{
		sound_send (SND_ABORT_ABORT);
	}
	event_can_follow (left_ramp, left_ramp_fail, TIME_2S);
}
开发者ID:Curbfeeler,项目名称:freewpc,代码行数:14,代码来源:leftramp.c


示例9: match_deff

/** The display effect that runs to show the match.
 * This is a default effect that could be overriden with something
 * more flashy. */
void
match_deff (void)
{
	U8 value;
	U8 n;
	U8 last_value = 0xFF;

#if (MACHINE_DMD == 1)
	match_draw_scores ();
#endif

	for (n=0; n < 20; n++)
	{
		if (n == 19)
			value = match_value;
		else
		{
			do {
				value = random_scaled (10) * 0x10;
			} while (value == last_value);
		}
		last_value = value;

#ifdef MACHINE_TZ
		if (n == 19 && match_count)
			sound_send (SND_JET_BUMPER_ADDED);
		else
			sound_send (SND_HITCHHIKER_COUNT);
#endif

		dmd_alloc_low_clean ();
#if (MACHINE_DMD == 1)
		dmd_overlay ();
#else
		match_draw_scores ();
#endif
		sprintf ("%02X", value);
		font_render_string_right (&font_fixed6, 126, 22, sprintf_buffer);
		dmd_show_low ();
		task_sleep (TIME_100MS);
	}

	if (match_count)
	{
		callset_invoke (match_awarded);
	}

	task_sleep_sec (2);
	deff_exit ();
}
开发者ID:Dave2084,项目名称:freewpc,代码行数:53,代码来源:match.c


示例10: sw_jet_sound

void sw_jet_sound (void)
{
	if (!in_live_game)
		return;
	jet_sound_index = random_scaled(3);
	if (timed_mode_running_p (&tsm_mode))
		sound_send (super_jet_sounds[jet_sound_index]);
	else
		sound_send (jet_sounds[jet_sound_index]);
	/* Hack to stop slings and clock target from flashing jets */	
	if (!noflash)
		flasher_pulse (FLASH_JETS);
	noflash = FALSE;
	task_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:15,代码来源:jets.c


示例11: coin_door_power_deff

void coin_door_power_deff (void)
{
	U8 n;
	for (n=0; n < 5; n++)
	{
		dmd_alloc_low_clean ();
		dmd_show_low ();
		task_sleep (TIME_200MS);

		dmd_alloc_low_clean ();
#if (MACHINE_DMD == 1)
		font_render_string_center (&font_fixed6, 64, 6, "COIN DOOR IS OPEN");
		font_render_string_center (&font_fixed6, 64, 16, "HIGH POWER");
		font_render_string_center (&font_fixed6, 64, 26, "IS DISABLED");
#else
		font_render_string_center (&font_fixed6, 64, 10, "HIGH POWER");
		font_render_string_center (&font_fixed6, 64, 21, "IS DISABLED");
#endif
		dmd_show_low ();
		sound_send (SND_TEST_ALERT);
		task_sleep (TIME_300MS);
	}
	task_sleep_sec (3);
	deff_exit ();
}
开发者ID:Dmilo,项目名称:freewpc,代码行数:25,代码来源:effect.c


示例12: clock_millions_explode_deff

void clock_millions_explode_deff (void)
{	
	dmd_alloc_pair_clean ();
	U16 fno;
	sound_send (SND_GREED_MODE_BOOM);
	for (fno = IMG_EXPLODE_START; fno <= IMG_EXPLODE_END; fno += 2)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
		font_render_string_center (&font_fixed6, 64, 10, "CLOCK DESTROYED");
		font_render_string_center (&font_var5, 64, 21, "20 MILLION");
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (fno);
		dmd_overlay_outline ();
		dmd_show2 ();
		task_sleep (TIME_33MS);
	}
	dmd_alloc_pair_clean ();
	font_render_string_center (&font_fixed6, 64, 10, "CLOCK DESTROYED");
	font_render_string_center (&font_var5, 64, 21, "20 MILLION");
	dmd_copy_low_to_high ();
	dmd_show2 ();
	task_sleep_sec (2);
	deff_exit ();
}
开发者ID:CardonaPinball,项目名称:freewpc,代码行数:26,代码来源:clockmillions.c


示例13: add_units

/** Increment the units counter for a particular slot. */
void add_units (U8 n)
{
	csum_area_check (&coin_csum_info);
	if (credit_count >= price_config.max_credits)
		return;

	nvram_add (unit_count, n);
	if (unit_count >= price_config.units_per_credit)
	{
		while (unit_count >= price_config.units_per_credit)
		{
			nvram_subtract (unit_count, price_config.units_per_credit);
			add_credit ();
			audit_increment (&system_audits.paid_credits);
		}
		callset_invoke (add_credits);
	}
	else
	{
#ifdef MACHINE_ADD_COIN_SOUND
		sound_send (MACHINE_ADD_COIN_SOUND);
#endif
		callset_invoke (add_partial_credits);
		announce_credits ();
	}
	csum_area_update (&coin_csum_info);
	pinio_nvram_lock ();
}
开发者ID:hydra,项目名称:freewpc,代码行数:29,代码来源:coin.c


示例14: sssmb_award_jackpot

static void sssmb_award_jackpot (void)
{
	if (!task_kill_gid (GID_SSSMB_JACKPOT_READY))
		return;

	mball_jackpot_uncollected = FALSE;
	sssmb_initial_ramps_to_divert++;
	if (feature_config.dixon_anti_cradle == YES)
		sssmb_jackpot_value += 5;
	score_1M (sssmb_jackpot_value);
	leff_start (LEFF_PIANO_JACKPOT_COLLECTED);
	deff_start (DEFF_JACKPOT);
	deff_start (DEFF_SSSMB_JACKPOT_COLLECTED);
	sound_send (SND_EXPLOSION_1);

	/* score it */

	if (sssmb_jackpot_value < 100)
		sssmb_jackpot_value += 10;
	sssmb_ramps_to_divert = sssmb_initial_ramps_to_divert;

	if (!global_flag_test (GLOBAL_FLAG_SSSMB_RED_JACKPOT)
		&& !global_flag_test (GLOBAL_FLAG_SSSMB_ORANGE_JACKPOT)
		&& !global_flag_test (GLOBAL_FLAG_SSSMB_YELLOW_JACKPOT))
	{
		sssmb_relight_all_jackpots ();
	}
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:28,代码来源:sssmb.c


示例15: lock_powerball_deff

void lock_powerball_deff (void)
{
	sound_send (SND_TOO_HOT_TO_HANDLE);
	U16 fno;
	dmd_alloc_pair_clean ();
	timer_restart_free (GID_LOCK_POWERBALL, TIME_5S);
	while (task_find_gid (GID_LOCK_POWERBALL))
	{
		ball_search_timer_reset ();
		for (fno = IMG_POWERBALL_START; fno <= IMG_POWERBALL_END; fno += 2)
		{
			dmd_map_overlay ();
			dmd_clean_page_low ();
			font_render_string_center (&font_fireball, 64, 9, "LOCK BALL");
			font_render_string_left (&font_var5, 10, 24, "LEFT: NO");
			font_render_string_right (&font_var5, 118, 24, "RIGHT: YES");
			dmd_text_outline ();

			dmd_alloc_pair ();
			frame_draw (fno);
			dmd_overlay_outline ();
			dmd_show2 ();
			task_sleep (TIME_33MS);
		}
	}
	deff_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:27,代码来源:pb_lock.c


示例16: huxley_hit_sounds_task

void huxley_hit_sounds_task(void) {
	U8 i;
	for (i = 0; i < 3; i++) {
		sound_send (EXPLOSION1_SHORT);
		task_sleep (TIME_100MS);
	}
	sound_send (EXPLOSION1_MED);
	task_sleep (TIME_100MS);
	for (i = 0; i < 3; i++) {
		sound_send (EXPLOSION1_LONG);
		task_sleep (TIME_500MS);
	}
	play_huxley_sounds();

	task_exit();
}//end of mode_effect_deff
开发者ID:CardonaPinball,项目名称:freewpc_DM,代码行数:16,代码来源:huxley.c


示例17: CALLSET_ENTRY

CALLSET_ENTRY (tz, add_player)
{
#ifdef CONFIG_TZONE_IP
	if (num_players > 1)
		sound_send (SND_PLAYER_ONE + num_players - 1);
#endif
}
开发者ID:Curbfeeler,项目名称:freewpc,代码行数:7,代码来源:config.c


示例18: sw_gumball_right_loop_entered

/* Called by the right loop magnet to see if we should divert the ball */
void sw_gumball_right_loop_entered (void)
{
	/* Open the divertor if trying to load the gumball*/
	if (gumball_enable_from_trough && event_did_follow (autolaunch, right_loop))
	{
		magnet_disable_catch (MAG_RIGHT);
		gumball_divertor_open ();
	}
	/* Don't open if autofired into play or dropped from the lock*/
	else if (event_did_follow (autolaunch, right_loop)
		|| timer_find_gid (GID_LOCK_KICKED))
	{
	}
	/* Don't open if the magnet is about to grab the ball
	 * but remembering that it will always let the powerball through */
	else if ((magnet_enabled (MAG_RIGHT) || magnet_busy (MAG_RIGHT))
		&& !global_flag_test (GLOBAL_FLAG_POWERBALL_IN_PLAY))
	{
	}
	else if (gumball_load_is_enabled ())
	{
		gumball_divertor_open ();
		if (in_live_game && !multi_ball_play ())
		{
			sound_send (SND_GUMBALL_ENTER);
		}
	}
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:29,代码来源:gumball.c


示例19: autofire_monitor

/** A task that manages the autolaunching of balls.
Upon entry, the autofire divertor solenoid is already pulsing
and a ball is being kicked from the trough. */
void autofire_monitor (void)
{
    /* Open the divertor to catch the ball.  Because it may be
    coming from either the trough or a ramp divert, the
    timings are variable. */
    if (shooter_div_delay_time)
        task_sleep_sec (shooter_div_delay_time);

    autofire_busy = TRUE;
    //if (autofire_full ()
    //	don't open to catch
    shooter_div_start ();
    /* TODO - If the autofire switch trips during the 'open
    time', we can abort this delay early and go ahead and
    close the divertor.  This is safe because only one
    ball can appear here at a time. */
    //task_sleep_sec (shooter_div_open_time);
    autofire_ball_catch_wait ();
    shooter_div_stop ();

    /* Wait a little longer for the ball to settle */
    task_sleep (TIME_200MS);

    /* If Right inlane -> Left ramp combo, start tnf mode */
    if (event_did_follow (left_ramp_exit, tnf) && single_ball_play ())
    {
        callset_invoke (tnf_start);
    }

    /* Wait until allowed to kickout */
    while (kickout_locks > 0)
        task_sleep (TIME_100MS);

    /* Open diverter again */
    shooter_div_start ();
    /* Wait for the diverter to fully open before firing */
    U8 timeout = 20;
    while (--timeout != 0)
        task_sleep (TIME_100MS);

    if (in_live_game && single_ball_play ())
    {
        sound_send (SND_EXPLOSION_1);
        leff_start (LEFF_STROBE_UP);
    }
    /* Say that the ball is heading into the right loop */
    timer_restart_free (GID_BALL_LAUNCH, TIME_3S);
    event_can_follow (autolaunch, right_loop, TIME_4S);
    /* Clear the magnet so we can fire a ball */
    magnet_disable_catch (MAG_RIGHT);
    /* Launch the ball */
    sol_request (SOL_AUTOFIRE);
    /* Wait for the ball to clear the divertor
     * before closing*/
    task_sleep (TIME_700MS);
    shooter_div_stop ();
    autofire_busy = FALSE;
    task_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:62,代码来源:autofire.c


示例20: CALLSET_ENTRY

CALLSET_ENTRY (jets, jet_hit)
{
//	task_recreate_gid (GID_JETS, jet_hit_task);
	//score_copy (temp_score, current_score);
	flasher_pulse (FLASH_RIGHT_HELMET);
	/* Make a sound, based on level */
	
	if (!free_timer_test (timer_jets_level_up))
		sound_send (jet_sounds[jets_level][jets_sound_index]);
	jets_sound_index++;
	if (jets_sound_index > 2)
		jets_sound_index = 0;
	
	if (timed_mode_running_p (&jets_frenzy_mode))
	{
		score (SC_500K);
	}
	else if (score_compare (total_jets_score, score_table[SC_500K]) >= 0)
	{
		timed_mode_begin (&jets_frenzy_mode);
		score (SC_500K);
		score_add (jets_frenzy_total, score_table[SC_500K]);

	}
	else
	{
		/* Score the hit, based on level */	
		score_add (total_jets_score, score_table[jets_hit_scores[jets_level]]);
		score_long (score_table[jets_hit_scores[jets_level]]);
		bounded_increment (jets_hit, 255);
		/* Level up if needed */
		if (jets_hit >= jets_needed[jets_level])
		{
			bounded_increment (jets_level, 4);
			score_long (score_table[jets_level_up_scores[jets_level]]);
			jets_hit = 0;
			free_timer_restart (timer_jets_level_up, TIME_2S);
			sound_send (SND_WHOOSH_UP_1);
		}
	
		if ((score_compare (total_jets_score, score_table[SC_250K]) >= 0) && !flag_test (FLAG_250K_JETS))
			callset_invoke (wheel_award_jets);
		deff_restart (DEFF_JET_HIT);
	}

}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:46,代码来源:jets.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ soundlatch_w函数代码示例发布时间:2022-05-30
下一篇:
C++ sound_play函数代码示例发布时间: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