示例#1
0
文件: sssmb.c 项目: SonnyJim/freewpc
void sssmb_stop (void)
{
	callset_invoke (sssmb_stop);
	if (!global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING))
		return;	
	if (mball_jackpot_uncollected == TRUE)
	{
		sound_send (SND_NOOOOOOOO);
		callset_invoke (start_hurryup);
	}

	global_flag_off (GLOBAL_FLAG_SSSMB_RUNNING);
	global_flag_off (GLOBAL_FLAG_SSSMB_RED_JACKPOT);
	global_flag_off (GLOBAL_FLAG_SSSMB_ORANGE_JACKPOT);
	global_flag_off (GLOBAL_FLAG_SSSMB_YELLOW_JACKPOT);
	timer_kill_gid (GID_SSSMB_DIVERT_DEBOUNCE);
	task_kill_gid (GID_SSSMB_JACKPOT_READY);
	deff_stop (DEFF_SSSMB_RUNNING);
	lamp_tristate_off (LM_SUPER_SKILL);
	music_refresh ();
}
示例#2
0
文件: device.c 项目: Dmilo/freewpc
/** Request that a device ejects all balls */
void device_request_empty (device_t *dev)
{
	U8 can_kick;

	task_gid_t gid = DEVICE_GID (device_devno (dev));
	task_kill_gid (gid);

	/* See how many balls are in the device, and schedule that many kicks. */
	can_kick = device_kickable_count (dev);
	dev->kicks_needed += can_kick;
	dev->kick_errors = 0;

	/* TODO - this logic probably belongs somewhere else */
	if (!trough_dev_p (dev))
		live_balls += can_kick;

	/* Reset count of locked balls */
	dev->max_count = dev->props->init_max_count;
	if (gid != task_getgid ())
		task_recreate_gid_while (gid, device_update, TASK_DURATION_INF);
}
示例#3
0
文件: leff.c 项目: Dmilo/freewpc
/**
 * An optimized form of leff_stop() followed by leff_start().
 *
 * If the task is already running, then the lamps do not need to be
 * freed and re-allocated; the task just needs to be restarted.
 */
void leff_restart (leffnum_t id)
{
	task_gid_t gid;
	const leff_t *leff;

	gid = leff_gid_find_by_id (id);
	if (gid == GID_NULL)
	{
		leff_start (id);
		return;
	}

	dbprintf ("leff_restart %d\n", id);
	leff = &leff_table[id];
	task_kill_gid (gid);
	page_push (MD_PAGE);
	lamp_set_subtract (leff_data_set, leff_get_set (leff));
	page_pop ();
	leff_create_task (leff, gid);
#ifdef DEBUG_LEFFS
	leff_dump ();
#endif
}
示例#4
0
void initials_stop (void)
{
	task_sleep_sec (1);
	task_kill_gid (GID_ENTER_INITIALS);
	initials_enter_timer = 0;
}
示例#5
0
void gumball_divertor_close (void)
{
	gumball_div_stop ();
	task_kill_gid (GID_GUMBALL_DIV);
}
示例#6
0
文件: music.c 项目: SonnyJim/freewpc
CALLSET_ENTRY (music, bonus, stop_game, start_game)
{
    task_kill_gid (GID_MUSIC_SPEED);
    old_mode_timer = 0;
}
示例#7
0
文件: rules.c 项目: SonnyJim/freewpc
CALLSET_ENTRY (rules, start_game)
{
	task_kill_gid (GID_RULES_LEFF);
	deff_stop (DEFF_RULES);
}
示例#8
0
void skillshot_skidpad_enable( void ) {
	// kill any existing task, just to make sure
	task_kill_gid (GID_SKILLSHOT_SKIDPAD_TIMER);
	task_create_gid1 (GID_SKILLSHOT_SKIDPAD_TIMER, skillshot_skidpad_timer);
}
示例#9
0
文件: rules.c 项目: Dave2084/freewpc
static void rule_complete (void)
{
	task_sleep_sec (5);
	task_kill_gid (GID_RULES_LEFF);
}
示例#10
0
CALLSET_ENTRY (extraball, end_ball, start_player) {
	task_kill_gid(GID_EXTRA_BALL_REMINDER);
}//end of function
示例#11
0
文件: search.c 项目: Dave2084/freewpc
void ball_search_monitor_stop (void)
{
	task_kill_gid (GID_BALL_SEARCH_MONITOR);
}
示例#12
0
文件: jets.c 项目: SonnyJim/freewpc
CALLSET_ENTRY (jets, end_ball)
{
	task_kill_gid (GID_JETS);
	timed_mode_end (&jets_frenzy_mode);
}
示例#13
0
//called from top popper when eb awarded
void end_extraball(void) {
	flag_off(FLAG_IS_EXTRABALL_LIT);
	extraball_light_off ();
	task_kill_gid(GID_EXTRA_BALL_REMINDER);
}//end of function
示例#14
0
CALLSET_ENTRY (eject, dev_eyeball_eject_enter) {
	if (!in_game) {
		sol_request (SOL_EJECT);
		task_sleep (TIME_1S);
	}
	else {
			//HUXLEY MADE
			if ( !get_back_in_the_fridge_running()
				&&	!get_back_in_the_fridge_ending()
				&&	task_kill_gid(GID_LEFT_INLANE_MADE)  && !in_tilt) {
				is_normal_eject_killed = TRUE;
				huxley_made();
				return;
			}//end of huxley made

			//START VIDEO MODE
			else if (  (system_config.disable_kaboom  == NO || system_config.disable_simon_says == NO || system_config.disable_shooter == NO)
					&&	flag_test (FLAG_VIDEO_MODE_ENABLED)
					&&  !in_tilt
					&&	!get_back_in_the_fridge_running()
					&&	!get_back_in_the_fridge_ending()
					&& !get_fortress_running ()
					&& !get_museum_running ()
					&& !get_cryoprison_running ()
					&& !get_wasteland_running ()
					&& !get_demotime_running ()
					&& !is_frenzy_running () ) {       //this is here since starting frenzy dumps ball into eject hole
					switch (get_next_video_mode() ) {
							case 0: start_kaboom(); 		break;
							case 1: start_simon_says(); 	break;
							case 2: start_shooter(); 		break;
							}//end of switch
							combo_rehit_check (); //check to see if enough combos to relight video mode
							//we just returned from video mode so flash the lights before you fire the coil
							leff_start (LEFF_EJECT);
							task_sleep (TIME_500MS);

							sol_request (SOL_EJECT); //request to fire the eject sol
							task_create_gid1 (GID_EJECT_1, eject_switch_task);
							ball_search_monitor_start ();
							task_sleep (TIME_300MS);
			}//end of start video mode

			//NORMAL RETINA SCAN
			else if (!is_normal_eject_killed ) {
					if (!in_tilt) {
						score (EJECT_SCORE);
						//100k per jet hit here
						if (jet_shots_made > 0) {
							score_zero (temp_score);//zero out temp score
							score_add (temp_score, score_table[SC_100K]);//multiply 100K by jet count
							score_mul (temp_score, jet_shots_made);//multiply 100K by jet count
							score_long (temp_score); //add temp score to player's score
						}//end of if

						if (retina_scan_multiplier == 2)	{
							sound_start(ST_SPEECH, SPCH_DOUBLE_RETINA_SCAN, SL_4S, PRI_GAME_QUICK4);
							score (EJECT_SCORE);
							score_long (temp_score); //add temp score to player's score
						}

						leff_start (LEFF_EJECT);
						sound_start (ST_SAMPLE, RETINA_SCAN_LONG, SL_4S, PRI_GAME_QUICK1);
						deff_start (DEFF_EJECT_EFFECT);
						task_sleep (TIME_300MS);
					}//end of not in tilt
						sol_request (SOL_EJECT); //request to fire the eject sol
						task_create_gid1 (GID_EJECT_1, eject_switch_task);//this is a 2 second ball save timer for eject coil
			}//end of else !is_normal_eject_killed = FALSE
	}//end of else in game
}//end of function
示例#15
0
//if eject coil just fired then this was probably an inadvertent drain so give the ball back
CALLSET_ENTRY (eject, sw_left_outlane) {
	//if eject accidently cause a left drain then give the ball back
	//immediately - unless ball save is active in which case the ball will come back
	//anyway
	if (in_game && !in_tilt && task_kill_gid(GID_EJECT_1) && !ballsave_test_active() ) 	serve_ball_auto ();
}//end of function
示例#16
0
文件: rules.c 项目: SonnyJim/freewpc
void rule_complete (void)
{
	task_kill_gid (GID_RULES_LEFF);
}
示例#17
0
文件: sssmb.c 项目: SonnyJim/freewpc
CALLSET_ENTRY (sssmb, skill_missed)
{
	task_kill_gid (GID_SSSMB_JACKPOT_READY);
}
示例#18
0
void sslot_mode_exit (void)
{	
	lamp_tristate_off (LM_SLOT_MACHINE);
	task_kill_gid (GID_SSLOT_AWARD_ROTATE);
}
示例#19
0
void flipcode_reset (void)
{
	flipcode_pos = 0;
	flipcode_value = 0;
	task_kill_gid (GID_FLIPCODE_ACTIVE);
}
示例#20
0
文件: magnet.c 项目: SonnyJim/freewpc
/* Called by maghelper.c and loop.c to help tune the magnet throw */
CALLSET_ENTRY (magnet, magnet_throw_left_success)
{
	/* Leave drop timer alone */
	task_kill_gid (GID_LEFT_TO_RIGHT_THROW);
	bounded_increment (left_magnet_throw_successes, 255);
}
示例#21
0
void skillshot_skidpad_disable( void ) {
	lamp_tristate_off (LM_SKID_PAD_ARROW);
	lamp_tristate_off (LM_SKID_PAD_JACKPOT);

	task_kill_gid (GID_SKILLSHOT_SKIDPAD_TIMER);
}
示例#22
0
文件: magnet.c 项目: SonnyJim/freewpc
/* Ball was grabbed by the magnet, lengthen time */
CALLSET_ENTRY (magnet, magnet_throw_left_grab_failure)
{
	task_kill_gid (GID_LEFT_TO_RIGHT_THROW);
	if (feature_config.auto_swag == YES)
		bounded_increment (left_magnet_swag, 255);
}
示例#23
0
void vpoker_stop (void)
{
	task_sleep_sec (1);
	task_kill_gid (GID_VPOKER);
}
示例#24
0
文件: jets.c 项目: SonnyJim/freewpc
void tsm_mode_exit (void)
{
	task_kill_gid (GID_JETS_ACTIVE_TASK);
}
示例#25
0
文件: loop.c 项目: hydra/freewpc
CALLSET_ENTRY (loop, end_ball)
{
	task_kill_gid (GID_LOOP_LEVEL_TIMER);
}
示例#26
0
文件: rules.c 项目: Dmilo/freewpc
void mbsave_restart (void)
{
	task_kill_gid (GID_MBSAVE);
	add_ball_count (1);
}
示例#27
0
static void flipcode_reset (void)
{
    flipcode_digit = 0;
    flipcode_value = 0;
    task_kill_gid (GID_FLIPCODE_ACTIVE);
}
示例#28
0
CALLSET_ENTRY (eject, dev_eyeball_eject_enter) {
	//HUXLEY MADE
	if ( !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING)
		&&	task_kill_gid(GID_LEFT_INLANE_MADE) ) {
//		flag_on(FLAG_KILL_NORMAL_EJECT);
		huxley_made();
		return;
//		task_sleep (TIME_300MS);//give time for huxley to catch up
	}

	//START VIDEO MODE
	else if (  !flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING)
			&& !flag_test(FLAG_IS_FORTRESS_MB_RUNNING)
			&& !flag_test(FLAG_IS_MUSEUM_MB_RUNNING)
			&& !flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)
			&& !flag_test(FLAG_IS_WASTELAND_MB_RUNNING)
			&& !flag_test(FLAG_IS_DEMOTIME_RUNNING)
			&&	flag_test (FLAG_VIDEO_MODE_ENABLED) ) {
//						flag_on(FLAG_KILL_NORMAL_EJECT);
						start_video_mode(3);

						sound_start (ST_ANY, SPCH_PLAYER_TWO, SL_1S, PRI_GAME_QUICK5);
						task_sleep (TIME_500MS);
						task_sleep (TIME_500MS);
						task_sleep (TIME_500MS);
						task_sleep (TIME_500MS);


						combo_rehit_check (); //check to see if enough combos to relight video mode
						sol_request (SOL_EJECT); //request to fire the eject sol
						ball_search_monitor_start ();
//						return;
						task_sleep (TIME_300MS);
	}//end of start video mode

	//NORMAL RETINA SCAN
	else //if (!flag_test(FLAG_KILL_NORMAL_EJECT) )
	{
						leff_start (LEFF_EJECT);

						sound_start (ST_SAMPLE, RETINA_SCAN_LONG, SL_4S, PRI_GAME_QUICK1);
						score (EJECT_SCORE);
						//100k per jet hit here
						if (jet_shots_made > 0) {
							score_zero (temp_score);//zero out temp score
							score_add (temp_score, score_table[SC_100K]);//multiply 100K by jet count
							score_mul (temp_score, jet_shots_made);//multiply 100K by jet count
							score_long (temp_score); //add temp score to player's score
						}//end of if

						if (retina_scan_multiplier == 2)	{
							sound_start(ST_SPEECH, SPCH_DOUBLE_RETINA_SCAN, SL_4S, PRI_GAME_QUICK5);
							score (EJECT_SCORE);
							score_long (temp_score); //add temp score to player's score
						}

						deff_start (DEFF_EJECT_EFFECT);
						task_sleep_sec (1);

						sol_request (SOL_EJECT); //request to fire the eject sol
	}//end of else !flag_test(FLAG_KILL_NORMAL_EJECT)
}//end of function
示例#29
0
/**
 * Stop the simulation during endball, or when a game is aborted.
 */
CALLSET_ENTRY (stress, end_ball, stop_game)
{
	task_kill_gid (GID_SWITCH_STRESS);
}
示例#30
0
CALLSET_ENTRY (huxley, end_ball, tilt) 	{
	if (timed_mode_running_p(&huxley_mode) ) timed_mode_end (&huxley_mode);
	task_kill_gid (GID_HUXLEY_REMINDER);
}