update jenkinsfile
This commit is contained in:
@@ -188,7 +188,8 @@ impl Audio {
|
||||
return AudioOpStatus::BankInvalid;
|
||||
}
|
||||
|
||||
let sample = bank_slot.and_then(|bank| bank.samples.get(sample_id as usize).map(Arc::clone));
|
||||
let sample =
|
||||
bank_slot.and_then(|bank| bank.samples.get(sample_id as usize).map(Arc::clone));
|
||||
|
||||
if let Some(s) = sample {
|
||||
// println!(
|
||||
@@ -322,8 +323,7 @@ mod tests {
|
||||
let sound_banks = Arc::clone(&banks) as Arc<dyn SoundBankPoolAccess>;
|
||||
let mut audio = Audio::new(sound_banks);
|
||||
|
||||
let status =
|
||||
audio.play_sample(sample(), MAX_CHANNELS, 255, 128, 1.0, 0, LoopMode::Off);
|
||||
let status = audio.play_sample(sample(), MAX_CHANNELS, 255, 128, 1.0, 0, LoopMode::Off);
|
||||
|
||||
assert_eq!(status, AudioOpStatus::VoiceInvalid);
|
||||
assert!(!audio.voices.iter().any(|voice| voice.active));
|
||||
|
||||
@@ -872,16 +872,13 @@ impl Gfx {
|
||||
let glyph = glyph_for_char(c);
|
||||
let raw = color.0;
|
||||
|
||||
let row_start = (-y).max(0).min(5) as usize;
|
||||
let row_end = (screen_h - y).max(0).min(5) as usize;
|
||||
let col_start = (-x).max(0).min(3) as usize;
|
||||
let col_end = (screen_w - x).max(0).min(3) as usize;
|
||||
let row_start = (-y).clamp(0, 5) as usize;
|
||||
let row_end = (screen_h - y).clamp(0, 5) as usize;
|
||||
let col_start = (-x).clamp(0, 3) as usize;
|
||||
let col_end = (screen_w - x).clamp(0, 3) as usize;
|
||||
|
||||
for (row_idx, row) in glyph
|
||||
.iter()
|
||||
.enumerate()
|
||||
.skip(row_start)
|
||||
.take(row_end.saturating_sub(row_start))
|
||||
for (row_idx, row) in
|
||||
glyph.iter().enumerate().skip(row_start).take(row_end.saturating_sub(row_start))
|
||||
{
|
||||
let py = (y + row_idx as i32) as usize;
|
||||
let base = py * self.w;
|
||||
|
||||
Reference in New Issue
Block a user