CALLSET_ENTRY (jets, jet_hit) { // task_recreate_gid (GID_JETS, jet_hit_task); //score_copy (temp_score, current_score); flasher_pulse (FLASH_RIGHT_HELMET); /* Make a sound, based on level */ if (!free_timer_test (timer_jets_level_up)) sound_send (jet_sounds[jets_level][jets_sound_index]); jets_sound_index++; if (jets_sound_index > 2) jets_sound_index = 0; if (timed_mode_running_p (&jets_frenzy_mode)) { score (SC_500K); } else if (score_compare (total_jets_score, score_table[SC_500K]) >= 0) { timed_mode_begin (&jets_frenzy_mode); score (SC_500K); score_add (jets_frenzy_total, score_table[SC_500K]); } else { /* Score the hit, based on level */ score_add (total_jets_score, score_table[jets_hit_scores[jets_level]]); score_long (score_table[jets_hit_scores[jets_level]]); bounded_increment (jets_hit, 255); /* Level up if needed */ if (jets_hit >= jets_needed[jets_level]) { bounded_increment (jets_level, 4); score_long (score_table[jets_level_up_scores[jets_level]]); jets_hit = 0; free_timer_restart (timer_jets_level_up, TIME_2S); sound_send (SND_WHOOSH_UP_1); } if ((score_compare (total_jets_score, score_table[SC_250K]) >= 0) && !flag_test (FLAG_250K_JETS)) callset_invoke (wheel_award_jets); deff_restart (DEFF_JET_HIT); } }
CALLSET_ENTRY (jets, lamp_update) { if (!timed_mode_running_p (&jets_frenzy_mode)) { lamplist_apply (LAMPLIST_JETS_ENTER, lamp_off); if (score_compare (total_jets_score, score_table[SC_25K]) >= 0) lamp_on (LM_JETS_25K); if (score_compare (total_jets_score, score_table[SC_50K]) >= 0) lamp_on (LM_JETS_50K); if (score_compare (total_jets_score, score_table[SC_100K]) >= 0) lamp_on (LM_JETS_100K); if (score_compare (total_jets_score, score_table[SC_500K]) >= 0) lamp_on (LM_JETS_500K); } }
void jets_active_task (void) { while (timed_mode_running_p (&tsm_mode)) { lamp_tristate_off (LM_RIGHT_JET); lamp_tristate_on (LM_LEFT_JET); task_sleep (TIME_100MS); lamp_tristate_off (LM_LEFT_JET); lamp_tristate_on (LM_LOWER_JET); task_sleep (TIME_100MS); lamp_tristate_off (LM_LOWER_JET); lamp_tristate_on (LM_RIGHT_JET); task_sleep (TIME_100MS); } lamp_tristate_on (LM_LEFT_JET); lamp_tristate_on (LM_LOWER_JET); lamp_tristate_on (LM_RIGHT_JET); task_exit (); }
CALLSET_ENTRY (hitch, sw_hitchhiker) { if (timed_mode_running_p (&hitch_mode)) { score (SC_10M); sound_send (SND_HITCHHIKER_COUNT); } else { score (SC_250K); sound_send (SND_HITCHHIKER_DRIVE_BY); award_unlit_shot (SW_HITCHHIKER); } bounded_increment (hitch_count, 99); if ((hitch_count < 20 && hitch_count % 5 == 0) || (hitch_count >= 20 && hitch_count % 10 == 0)) { mpf_enable_count++; sound_send (SND_ARE_YOU_READY_TO_BATTLE); } deff_start (DEFF_HITCHHIKER); }
void hitchhiker_deff (void) { /* Start a timer so jets won't stop animation */ timer_restart_free (GID_HITCHHIKER, TIME_3S); dmd_alloc_pair_clean (); U16 fno; for (fno = IMG_HITCHHIKER_START; fno <= IMG_HITCHHIKER_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); if (timed_mode_running_p (&hitch_mode)) { sprintf("10 MILLION"); font_render_string_center (&font_fireball, 64, 16, sprintf_buffer); } else { sprintf ("HITCHERS"); font_render_string_center (&font_nayupixel10, 98, 5, sprintf_buffer); sprintf ("%d", hitch_count); font_render_string_center (&font_quadrit, 99, 24, sprintf_buffer); } dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); //task_sleep (TIME_33MS); } task_sleep (TIME_500MS); /* Stop the timer so jets.c can show deffs again */ timer_kill_gid (GID_HITCHHIKER); deff_exit (); }
/**************************************************************************** * * body * ***************************************************************************/ U8 get_prison_break_timer (void) { if (timed_mode_running_p (&prison_break_mode) ) return timed_mode_get_timer (&prison_break_mode); else return (0); }//end of function
CALLSET_ENTRY (prison_break, end_ball, tilt) { if (timed_mode_running_p(&prison_break_mode) ) timed_mode_end (&prison_break_mode); }
/** * Return true if the ballsaver is active. */ bool ballsave_test_active (void) { return timed_mode_running_p (&ball_save_mode); }
CALLSET_ENTRY (car_chase, end_ball) { if (timed_mode_running_p(&car_chase_mode) ) car_chase_mode_exit(); }
CALLSET_ENTRY (superjets, end_ball, tilt) { if (timed_mode_running_p(&superjets_mode) ) timed_mode_end (&superjets_mode); }//end of function
/**************************************************************************** * body * ***************************************************************************/ bool is_sjets_running (void) { return timed_mode_running_p (&superjets_mode); }//end of function
bool hurryup_is_running (void) { return timed_mode_running_p (&hurryup_mode); }
/**************************************************************************** * * body * ***************************************************************************/ U8 get_huxley_timer (void) { if (timed_mode_running_p (&huxley_mode) ) return timed_mode_get_timer (&huxley_mode); else return (0); }//end of function
CALLSET_ENTRY (huxley, end_ball, tilt) { if (timed_mode_running_p(&huxley_mode) ) timed_mode_end (&huxley_mode); task_kill_gid (GID_HUXLEY_REMINDER); }
CALLSET_ENTRY (huxley, end_ball) { if (timed_mode_running_p(&huxley_mode) ) timed_mode_end (&huxley_mode); }
bool is_prison_break_running (void) { return timed_mode_running_p (&prison_break_mode); }//end of function
bool is_huxley_running (void) { return timed_mode_running_p (&huxley_mode); }//end of function
bool double_score_is_running (void) { return timed_mode_running_p (&double_score_mode); }