Beispiel #1
0
//sw_top_popper
CALLSET_ENTRY (top_popper, dev_top_sol_enter) {
	ball_search_monitor_stop ();

				//BACK IN FRIDGE WIZARD MODE
				if (flag_test(FLAG_BACK_IN_THE_FRIDGE_ACTIVATED)) {
					start_back_in_the_fridge ();
					task_sleep_sec(1);
					leff_start (LEFF_TOP_POPPER);
					sol_request_async(SOL_TOP_POPPER);
				}

				//EXTRABALL AWARD OR MULTIBALL START OR BOTH
				else if (flag_test(FLAG_IS_EXTRABALL_LIT)
						|| (!flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING)
								&&	flag_test (FLAG_IS_MULTIBALL_ENABLED) )) {

						//EXTRABALL AWARD
							if (flag_test(FLAG_IS_EXTRABALL_LIT) ) {
								increment_extra_balls();
								end_extraball();
								leff_start (LEFF_EXTRABALL);
								deff_start_sync (DEFF_EXTRA_BALL_EFFECT);
								task_sleep_sec(1);
							}//end of EB

						//START MULTIBALL
							if (	!flag_test(FLAG_BACK_IN_THE_FRIDGE_RUNNING)
								&&	flag_test (FLAG_IS_MULTIBALL_ENABLED) ) {
								multiball_start();
								task_sleep_sec(1);
							}//end of multiball start

						//do for both
							leff_start (LEFF_TOP_POPPER);
							sol_request_async(SOL_TOP_POPPER);
				}//END of EB or MB

				//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) )//this is set at combos
												start_video_mode(1);

				//NOTHING SPECIAL
				else {
					score (TOP_POP_SCORE);//located in kernal/score.c
					//LIGHTING EFFECTS
					//	leff_start (LEFF_UNDERGROUND_KICKOUT);
					deff_start_sync (DEFF_TOP_POPPER_EFFECT); //if nothing special, do normal display effects
					leff_start (LEFF_TOP_POPPER);
					sol_request_async(SOL_TOP_POPPER);
				}//end of else NOTHING SPECIAL

	ball_search_monitor_start ();
}//end of function
Beispiel #2
0
CALLSET_ENTRY (deadend, sw_dead_end)
{
//	device_switch_can_follow (dead_end, slot, TIME_2S + TIME_500MS);
//	event_can_follow (dead_end, camera, TIME_2S);
	timer_restart_free (GID_DEADEND_TO_SLOT, TIME_4S);
	//event_can_follow (camera_or_piano, slot_prox, TIME_5S);

	if (lamp_test (LM_DEAD_END))
	{
		leff_start (LEFF_RIGHT_LOOP);
		dead_end_count++;
		deff_start_sync (DEFF_DEAD_END);
		if (!flag_test (FLAG_SNAKE_READY) && single_ball_play ())
		{
			flag_on (FLAG_SNAKE_READY);
			deff_start_sync (DEFF_SNAKE_READY);
		}
		switch (dead_end_count)
		{
			case 1:
				score (SC_250K);
				timed_game_extend (15);
				break;
			case 2:
				score (SC_500K);
				timed_game_extend (20);
				break;
			case 3:
				timed_game_extend (30);
				if (extra_ball_lit_from_deadend == FALSE 
					&& can_award_extra_ball ())
				{
					score (SC_1M);
					light_easy_extra_ball ();
					extra_ball_lit_from_deadend = TRUE;
				}
				else
				{
					score (SC_10M);
				}
				dead_end_count = 0;
				break;
			default:
				score (SC_2M);
				timed_game_extend (30);
				break;
		}
		lamp_off (LM_DEAD_END);
	}
	else
	{
		deff_start (DEFF_INLANE_LIGHTS_DEAD_END);
		award_unlit_shot (SW_DEAD_END);
		score (SC_100K);
		sound_send (SND_TOWN_SQUARE_AWARD);
		timed_game_pause (TIME_3S);
	}
}
Beispiel #3
0
void loop_master_check (void)
{
	if (loop_master_initial_enter != 0 
		&& loop_master_initial_enter <= num_players)
	{
		loop_master_initial_enter = 0;
		deff_start_sync (DEFF_LOOP_MASTER_ENTRY);
		SECTION_VOIDCALL (__common__, initials_enter);
	//	loop_master_initials = initials_data;	
		deff_start_sync (DEFF_LOOP_MASTER_EXIT);
	}
}
Beispiel #4
0
void combo_master_check (void)
{
	if (combo_master_initial_enter != 0 
		&& combo_master_initial_enter <= num_players)
	{
		combo_master_initial_enter = 0;
		deff_start_sync (DEFF_COMBO_MASTER_ENTRY);
		SECTION_VOIDCALL (__common__, initials_enter);
	//	combo_master_initials = initials_data;	
		deff_start_sync (DEFF_COMBO_MASTER_EXIT);
	}
}
Beispiel #5
0
void pitstop_award_task(void) {

    deff_start_sync(DEFF_PITSTOP_AWARD);

    switch (pitstop_award) {
    case AWARD_SCORE_50M:
        score(SC_50M);
        break;
    case AWARD_SCORE_5M:
        score(SC_5M);
        break;
    case AWARD_CAR:
        award_car();
        break;
    case AWARD_EXTRA_BALL:
        increment_extra_balls();
        break;
    case AWARD_LITE_LOCK:
        zr1_mb_award_lite_lock();
        break;
    case AWARD_LITE_DRAGRACE:
        award_lite_dragrace();
        break;
    case AWARD_LITE_KICKBACK:
        award_kickback ();
        break;
    default:
        // TODO handle remaining awards
        break;
    }
    task_exit();
}
Beispiel #6
0
void huxley_mode_init (void) {
	huxley_suspend = FALSE;
	ball_search_monitor_stop ();
	flag_off (FLAG_IS_HUXLEY_ENABLED);
	task_kill_gid(GID_HUXLEY_REMINDER);
	huxley_mode_shots_made = 0;

	score_zero(huxley_mode_score);
	score_zero(huxley_mode_last_score);
	score_zero(huxley_mode_next_score);

	score(HUXLEY_START_SCORE);
	score_add(huxley_mode_score, score_table[HUXLEY_START_SCORE]);
	score_add(huxley_mode_next_score, score_table[HUXLEY_MODE_HIT_SCORE]);

	huxley_counter = 0; //reset for next time

	deff_start_sync (DEFF_HUXLEY_START_EFFECT);//under /kernel/deff.c
	ballsave_add_time (system_config.mode_ballsave);

	leff_start(LEFF_EYEBALL);

	sol_request_async (SOL_EJECT); //request to fire the eject sol
	task_sleep (TIME_300MS);
	set_normal_eject_killed_status (FALSE);
	ball_search_monitor_start ();

	set_dm_mode(HUXLEY_COMPLETED); //for BONUS
}//end of function
Beispiel #7
0
void huxley_mode_init (void) {
	ball_search_monitor_stop ();
	task_kill_gid(GID_HUXLEY_REMINDER);
	flag_on (FLAG_IS_HUXLEY_RUNNING);
	huxley_mode_shots_made = 0;
	++huxley_modes_achieved;

	score_zero(huxley_mode_score);
	score_zero(huxley_mode_last_score);
	score_zero(huxley_mode_next_score);

	score(HUXLEY_START_SCORE);
	score_add(huxley_mode_score, score_table[HUXLEY_START_SCORE]);
	score_add(huxley_mode_next_score, score_table[HUXLEY_MODE_HIT_SCORE]);

	huxley_goal += (HUXLEY_EASY_GOAL * 2);
	flag_off(FLAG_IS_HUXLEY_ENABLED);

	deff_start_sync (DEFF_HUXLEY_START_EFFECT);//under /kernel/deff.c
	ballsave_add_time (5);


	leff_start(LEFF_HUXLEY);

	sol_request_async (SOL_EJECT); //request to fire the eject sol
	task_sleep (TIME_300MS);
	flag_off(FLAG_KILL_NORMAL_EJECT);
	ball_search_monitor_start ();
}//end of function
Beispiel #8
0
/** Runs the match sequence if necessary */
void
match_start (void)
{
	U8 match_flag;
	U8 score;
	U8 best_score = 0;
	U8 best_match_value = 0;

	/* Nothing to do if match has been disabled */
	if (system_config.match_feature == 0)
		return;

	/* Randomly decide whether or not to award a match.
	 * First, calculate a random number from 0 to 99. */
	match_flag = random_scaled (100);

	/* Now, see whether that value is less than N*P, where N
	is the total number of players and P is the probability of
	a single match. */
	if (match_flag < num_players * system_config.match_feature)
	{
		/* We will match at least one player */
		match_flag = 1;
	}
	else
	{
		/* We will not match any player */
		match_flag = 0;
	}

	/* Find a value for the match that meets our goal.
	Start with a random two-digit value. */
	for (match_value = 0x00; match_value <= 0x90; match_value += 0x10)
	{
		score = match_value_score (match_flag, match_value);
		if ((score > best_score)
			|| ((score == best_score) && random () > 128))
		{
			best_score = score;
			best_match_value = match_value;
		}
	}

	match_value = best_match_value;
	dbprintf ("Chose match value %02X\n", best_match_value);

	/* See how many matches we are about to award. */
	match_count = match_value_score (2, match_value);

	/* Start the match effect, then wait until it finishes. */
	deff_start_sync (DEFF_MATCH);

	/* Award any credits */
	while (match_count > 0)
	{
		match_count--;
		match_award ();
	}
}
Beispiel #9
0
/* The ball should be held at this point */
CALLSET_ENTRY (pb_lock, pb_lock_choose)
{

	timer_restart_free (GID_PB_LOCK_DEBOUNCE, TIME_1S);
	sound_send (SND_PIANO_ENTRY_TUNE);
	flipper_disable ();
	deff_start_sync (DEFF_LOCK_POWERBALL);
	task_create_anon (flipper_enable_task);
}
Beispiel #10
0
CALLSET_ENTRY (tnf, tnf_end)
{
	music_enable ();
	deff_start_sync (DEFF_TNF_EXIT);
	score_add (current_score, tnf_score);
	if (tnf_buttons_pressed >= tnf_target)
		tnf_increase_level ();

	flipper_enable ();
	music_refresh ();
	magnet_enable_catch_and_throw (MAG_LEFT);
}
Beispiel #11
0
//Once huxley mode is enabled it is started by a huxley shot (backwards to retina scan)
void huxley_made(void){
	play_huxley_sounds();
	if (flag_test(FLAG_IS_HUXLEY_ENABLED) )		timed_mode_begin (&huxley_mode);//start mode
	else {
		score (HUXLEY_SCORE);

		deff_start_sync (DEFF_HUXLEY_INFO_EFFECT);
		sol_request_async (SOL_EJECT); //request to fire the eject sol
		task_sleep (TIME_300MS);
		flag_off(FLAG_KILL_NORMAL_EJECT);
	}//end of else
}//end of function
Beispiel #12
0
void dragrace_task( void ) {
	deff_start_sync(DEFF_DRAGRACE);
	// fire off appropriate events
	// must be done outside of the deff otherwise other deffs won't start due to deff priorities
	if (player_car_position == 100 && computer_car_position < 100) {
		callset_invoke(vmode_dragrace_won);
	} else {
		callset_invoke(vmode_dragrace_lost);
	}
	dragrace_stop();
	task_exit();
}
Beispiel #13
0
CALLSET_ENTRY (tnf, tnf_start)
{
	flipper_disable ();
	tnf_buttons_pressed = 1;
	score_zero (tnf_score);
	set_tnf_target ();
	leff_start (LEFF_BONUS);
	music_request (MUS_POWERFIELD, PRI_GAME_VMODE);
	deff_start_sync (DEFF_TNF);
	task_sleep_sec (1);
	while (deff_get_active () == DEFF_TNF)
		task_sleep (TIME_500MS);
	leff_stop (LEFF_BONUS);
	callset_invoke (tnf_end);
}
Beispiel #14
0
void initials_enter (void)
{
	task_create_gid1 (GID_ENTER_INITIALS, initials_running);
	deff_start_sync (DEFF_ENTER_INITIALS);
}