Пример #1
0
CALLSET_ENTRY (vpoker, sw_right_button)
{
	if (vpoker_active == TRUE)
	{
		bounded_increment (vpoker_index, 5);
		score_update_request ();
	}
}
Пример #2
0
CALLSET_ENTRY (vpoker, sw_left_button)
{
	if (vpoker_active == TRUE)
	{
		bounded_decrement (vpoker_index, 0);
		score_update_request ();
	}
}
Пример #3
0
CALLSET_ENTRY (vpoker, sw_buyin)
{
	if (vpoker_active == TRUE)
	{
		//vpoker_buyin_handler ();
		vpoker_active = FALSE;
		score_update_request ();
	}
}
Пример #4
0
CALLSET_ENTRY (initials, sw_right_button)
{
	if (initials_enter_timer)
	{
		++initials_selection;
		initials_selection %= ALPHABET_LEN;
		score_update_request ();
	}
}
Пример #5
0
CALLSET_ENTRY (initials, start_button_handler)
{
	if (initials_enter_timer && initials_index < NUM_INITIALS_ALLOWED)
	{
		initials_data[initials_index] =
			initial_chars[(initials_selection + SELECT_OFFSET) % ALPHABET_LEN];
		score_update_request ();
		if (++initials_index == NUM_INITIALS_ALLOWED)
		{
			(*initials_enter_complete) ();
			initials_stop ();
		}
	}
}
Пример #6
0
/** Adds to the current score.  The input score is given as a BCD-string. */
static void score_award (const bcd_t *s)
{
	if (in_tilt)
		return;
	if (!in_game)
	{
		nonfatal (ERR_SCORE_NOT_IN_GAME);
		return;
	}

	score_add (current_score, s);
	score_update_request ();
	replay_check_current ();
}
Пример #7
0
void vpoker_running (void)
{
	vpoker_active = TRUE;
	vpoker_index = 0;
	current_state = VPOKER_FIRST_DEAL;
	init_player_hand ();

	task_sleep_sec (1);
		
	deff_start (DEFF_VPOKER_DRAW);

	while (task_find_gid (GID_VPOKER))
	{
		task_sleep (TIME_1S + TIME_66MS);
		score_update_request ();
	}
	current_state = VPOKER_EXIT;
	vpoker_active = FALSE;
	task_exit ();
}
Пример #8
0
static void initials_running (void)
{
	task_sleep_sec (1);
	initials_enter_timer = 30;
	memset (initials_data, 0, sizeof (initials_data));
	initials_index = 0;
	initials_selection = 0;

#if 1
	initials_enter_complete = null_function;
#endif

	while (initials_enter_timer > 0)
	{
		task_sleep (TIME_1S + TIME_66MS);
		initials_enter_timer--;
		score_update_request ();
	}
	task_exit ();
}
Пример #9
0
/** Like score_add_byte, but modifies the current player's score.
 * This function is analogous to score_award(). */
void score_award_compact (U8 offset, bcd_t val)
{
	U8 mult;

	if (in_tilt)
		return;
	if (!in_live_game)
	{
		nonfatal (ERR_SCORE_NOT_IN_GAME);
		return;
	}

	mult = global_score_multiplier;
	do {
		score_add_byte (current_score, offset, val);
		mult--;
	} while (mult != 0);
	score_update_request ();
	replay_check_current ();
}