Ejemplo n.º 1
0
void dragrace_stop( void ) {
	flipper_enable();
	ball_search_monitor_start();
	racetrack_car_return();
	global_flag_off(GLOBAL_FLAG_DRAGRACE_IN_PROGRESS);
	task_kill_gid(GID_DRAGRACE_TASK);
}
Ejemplo n.º 2
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
Ejemplo n.º 3
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
Ejemplo n.º 4
0
void eject_video_mode_finished(void) {
//	task_create_gid1(GID_EJECT_LEFF, eject_leff);
	sol_request (SOL_EJECT); //request to fire the eject sol
	ball_search_monitor_start ();
//	task_sleep (TIME_300MS);
//	flag_off(FLAG_KILL_NORMAL_EJECT);
} //end of function
Ejemplo n.º 5
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
Ejemplo n.º 6
0
void fortress_start(U8 num) {
	computer_light_temp_off();
	is_fortress_running = TRUE;
	task_create_gid1 (GID_FORTRESS_START_NOISE, fortress_start_sounds);
	fortress_display_counter = 0;
	FORT_TOGGLE = 0;
	fortress_ballsave  = system_config.mb_ballsave;

	mb_mode_start(&fortress_mode);
	score_add (fortress_score, score_table[FORTRESS_MB_SCORE]);
	score (FORTRESS_MB_SCORE);

	if (!in_tilt) deff_start (DEFF_FORTRESS_START_EFFECT);
	multiball_started();//reset all MB start criteria for next time
	diverter_stop();//defined in divhold2.ct

	//LIGHTS
	if (!in_tilt) {
		leff_start (LEFF_MB_START);
			lamp_tristate_flash(LM_FORTRESS_MULTIBALL);
			task_sleep (TIME_2S);
			lamp_tristate_on (LM_FORTRESS_MULTIBALL);
			lamp_tristate_off (LM_FREEZE_1);
			lamp_tristate_off (LM_FREEZE_2);
			lamp_tristate_off (LM_FREEZE_3);
			lamp_tristate_off (LM_FREEZE_4);
	}
	//SOUNDS
	if (!in_tilt) {
			U8 	fortress_SoundCounter;
			fortress_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2
			if (fortress_SoundCounter == 0)
				sound_start (ST_SPEECH, SPCH_SOMETHING_RIGHT_PREV_LIFE, SL_4S, PRI_GAME_QUICK3);
			else
				sound_start (ST_SPEECH, SPCH_SEND_MANIAC, SL_4S, PRI_GAME_QUICK3);
			task_sleep (TIME_3S);
	}

	//serve balls
	if (!in_tilt) {
		if (num + live_balls >= 5) set_ball_count (5);
		else set_ball_count (num + live_balls);
		//task_sleep (TIME_3S);
		set_all_jackpots(); //all 6 lit

		//start the ball save timer
		task_create_gid1 (GID_FORTRESS_BALLSAVE_TIMER, fortress_ballsave_task);
		//recount the trough every 5 secs - this is to handle situations
		//where too many drains in rapid succession cause the game to lose
		//count of live balls - this only happens during MB
		callset_invoke (mb_trough_recount_timer_start);
	}
	//just in case - make sure this is running
	ball_search_monitor_start ();
	set_dm_mode2(FORTRESS_COMPLETED); //for BONUS
}//end of function
Ejemplo n.º 7
0
void score_extraball(void) {
	ball_search_monitor_stop ();
	flag_off(FLAG_IS_EXTRABALL_LIT);
	extraball_light_off ();
	task_kill_gid(GID_EXTRA_BALL_REMINDER);
	increment_extra_balls();
	leff_start (LEFF_EXTRABALL);
	deff_start (DEFF_EXTRA_BALL_EFFECT);
	ball_search_monitor_start ();
}//end of function
Ejemplo n.º 8
0
void wasteland_start(U8 num) {
//	kill_combos();
	computer_light_temp_off();
	task_create_gid1 (GID_WASTELAND_START_NOISE, wasteland_start_sounds);
	is_wasteland_running = TRUE;
	mb_mode_start(&wasteland_mode);

	score_add (wasteland_score, score_table[WASTELAND_MB_SCORE]);
	score (WASTELAND_MB_SCORE);

	wasteland_display_counter = 0;
	WL_TOGGLE = 0;
	wasteland_ballsave = TRUE;

	multiball_started();//reset all MB start criteria for next time
	deff_start (DEFF_WASTELAND_START_EFFECT);
	diverter_stop();//defined in divhold2.ct

	//LIGHTS
	leff_start (LEFF_MB_START);
			lamp_tristate_flash(LM_WASTELAND_MULTIBALL);
			task_sleep (TIME_2S);
			lamp_tristate_on (LM_WASTELAND_MULTIBALL);
			lamp_tristate_off (LM_FREEZE_1);
			lamp_tristate_off (LM_FREEZE_2);
			lamp_tristate_off (LM_FREEZE_3);
			lamp_tristate_off (LM_FREEZE_4);

	//SOUNDS
			U8 	wasteland_SoundCounter;
			wasteland_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2
			if (wasteland_SoundCounter == 0)
				sound_start (ST_SPEECH, SPCH_IN_THIS_CENTURY, SL_4S, PRI_GAME_QUICK2);
			else
				sound_start (ST_SPEECH, SPCH_FEEL_GOOD_TOO, SL_4S, PRI_GAME_QUICK2);
	task_sleep (TIME_3S);
	wasteland_start_music = FALSE; //for to kill the music

	//serve balls
	if (num + live_balls >= 5) set_ball_count (5);
	else set_ball_count (num + live_balls);
	task_create_gid1 (GID_WASTELAND_BALL_SAVE, wasteland_ballsave_task);

	//task_sleep (TIME_3S);

	set_all_jackpots(); //all 6 lit
	//recount the trough every 5 secs - this is to handle situations
	//where too many drains in rapid succession cause the game to lose
	//count of live balls - this only happens during MB
	callset_invoke (mb_trough_recount_timer_start);

	//just in case - make sure this is running
	ball_search_monitor_start ();
	set_dm_mode2(WASTELAND_COMPLETED); //for BONUS
}//end of function
Ejemplo n.º 9
0
void coin_door_closed (void)
{
	global_flag_off (GLOBAL_FLAG_COIN_DOOR_OPENED);

	if (in_live_game && system_config.coin_door_ball_save)
	{
#ifdef DEVNO_TROUGH
		dbprintf ("resetting to %d balls\n", live_balls_before_door_open);
		if (live_balls_before_door_open != live_balls)
		{
			set_ball_count (live_balls_before_door_open);
#ifdef DEFF_BALL_SAVE
		deff_start (DEFF_BALL_SAVE);
#endif
		}
#endif
		ball_search_monitor_start ();
		live_balls_before_door_open = 0;
	}
}
Ejemplo n.º 10
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
Ejemplo n.º 11
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