static int perform_ground_actions( void )
{
    if( motor_signals.front > 0 || motor_signals.right > 0 ||
        motor_signals.rear  > 0 || motor_signals.left  > 0 )
    {
        if( motor_signals.front > 0 )
        {
            motor_signals.front -= MOTOR_REVVING_STEP;
        }

        if( motor_signals.right > 0 )
        {
            motor_signals.right -= MOTOR_REVVING_STEP;
        }

        if( motor_signals.rear > 0 )
        {
            motor_signals.rear -= MOTOR_REVVING_STEP;
        }

        if( motor_signals.left > 0 )
        {
            motor_signals.left -= MOTOR_REVVING_STEP;
        }
    }
    else
    {
        reset_motors( );
        reset_controllers( );
    }

    return( 0 );
}
Beispiel #2
0
static void interpret_cycle() {
	int old_sound, old_score;

	if (game.player_control)
		game.vars[V_ego_dir] = game.view_table[0].direction;
	else
		game.view_table[0].direction = game.vars[V_ego_dir];

	check_all_motions();

	old_score = game.vars[V_score];
	old_sound = getflag(F_sound_on);

	game.exit_all_logics = false;
	while (run_logic(0) == 0 && !game.quit_prog_now) {
		game.vars[V_word_not_found] = 0;
		game.vars[V_border_touch_obj] = 0;
		game.vars[V_border_code] = 0;
		old_score = game.vars[V_score];
		setflag(F_entered_cli, false);
		game.exit_all_logics = false;
		reset_controllers();
	}
	reset_controllers();

	game.view_table[0].direction = game.vars[V_ego_dir];

	if (game.vars[V_score] != old_score || getflag(F_sound_on) != old_sound)
		_text->write_status();

	game.vars[V_border_touch_obj] = 0;
	game.vars[V_border_code] = 0;
	setflag(F_new_room_exec, false);
	setflag(F_restart_game, false);
	setflag(F_restore_just_ran, false);

	if (game.gfx_mode) {
		update_viewtable();
		do_update();
	}
}
Beispiel #3
0
static void reset_midi(void)
{
  int i;
  for (i=0; i<16; i++)
    {
      reset_controllers(i);
      /* The rest of these are unaffected by the Reset All Controllers event */
      channel[i].program=default_program;
      channel[i].panning=NO_PANNING;
      channel[i].pitchsens=2;
      channel[i].bank=0; /* tone bank or drum set */
    }
  reset_voices();
}
Beispiel #4
0
static void reset_midi(void)
{
  int i;
  for (i=0; i<MAXCHAN; i++)
    {
      reset_controllers(i);
      /* The rest of these are unaffected by the Reset All Controllers event */
      channel[i].program=default_program;
      channel[i].panning=NO_PANNING;
      channel[i].pitchsens=2;
      channel[i].bank=0; /* tone bank or drum set */
      channel[i].harmoniccontent=64,
      channel[i].releasetime=64,
      channel[i].attacktime=64,
      channel[i].brightness=64,
      channel[i].sfx=0;
    }
  reset_voices();
}
Beispiel #5
0
void Channel::set_controller(int con,int val)
{
	switch (con)
	{
		case 5:   set_portamento_time(val); break;
		case 7:   set_volume(val); break;
		case 8:   set_balance(val); break;
		case 65:  set_portamento(val); break;
		case 64:  set_hold_pedal(val>=64); break;
		case 66:  set_sostenuto_pedal(val>=64); break;
		case 67:  set_soft_pedal(val>=64); break;
		case 68:  set_legato_pedal(val>=64); break;
		case 119: set_quick_release(val);
		case 120: panic(); break;
		case 121: reset_controllers(); break;
		case 123: release_all(); break;
		case 126: set_n_voices(val); break;
		case 127: set_n_voices(999); break;
		default:  set_user_controller(con,val); break;
	}
}
static void perform_shut_down( void )
{
    reset_motors( );
    reset_filters( );
    reset_controllers( );
}