Ejemplo n.º 1
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.º 2
0
//we always start with these 3 lights on because those are the skillshots
void combo_reset (void) {
	flag_on (FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
	flag_on (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
	flag_on (FLAG_IS_COMBO_UNDER_ACTIVATED);
	flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED);
	flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
	flag_on (FLAG_IS_COMBOS_RESTARTABLE);
	if (flag_test (FLAG_IS_COMPUTER_ACTIVATED) ) computer_light_on();
	all_arrow_update(); // at arrow_handler.c
}//end of function
Ejemplo n.º 3
0
static void shot_slot_door (void)
{
	flag_off (FLAG_SLOT_DOOR_LIT);
	flag_on (FLAG_PIANO_DOOR_LIT);
	callset_invoke (select_mode);
	callset_invoke (award_door_panel);
}
Ejemplo n.º 4
0
void trickmb_start (void)
{
	if (0)
		super_trick_enable ();
	mb_mode_start (&trickmb_mode);
	flag_off (FLAG_TRICK_MB_LIT);
}
Ejemplo n.º 5
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.º 6
0
/****************************************************************************
 *
 * body
 *
 ****************************************************************************/
void combo_init(void) {
	flag_off (FLAG_IS_COMBOS_KILLED);
	flag_on (FLAG_IS_COMBOS_RESTARTABLE);
	choose_random_flag_set();
	all_arrow_update(); // at arrow_handler.c
	task_create_gid1 (GID_COMBO, combo_task);
}//end of function
Ejemplo n.º 7
0
CALLSET_ENTRY (magna_goalie_user, sw_magnet_button)
{
	if (flag_test (FLAG_MAGNA_GOALIE_LIT))
	{
		flag_off (FLAG_MAGNA_GOALIE_LIT);
		magna_goalie_activate ();
	}
}
Ejemplo n.º 8
0
CALLSET_ENTRY (hocus_pocus, sw_left_drain_eddy, sw_right_drain_eddy)
{
	if (hocus_pocus_can_be_started ())
	{
		flag_off (FLAG_HOCUS_POCUS_LIT);
		hocus_pocus_count = 0;
	}
}
Ejemplo n.º 9
0
void quickmb_start (void)
{
	if (quickmb_can_be_started ())
	{
		flag_off (FLAG_QUICK_MB_LIT);
		mb_mode_start (&quick_mb_mode);
	}
}
Ejemplo n.º 10
0
void skillshot_rollover_enable( void ) {
	current_rollover = SW_MIDDLE_ROLLOVER;
	global_flag_on(GLOBAL_FLAG_SKILLSHOT_ROLLOVER_ENABLED);
	flag_off (FLAG_LOOP_GATE_OPENED);

	// kill any existing task, just to make sure
	task_kill_gid (GID_SKILLSHOT_ROLLOVER_TIMER);
	task_create_gid1 (GID_SKILLSHOT_ROLLOVER_TIMER, skillshot_rollover_timer);
}
Ejemplo n.º 11
0
void huxley_player_reset (void) {
	if (IN_TEST) huxley_goal = 1;
	else		 huxley_goal = HUXLEY_EASY_GOAL;

	flag_off(FLAG_IS_HUXLEY_ENABLED);
	flag_off(FLAG_IS_HUXLEY_RUNNING);
	huxley_reset();
	huxley_counter = 0;
	huxley_modes_achieved = 0;
	huxley_mode_shots_made = 0;
	score_zero(huxley_mode_score_total_score);
	task_kill_gid(GID_HUXLEY_REMINDER);

#ifdef CONFIG_DIFFICULTY_LEVEL
	if (system_config.difficulty == EASY) 	huxley_goal = HUXLEY_EASY_GOAL;
	else									huxley_goal = HUXLEY_HARD_GOAL;
#endif
}//end of function
Ejemplo n.º 12
0
errr remove_flag(bitflag *flags, const size_t size, const char **flag_table, const char *flag_name) {
	int flag = lookup_flag(flag_table, flag_name);

	if (flag == FLAG_END) return PARSE_ERROR_INVALID_FLAG;

	flag_off(flags, size, flag);

	return 0;
}
Ejemplo n.º 13
0
void finale_start (void)
{
	if (finale_can_be_started ())
	{
		flag_off (FLAG_FINALE_LIT);
		lamp_tristate_flash (LM_GRAND_FINALE);
		lamplist_apply (LAMPLIST_MODES, lamp_flash_on);
		finale_level = 1;
	}
}
Ejemplo n.º 14
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.º 15
0
//after we are sure we have a valid MB start, we reset everything for next time
void multiball_started(void) {
	NumMBsDone++;
	flag_off(FLAG_IS_MULTIBALL_ENABLED);
	NumBallsFrozen = 0;
	multiball_light_off();//goto orbits.c to turn off light and flag
	lamp_tristate_off (LM_FREEZE_1);
	lamp_tristate_off (LM_FREEZE_2);
	lamp_tristate_off (LM_FREEZE_3);
	lamp_tristate_off (LM_FREEZE_4);
}//end of function
Ejemplo n.º 16
0
CALLSET_ENTRY (cryoprison, end_ball) {
	if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)) {
		mb_mode_end_ball (&cryoprison_mode);
		jackpot_reset();
		end_super_jackpot_reminder();
		flag_off(FLAG_IS_CRYOPRISON_MB_RUNNING);

		if (!flag_test(FLAG_BACK_IN_THE_FRIDGE_ACTIVATED) )
			enable_back_in_the_fridge(); //at completion of our 4th MB we enable the wizard mode
	}
}//end of function
Ejemplo n.º 17
0
//this is a hard kill that prevents combos from restarting
//we only use this during certain modes
void kill_combos(void) {
	flag_off (FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED);
	flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED);
	flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED);

	flag_on (FLAG_IS_COMBOS_KILLED);
	flag_off (FLAG_IS_COMBOS_RESTARTABLE);
	all_arrow_update();
}//end of function
Ejemplo n.º 18
0
//called from computer award in underground.c
void comp_award_light_arrows(void) {
	flag_off (FLAG_IS_COMBOS_KILLED);
	flag_on 	(FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
	flag_on 	(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
	flag_on 	(FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
	flag_on 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
	flag_on 	(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
	flag_on 	(FLAG_IS_COMBO_LEFTORB_ACTIVATED);
	flag_on 	(FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
	all_arrow_update();
	task_recreate_gid (GID_COMBO, combo_task);
}//end of function
Ejemplo n.º 19
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
Ejemplo n.º 20
0
void common_outlane (void)
{
	score (SC_50K);
	rudy_look_straight ();
	if (!flag_test (FLAG_STEPS_OPEN))
		sample_start (SND_OUTLANE, SL_500MS);
	if (lamp_test (LM_SPECIALS))
	{
		lamp_off (LM_SPECIALS);
		flag_off (FLAG_OUTLANES_LIT);
		special_award ();
	}
}
Ejemplo n.º 21
0
//puts in grace period if set
CALLSET_ENTRY (cryoprison, single_ball_play) {
	if (flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)) {
		mb_mode_end_ball (&cryoprison_mode);
		end_super_jackpot_reminder();
		combo_init();
		diverter_check();

		enable_back_in_the_fridge(); //at completion of our 4th MB we enable the wizard mode

		//this acts as kind of a grace period for the jackpots
		task_sleep_sec(3);
		flag_off(FLAG_IS_CRYOPRISON_MB_RUNNING);
		jackpot_reset();
	}
}//end of function
Ejemplo n.º 22
0
void player_combo_reset (void) {
	if (IN_TEST) 	{ combo_goal = 10; combo_vm_goal = 2; }
	else		 	{ combo_goal = COMBO_EASY_GOAL; combo_vm_goal = COMBO_VM_EASY_GOAL; }

	combo_counter = 0;
	flag_off (FLAG_IS_COMPUTER_ACTIVATED);

	#ifdef CONFIG_DIFFICULTY_LEVEL
if (system_config.difficulty == EASY) {
	combo_goal = COMBO_EASY_GOAL;
	combo_vm_goal = COMBO_VM_EASY_GOAL;
}//end of if
else	{
	combo_goal = COMBO_HARD_GOAL;
	combo_vm_goal = COMBO_VM_HARD_GOAL;
} //END OF ELSE
#endif
}//end of function
Ejemplo n.º 23
0
void combo_task (void) {
	task_sleep_sec(COMBO_WAIT_TIME);
	//no combo made yet so flash active lamps
	flash_combos();
	task_sleep_sec(COMBO_HURRY_TIME);
	//still no hits so turn off flags and lamps until something is hit
	flag_off (FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_UNDER_ACTIVATED);
	flag_off (FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
	flag_off (FLAG_IS_COMBO_LEFTORB_ACTIVATED);
	flag_off (FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
	flag_on (FLAG_IS_COMBOS_KILLED);
	flag_on (FLAG_IS_COMBOS_RESTARTABLE);
	all_arrow_update();
	task_exit();
}//end of function
Ejemplo n.º 24
0
/****************************************************************************
 * initialize  and exit
 ***************************************************************************/
CALLSET_ENTRY (huxley, start_player) 	{
	if (DM_IN_CAB_TEST) huxley_goal = 1;
	else		 huxley_goal = HUXLEY_EASY_GOAL;

	huxley_counter = 0;
	huxley_mode_shots_made = 0;
	score_zero(huxley_mode_score_total_score);
	task_kill_gid(GID_HUXLEY_REMINDER);

#ifdef CONFIG_DIFFICULTY_LEVEL
	huxley_goal = system_config.num2huxley;
#endif

	if (huxley_goal == 0) flag_on(FLAG_IS_HUXLEY_ENABLED);
	else flag_off(FLAG_IS_HUXLEY_ENABLED);

	//for testing
//	huxley_increment();
	huxley_suspend = FALSE;
}//end of function
Ejemplo n.º 25
0
/****************************************************************************
 * initialize  and exit
 ***************************************************************************/
void cryoprison_player_reset (void) {
	flag_off(FLAG_IS_CRYOPRISON_MB_RUNNING);
	score_zero(cryoprison_score);
	cryoprison_jackpot_shots_made = 0; //these need to be zeroed in before we enter the mode so bonus doesn't fake trigger
	cryoprison_start_music = FALSE;
}//end of function
Ejemplo n.º 26
0
//this is an exit on timeout, ball still in play
void car_chase_mode_expire (void) {
	carchase_mode_off(); //at ramps.c
	flag_off (FLAG_IS_CARCHASE_MODE_RUNNING);
	diverter_check();
}//end of function
Ejemplo n.º 27
0
//this is an exit on end of ball
//must do this differently to prevent excessive cycling of diverter which
//tends to blow fuses
void car_chase_mode_exit (void) {
	carchase_mode_off(); //at ramps.c
	flag_off (FLAG_IS_CARCHASE_MODE_RUNNING);

	timed_mode_end2(&car_chase_mode);
}//end of function
Ejemplo n.º 28
0
/****************************************************************************
 *
 * randomize flag chosen
 *
 * we are using a very stupid and in-elegant
 * way of randomness - basically, we have a number
 * of predefined sets of flags and we randomly
 * pick one of those sets
 ****************************************************************************/
void choose_random_flag_set(void) {
	U8 random_chooser;
	random_chooser = random_scaled(5);
	switch (random_chooser) {
	case 0:
		flag_on 	(FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_LEFTORB_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
		break;
	case 1:
		flag_on 	(FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_LEFTORB_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
		break;
	case 2:
		flag_off 	(FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_LEFTORB_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
		break;
	case 3:
		flag_off 	(FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_LEFTORB_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
		break;
	case 4:
		flag_on 	(FLAG_IS_COMBO_SIDERAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_LEFTRAMP_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_RIGHTRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_CENTERRAMP_ACTIVATED);
		flag_off 	(FLAG_IS_COMBO_LEFTORB_ACTIVATED);
		flag_on 	(FLAG_IS_COMBO_RIGHTORB_ACTIVATED);
		break;
	}//end of switch
	//if 1 or less shot away from computer award then do not light underground shot
	if (	flag_test(FLAG_IS_COMBO_UNDER_ACTIVATED)
		&&	(flag_test(FLAG_IS_COMPUTER_ACTIVATED)
		||	combo_goal == combo_counter + 1) )			flag_off 	(FLAG_IS_COMBO_UNDER_ACTIVATED);
}//end of function
Ejemplo n.º 29
0
/****************************************************************************
 * initialize  and exit
 ***************************************************************************/
void car_chase_reset (void) {
	flag_off (FLAG_IS_CARCHASE_MODE_RUNNING);
}//end of function
Ejemplo n.º 30
0
CALLSET_ENTRY (trivial, start_ball)
{
	flag_off (FLAG_MILLION_LIT);
}