1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Bring that Whole New World to the Old Continent too

Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
Rémi Verschelde
2017-03-19 00:36:26 +01:00
parent 1d418afe86
commit f8db8a3faa
1308 changed files with 147754 additions and 174357 deletions

View File

@@ -35,38 +35,36 @@ void CPPlayer::process_NNAs() {
if (!song->has_instruments()) return;
for (i=0;i<CPPattern::WIDTH;i++) {
for (i = 0; i < CPPattern::WIDTH; i++) {
Channel_Control *aux_chn_ctrl = &control.channel[i];
if (aux_chn_ctrl->kick==KICK_NOTE) {
if (aux_chn_ctrl->kick == KICK_NOTE) {
bool k=false;
bool k = false;
if (aux_chn_ctrl->slave_voice!=NULL) {
if (aux_chn_ctrl->slave_voice != NULL) {
Voice_Control *aux_voc_ctrl;
aux_voc_ctrl=aux_chn_ctrl->slave_voice;
if (aux_chn_ctrl->instrument_index==aux_chn_ctrl->slave_voice->instrument_index) { //maybe carry
aux_chn_ctrl->carry.pan=aux_chn_ctrl->slave_voice->panning_envelope_ctrl;
aux_chn_ctrl->carry.vol=aux_chn_ctrl->slave_voice->volume_envelope_ctrl;
aux_chn_ctrl->carry.pitch=aux_chn_ctrl->slave_voice->pitch_envelope_ctrl;
aux_chn_ctrl->carry.maybe=true;
} else
aux_chn_ctrl->carry.maybe=false;
aux_voc_ctrl = aux_chn_ctrl->slave_voice;
if (aux_chn_ctrl->instrument_index == aux_chn_ctrl->slave_voice->instrument_index) { //maybe carry
aux_chn_ctrl->carry.pan = aux_chn_ctrl->slave_voice->panning_envelope_ctrl;
aux_chn_ctrl->carry.vol = aux_chn_ctrl->slave_voice->volume_envelope_ctrl;
aux_chn_ctrl->carry.pitch = aux_chn_ctrl->slave_voice->pitch_envelope_ctrl;
aux_chn_ctrl->carry.maybe = true;
} else
aux_chn_ctrl->carry.maybe = false;
if (aux_voc_ctrl->NNA_type != CPInstrument::NNA_NOTE_CUT) {
/* Make sure the old MP_VOICE channel knows it has no
master now ! */
aux_chn_ctrl->slave_voice=NULL;
aux_chn_ctrl->slave_voice = NULL;
/* assume the channel is taken by NNA */
aux_voc_ctrl->has_master_channel=false;
aux_voc_ctrl->has_master_channel = false;
switch (aux_voc_ctrl->NNA_type) {
case CPInstrument::NNA_NOTE_CONTINUE: {
@@ -74,71 +72,69 @@ void CPPlayer::process_NNAs() {
} break;
case CPInstrument::NNA_NOTE_OFF: {
aux_voc_ctrl->note_end_flags|=END_NOTE_OFF;
aux_voc_ctrl->note_end_flags |= END_NOTE_OFF;
if (!aux_voc_ctrl->volume_envelope_ctrl.active || aux_voc_ctrl->instrument_ptr->get_volume_envelope()->is_loop_enabled()) {
aux_voc_ctrl->note_end_flags|=END_NOTE_FADE;
aux_voc_ctrl->note_end_flags |= END_NOTE_FADE;
}
} break;
case CPInstrument::NNA_NOTE_FADE: {
aux_voc_ctrl->note_end_flags|=END_NOTE_FADE;
aux_voc_ctrl->note_end_flags |= END_NOTE_FADE;
} break;
}
}
}
}
if (aux_chn_ctrl->duplicate_check_type!=CPInstrument::DCT_DISABLED) {
if (aux_chn_ctrl->duplicate_check_type != CPInstrument::DCT_DISABLED) {
int i;
for (i=0;i<control.max_voices;i++) {
if (!mixer->is_voice_active(i)||
(voice[i].master_channel!=aux_chn_ctrl) ||
(aux_chn_ctrl->instrument_index!=voice[i].instrument_index))
for (i = 0; i < control.max_voices; i++) {
if (!mixer->is_voice_active(i) ||
(voice[i].master_channel != aux_chn_ctrl) ||
(aux_chn_ctrl->instrument_index != voice[i].instrument_index))
continue;
Voice_Control *aux_voc_ctrl;
aux_voc_ctrl=&voice[i];
aux_voc_ctrl = &voice[i];
k=false;
k = false;
switch (aux_chn_ctrl->duplicate_check_type) {
case CPInstrument::DCT_NOTE:
if (aux_chn_ctrl->note==aux_voc_ctrl->note)
k=true;
if (aux_chn_ctrl->note == aux_voc_ctrl->note)
k = true;
break;
case CPInstrument::DCT_SAMPLE:
if (aux_chn_ctrl->sample_ptr==aux_voc_ctrl->sample_ptr)
k=true;
if (aux_chn_ctrl->sample_ptr == aux_voc_ctrl->sample_ptr)
k = true;
break;
case CPInstrument::DCT_INSTRUMENT:
k=true;
k = true;
break;
}
if (k) {
switch (aux_chn_ctrl->duplicate_check_action) {
case CPInstrument::DCA_NOTE_CUT: {
aux_voc_ctrl->fadeout_volume=0;
aux_voc_ctrl->fadeout_volume = 0;
} break;
case CPInstrument::DCA_NOTE_OFF: {
aux_voc_ctrl->note_end_flags|=END_NOTE_OFF;
aux_voc_ctrl->note_end_flags |= END_NOTE_OFF;
if (!aux_voc_ctrl->volume_envelope_ctrl.active || aux_chn_ctrl->instrument_ptr->get_volume_envelope()->is_loop_enabled()) {
aux_voc_ctrl->note_end_flags|=END_NOTE_FADE;
aux_voc_ctrl->note_end_flags |= END_NOTE_FADE;
}
} break;
case CPInstrument::DCA_NOTE_FADE: {
aux_voc_ctrl->note_end_flags|=END_NOTE_FADE;
aux_voc_ctrl->note_end_flags |= END_NOTE_FADE;
} break;
}
}
}
}
}
}
} /* if (aux_chn_ctrl->kick==KICK_NOTE) */
}
}