mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
Merge pull request #55 from gwilymk/fix-incorrect-sound-definition
Sweep works backwards
This commit is contained in:
commit
cc70e5ba8b
|
@ -129,7 +129,7 @@ impl SweepSettings {
|
||||||
|
|
||||||
fn as_bits(&self) -> u16 {
|
fn as_bits(&self) -> u16 {
|
||||||
((self.number_of_sweep_shifts as u16) & 0b111)
|
((self.number_of_sweep_shifts as u16) & 0b111)
|
||||||
| (self.sound_direction.as_bits() << 3)
|
| ((1 - self.sound_direction.as_bits()) << 3) // sweep works backwards
|
||||||
| ((self.sweep_time as u16) & 0b111) << 4
|
| ((self.sweep_time as u16) & 0b111) << 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue