Example #1
0
void prison_break_mode_init (void) {
	prison_break_suspend = FALSE;
			//the claw mode can expire on its own and since it is a lower priority it will not display
			//callset_invoke (end_claw_mode); // this seemed to cause occasional crashes
			clawmagnet_off ();
			global_flag_off(GLOBAL_FLAG_IS_BALL_ON_CLAW);
			flipper_enable ();
			ballsave_add_time (system_config.mode_ballsave);

	//reset counter if first time run, otherwise do not - player may restart prison_break while currently running
	if (! get_dm_mode(BREAKOUT_COMPLETED) ) {
		prison_break_mode_shots_made = 0;
		score_zero(prison_break_mode_score);
		score_zero(prison_break_mode_last_score);
	}

	sound_start (ST_SPEECH, SPCH_CRYO_PRISON_BREAKOUT, SL_4S, PRI_GAME_QUICK3);
	//flash lamp for a time
	lamp_tristate_flash(LM_CLAW_PRISON_BREAK);
	task_sleep(TIME_500MS);
	lamp_tristate_on(LM_CLAW_PRISON_BREAK);
	score_add(prison_break_mode_last_score, score_table[PRIS_BREAK_HIT_SCORE]);

	score_zero(prison_break_mode_next_score);
	if (get_dm_mode(BREAKOUT_COMPLETED)) 	{
		score(PRIS_BREAK_START_SCORE2);
		score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE2]);
	}
	else {
		score(PRIS_BREAK_START_SCORE1);
		score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE1]);
	}
	set_dm_mode(BREAKOUT_COMPLETED); //for next time
}//end of function
Example #2
0
void superjets_mode_init (void) {
		//the claw mode can expire on its own and since it is a lower priority it will not display
		//	callset_invoke (end_claw_mode); // this seemed to cause occasional crashes
			clawmagnet_off ();
			global_flag_off(GLOBAL_FLAG_IS_BALL_ON_CLAW);
			flipper_enable ();
			//reset counter if first time run, otherwise do not - player may restart acmag while currently running
	sound_start (ST_SPEECH, SPCH_SUPERJETS_ACTIVATED, SL_4S, PRI_GAME_QUICK3);
	ballsave_add_time (system_config.mode_ballsave);
	//flash lamp for a time
	lamp_tristate_flash(LM_CLAW_SUPER_JETS);
	task_sleep(TIME_500MS);
	lamp_tristate_on(LM_CLAW_SUPER_JETS);
	if (get_dm_mode(SJETS_COMPLETED)) 	{
		score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE2]);
		score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE2]);
		score(SUPERJETS_START_SCORE2);
	}
	else {
		superjets_mode_shots_made = 0;
		score_zero(superjets_mode_score);
		score_zero(superjets_mode_next_score);
		score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE1]);
		score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE1]);
		score(SUPERJETS_START_SCORE1);
	}
}//end of function
Example #3
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
Example #4
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
Example #5
0
CALLSET_ENTRY (gumball, sw_gumball_enter)
{
	/* Ball has entered the gumball machine. */
	dbprintf ("Gumball entered.\n");
	gumball_enable_from_trough = FALSE;
	gumball_count++;
	if (in_live_game)
	{
		if (!multi_ball_play ())
			leff_start (LEFF_GUMBALL_STROBE);
		gumball_running = TRUE;
		gumball_collected_count++;
		award_gumball_score ();
		gumball_release ();

		if (powerball_loaded_into_gumball == TRUE)
		{
			powerball_loaded_into_gumball = FALSE;
			leff_start (LEFF_FLASH_GI2);
			callset_invoke (mball_start);
			callset_invoke (mball_start_3_ball);
			callset_invoke (powerball_in_gumball);	
			/* Do a dodgy multiball combo */
			global_flag_on (GLOBAL_FLAG_SUPER_MB_RUNNING);
			ballsave_add_time (5);
			
			if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING)
				&& !global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING))
			{
				/* random_scaled (N) returns from 0 - N-1 */
				switch (random_scaled (2))
				{
					case 0:
						callset_invoke (sssmb_start);
						break;
					case 1:
						callset_invoke (chaosmb_start);
						break;
				}
			}
		}
		else
		{
			bounded_decrement (gumball_enable_count, 0);
		}
		if (!global_flag_test (GLOBAL_FLAG_SUPER_MB_RUNNING))
			deff_start (DEFF_GUMBALL);
	}
}
Example #6
0
void car_chase_mode_init (void) {
	car_chase_mode_shots_made = 0;
	flag_on (FLAG_IS_CARCHASE_MODE_RUNNING);
	ballsave_add_time (10);
	++car_chase_modes_achieved;
	diverter_stop();//defined in divhold2.ct
	task_kill_gid (GID_CR_LIGHTS);
	carchase_mode_on(); //at ramps.c
	serve_ball_auto(); //add one ball to the playfield - NOT a multiball since doesn't change global ball count
	sound_start (ST_SPEECH, SPCH_WUSS_SPARTAN, SL_4S, PRI_GAME_QUICK5);
	task_sleep_sec (2);
	sound_start (ST_SPEECH, SPCH_EXCUSE_ME, SL_4S, PRI_GAME_QUICK5);
	task_sleep_sec (1);
	sound_start (ST_SPEECH, SPCH_BETWEEN_YOU_N_ME, SL_4S, PRI_GAME_QUICK5);
	//flash lamp for a time
	score_zero(car_chase_mode_score);

	lamp_tristate_off (LM_CLAW_READY);
}//end of function