当前位置: 首页>>代码示例>>C++>>正文


C++ callset_invoke函数代码示例

本文整理汇总了C++中callset_invoke函数的典型用法代码示例。如果您正苦于以下问题:C++ callset_invoke函数的具体用法?C++ callset_invoke怎么用?C++ callset_invoke使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了callset_invoke函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ball_search_run

/** Run through all solenoids to try to find a ball. */
void ball_search_run (void)
{
	U8 sol;

	ball_search_count++;
	dbprintf ("Ball search %d\n", ball_search_count);

	/* Fire all solenoids.  Skip over solenoids known not to be
	pertinent to ball search.  Before starting, throw an event
	so machines can do special handling on their own. */
	callset_invoke (ball_search);
	task_sleep (TIME_200MS);

	for (sol = 0; sol < NUM_POWER_DRIVES; sol++)
	{
		if (ball_search_solenoid_ok (sol))
		{
			sol_request_async (sol);
			task_sleep (TIME_200MS);
		}

		/* If a switch triggered, stop the ball search immediately */
		if (ball_search_timer == 0)
			break;
	}
	callset_invoke (ball_search_end);
}
开发者ID:Dave2084,项目名称:freewpc,代码行数:28,代码来源:search.c

示例2: CALLSET_ENTRY

CALLSET_ENTRY (shot, sw_left_rollover, sw_middle_rollover, sw_right_rollover)
{
	if (task_kill_gid (GID_LEFT_ORBIT))
		callset_invoke (left_orbit_to_rollover_shot);
	else if (task_kill_gid (GID_RIGHT_ORBIT))
		callset_invoke (right_orbit_to_rollover_shot);
}
开发者ID:CardonaPinball,项目名称:freewpc,代码行数:7,代码来源:shots.c

示例3: CALLSET_ENTRY

CALLSET_ENTRY (jet, sw_jet)
{
	
	task_create_gid1 (GID_JET_SOUND, sw_jet_sound);
	if (global_flag_test(GLOBAL_FLAG_POWERBALL_IN_PLAY))
		jets_scored += 2;
	else
		jets_scored++;
	
	if (jets_scored >= jets_for_bonus)
	{	
		jets_level_up ();
	}

	if (timed_mode_running_p (&tsm_mode))
	{
		score (SC_500K);
		score_add (tsm_mode_total, score_table[SC_500K]);
		callset_invoke (respawn_dollar);
	}
	else
	{	
		score (SC_150K);
		/* Stop deff from restarting whilst we
		 * are showing the level up deff
		 * or when the hitch anim is running */
		if (!timer_find_gid (GID_HITCHHIKER) && !task_find_gid (GID_JETS_LEVEL_UP))
			deff_restart (DEFF_JETS_HIT);
	}
	/* Hack for when mpf_exit switch breaks */
	if (!multi_ball_play () && mpf_timer > 0)
		callset_invoke (sw_mpf_exit);
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:33,代码来源:jets.c

示例4: shot_slot_door

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);
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:7,代码来源:slot.c

示例5: add_units

/** Increment the units counter for a particular slot. */
void add_units (U8 n)
{
	csum_area_check (&coin_csum_info);
	if (credit_count >= price_config.max_credits)
		return;

	nvram_add (unit_count, n);
	if (unit_count >= price_config.units_per_credit)
	{
		while (unit_count >= price_config.units_per_credit)
		{
			nvram_subtract (unit_count, price_config.units_per_credit);
			add_credit ();
			audit_increment (&system_audits.paid_credits);
		}
		callset_invoke (add_credits);
	}
	else
	{
#ifdef MACHINE_ADD_COIN_SOUND
		sound_send (MACHINE_ADD_COIN_SOUND);
#endif
		callset_invoke (add_partial_credits);
		announce_credits ();
	}
	csum_area_update (&coin_csum_info);
	pinio_nvram_lock ();
}
开发者ID:hydra,项目名称:freewpc,代码行数:29,代码来源:coin.c

示例6: dragrace_task

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();
}
开发者ID:hydra,项目名称:freewpc,代码行数:12,代码来源:vmode_dragrace.c

示例7: device_remove_live

/** Called by the trough when a ball has entered it.
 * The intent is to signal that there is one less live ball than before.
 */
void device_remove_live (void)
{
	/* If any balls were missing, and now one is rediscovered in the
	 * trough, then just hold onto it.  This condition was seen when
	 * the game thought 1 ball was in play, but 2 were on the playfield. */
	if (missing_balls > live_balls)
	{
		callset_invoke (missing_ball_found);
		missing_balls--;
	}
	else if (live_balls > 0)
	{
		/* Decrement the count of balls in play.  Now what? */
		live_balls--;
		if (in_game && !in_bonus)
		{
			/* Notify that the ball count changed */
			callset_invoke (ball_count_change);

			/* See if this qualifies as a ball drain.  Any event receiver
			can return FALSE here if it is not to be treated as a drain;
			e.g., when a ballsaver is active.  In these cases, the
			event function is also responsible for putting the ball
			back into play. */
			if (!callset_invoke_boolean (ball_drain))
				return;

			/* OK, at this point, it is a true ball drain event.
			See how many balls are in play now. */
			switch (live_balls
#ifdef DEVNO_TROUGH
				 + device_entry (DEVNO_TROUGH)->kicks_needed
#endif
				)
			{
				case 0:
					/* With zero balls in play, this is end of ball.
					This function usually does not return; it will stop just about
					every task running to reset for the next ball. */
					end_ball ();
					return;

				case 1:
					/* Multiball modes like to know when single ball play resumes. */
					callset_invoke (single_ball_play);
					break;
				default:
					break;
			}
		}
	}
}
开发者ID:Dmilo,项目名称:freewpc,代码行数:55,代码来源:device.c

示例8: bpt_hit

/**
 * Handle a breakpoint.  The system is stopped until the user forces it
 * to continue, either by pressing 'p' in the debug console, or presses
 * the Escape Button.  Interrupt-level functions continue to run while
 * paused; only regular task scheduling is paused.  In order to poll for
 * the continue, we have to invoke the switch and debugger periodic
 * functions.
 */
void bpt_hit (void)
{
	U8 key;

	db_paused = 1 - db_paused;
	if (db_paused == 1)
	{
		callset_invoke (debug_enter);
		db_tilt_flag = in_tilt;
		in_tilt = FALSE;
		bpt_display ();
	}
	else
	{
		in_tilt = db_tilt_flag;
		callset_invoke (debug_exit);
	}

	while (db_paused == 1)
	{
		if ((key = button_check (SW_ENTER)))
		{
			/* Enter = change active field */
			bpt_display ();
		}
		else if ((key = button_check (SW_UP)))
		{
			/* Up = increase field value */
			bpt_mem_addr += key * 4;
			bpt_mem_addr = (void *) (((U16)bpt_mem_addr) & 0x1FFFUL);
			bpt_display ();
		}
		else if ((key = button_check (SW_DOWN)))
		{
			/* Down = decrease field value */
			bpt_mem_addr -= key * 4;
			bpt_mem_addr = (void *) (((U16)bpt_mem_addr) & 0x1FFFUL);
			bpt_display ();
		}
		else
		{
			switch_periodic ();
			db_periodic ();
			task_runs_long ();
		}
	}
#ifdef CONFIG_DMD_OR_ALPHA
	dmd_alloc_low_clean ();
	dmd_show_low ();
#endif
}
开发者ID:Curbfeeler,项目名称:freewpc,代码行数:59,代码来源:db.c

示例9: CALLSET_ENTRY

CALLSET_ENTRY (autofire, ball_search)
{
	/* The shooter divertor/autofire are both kicked here
	since there is a dependency between the two.  The main
	ball search routine is told not to kick either one of them. */
	if (switch_poll_logical (SW_AUTOFIRE2) || switch_poll_logical (SW_AUTOFIRE1))
	{
		callset_invoke (clear_autofire);
	}
	else if (feature_config.fire_when_detected_empty == YES)
	{
		callset_invoke (clear_autofire);
	}
}
开发者ID:Curbfeeler,项目名称:freewpc,代码行数:14,代码来源:autofire.c

示例10: CALLSET_ENTRY

CALLSET_ENTRY (slot, dev_slot_enter)
{
	if (task_kill_gid (GID_CAMERA_SLOT_PROX_DETECT)
		 || task_kill_gid (GID_PIANO_SLOT_PROX_DETECT))
	{
		/* Proximity sensor did not trip ; must be the powerball */
		pb_detect_event (PF_PB_DETECTED);
		pb_announce ();
	}

	if (!in_live_game)
		return;
	else if (task_find_or_kill_gid (GID_DEADEND_TO_SLOT)
	 	|| task_find_or_kill_gid (GID_GUMBALL_TO_SLOT)
		|| task_find_or_kill_gid (GID_PIANO_TO_SLOT)
		|| task_find_or_kill_gid (GID_CAMERA_TO_SLOT))
	{
		/* dead end was recently hit, so ignore slot */
		/* piano was recently hit, so ignore slot */
		/* camera was recently hit, so ignore slot */
	}
	else if (event_did_follow (skill_shot, slot)
		|| skill_shot_enabled
		|| global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING))
	{
		/* TODO, this may be buggy during sssmb */
		/* skill shot has been missed or ball landed in plunger lane*/
		if (timer_kill_gid (GID_SDSS_APPROACHING)) 
			callset_invoke (sdss_ready);
		callset_invoke (skill_missed);
	}
	else if (timed_mode_running_p (&sslot_mode))
	{
		//TODO If shot from lite slot lane, allow player to choose award
		shot_sslot ();
	}
	else if (can_award_door_panel () && flag_test (FLAG_SLOT_DOOR_LIT))
	{
		shot_slot_door ();
	}
	else 
	{
		shot_slot_oddchange ();
	}
	/* Sleep so the deffs can get a chance to start and stop it
	 * kicking out too early */
	task_sleep (TIME_400MS);
	
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:49,代码来源:slot.c

示例11: CALLSET_ENTRY

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);
	}
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:49,代码来源:gumball.c

示例12: tnf_deff

void tnf_deff (void)
{
	bool blink_on = TRUE;
	tnf_x = 0;
	tnf_y = 0;
	timer_restart_free (GID_TNF_TIMER, TIME_4S);
	while (tnf_buttons_pressed < 100 && task_find_gid (GID_TNF_TIMER))
	{
		dmd_alloc_pair_clean ();
		if (blink_on)
		{
			font_render_string_center (&font_mono5, 64, 4, "HIT FLIPPER BUTTONS");
			blink_on = FALSE;
		}
		else
			blink_on = TRUE;
		psprintf ("%d DOINK", "%d DOINKS", tnf_buttons_pressed);
		font_render_string_center (&font_term6, 60 + tnf_x, 12 + tnf_y, sprintf_buffer);
		dmd_copy_low_to_high ();
		callset_invoke (score_overlay);
		draw_progress_bar (&tnf_progress_bar);
		dmd_show2 ();
		task_sleep (TIME_66MS);
	}
	deff_exit ();
}
开发者ID:SonnyJim,项目名称:freewpc,代码行数:26,代码来源:tnf.c

示例13: CALLSET_ENTRY

CALLSET_ENTRY (clock_millions, sw_clock_target)
{
	
	if (timed_mode_running_p (&clock_millions_mode))
	{
		leff_start (LEFF_CLOCK_TARGET);
		/* Award bonus if hit 6 times */
		if (++clock_mode_hits > 5)
		{
			sound_send (SND_EXPLOSION_3);
			score (SC_20M);
			score_add (clock_mode_score, score_table[SC_20M]);
			deff_start (DEFF_CLOCK_MILLIONS_EXPLODE);
			timed_mode_end (&clock_millions_mode);
		}
		else
		{
			sound_send (SND_CLOCK_BELL);
			score (SC_5M);
			score_add (clock_mode_score, score_table[SC_5M]);	
			deff_start (DEFF_CLOCK_MILLIONS_HIT);
		}
		if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING))
			tz_clock_reverse_direction ();
		tz_clock_set_speed (clock_mode_hits);
	}
	else if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING))
	{
		callset_invoke (sw_jet_noflash);
		score (SC_50K);
		sound_send (SND_NO_CREDITS);
	}
}
开发者ID:CardonaPinball,项目名称:freewpc,代码行数:33,代码来源:clockmillions.c

示例14: deff_update

/**
 * Request that the background display effect be updated.
 *
 * This finds a display effect to run when nothing has been explicitly
 * started or is in the queue.  It ensures that something is always running.
 */
void deff_update (void)
{
	deffnum_t previous;

	/* If there is a transient effect running, then
	don't try anything.  We'll update the background automatically
	when the foreground exits. */
	if (deff_running && (deff_running != deff_background))
		return;

	/* Recalculate which display effect should run in the
	background */
	previous = deff_running;
	deff_prio = PRI_NULL;
	deff_background = DEFF_NULL;
	if (!in_test)
		callset_invoke (display_update);

	/* Nothing to do if it's already running */
	if (deff_background == previous)
		return;

	/* Switch to the new effect */
	deff_debug ("deff_update: %d -> %d\n", previous, deff_background);
	if (previous != DEFF_NULL)
		deff_stop (previous);
	if (deff_background != DEFF_NULL)
	{
		const deff_t *bgdeff = &deff_table[deff_background];
		deff_running = deff_background;
		deff_start_task (bgdeff);
	}
}
开发者ID:Mole23,项目名称:freewpc,代码行数:39,代码来源:deff.c

示例15: CALLSET_ENTRY

CALLSET_ENTRY (slot, dev_slot_enter)
{
	if (event_did_follow (dead_end, slot)
	 	|| event_did_follow (gumball_exit, slot)
		|| event_did_follow (piano, slot)
		|| event_did_follow (camera, slot))
	{
		/* dead end was recently hit, so ignore slot */
		/* piano was recently hit, so ignore slot */
		/* camera was recently hit, so ignore slot */
	}
	else if (event_did_follow (skill_shot, slot))
	{
		/* skill shot has been missed */
		callset_invoke (skill_missed);
	}
	else if (timed_mode_running_p (&sslot_mode))
	{
		sslot_award ();
		score (SC_10M);
		timed_mode_end (&sslot_mode);
	}
	else
	{
		score (SC_50K);
		/* Tell door.c that the slot machine was hit */
		//callset_invoke (shot_slot_machine);
		task_create_anon (shot_slot_task);
		task_sleep (TIME_500MS);
	}
}
开发者ID:CardonaPinball,项目名称:freewpc,代码行数:31,代码来源:slot.c


注:本文中的callset_invoke函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。