mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-07-27 15:31:49 +00:00
Compare commits
2 commits
82cce198ee
...
8603086694
Author | SHA1 | Date | |
---|---|---|---|
|
8603086694 | ||
|
a0b396326f |
BIN
src/builtin/organya-wavetable-doukutsu.bin
Normal file
BIN
src/builtin/organya-wavetable-doukutsu.bin
Normal file
Binary file not shown.
|
@ -110,7 +110,7 @@ impl BuiltinFS {
|
|||
FSNode::File("builtin_font.fnt", include_bytes!("builtin/builtin_font.fnt")),
|
||||
FSNode::File("builtin_font_0.png", include_bytes!("builtin/builtin_font_0.png")),
|
||||
FSNode::File("builtin_font_1.png", include_bytes!("builtin/builtin_font_1.png")),
|
||||
FSNode::File("pixtone.pcm", include_bytes!("builtin/pixtone.pcm")),
|
||||
FSNode::File("organya-wavetable-doukutsu.bin", include_bytes!("builtin/organya-wavetable-doukutsu.bin")),
|
||||
FSNode::File("touch.png", include_bytes!("builtin/touch.png")),
|
||||
FSNode::Directory("shaders", vec![
|
||||
FSNode::File("basic_150.vert.glsl", include_bytes!("builtin/shaders/basic_150.vert.glsl")),
|
||||
|
|
|
@ -37,12 +37,14 @@ impl BossNPC {
|
|||
part
|
||||
}; 20];
|
||||
parts[0].cond.set_alive(true);
|
||||
|
||||
for (i, part) in parts.iter_mut().enumerate() {
|
||||
part.rng.load_state((i
|
||||
.wrapping_add(398564)
|
||||
.wrapping_mul(0x4985327)
|
||||
.rotate_right(7)
|
||||
.wrapping_sub(0x851356489) & 0xffffffff) as u32);
|
||||
part.rng.load_state(((i as u32)
|
||||
.wrapping_add(3271284409)
|
||||
.rotate_left(5)
|
||||
.wrapping_mul(3815776271)
|
||||
.rotate_right(9)
|
||||
.wrapping_sub(2626817629) & 0xffffffff) as u32);
|
||||
}
|
||||
|
||||
BossNPC {
|
||||
|
|
|
@ -83,7 +83,7 @@ impl SoundManager {
|
|||
let device = host.default_output_device().ok_or_else(|| AudioError(str!("Error initializing audio device.")))?;
|
||||
let config = device.default_output_config()?;
|
||||
|
||||
let bnk = wave_bank::SoundBank::load_from(filesystem::open(ctx, "/builtin/pixtone.pcm")?)?;
|
||||
let bnk = wave_bank::SoundBank::load_from(filesystem::open(ctx, "/builtin/organya-wavetable-doukutsu.bin")?)?;
|
||||
|
||||
std::thread::spawn(move || {
|
||||
if let Err(err) = match config.sample_format() {
|
||||
|
@ -197,7 +197,7 @@ fn run<T>(rx: Receiver<PlaybackMessage>, bank: SoundBank,
|
|||
org_engine.set_sample_rate(sample_rate as usize);
|
||||
org_engine.loops = usize::MAX;
|
||||
|
||||
let buf_size = sample_rate as usize * 30 / 1000;
|
||||
let buf_size = sample_rate as usize * 15 / 1000;
|
||||
let mut bgm_buf = vec![0x8080; buf_size];
|
||||
let mut pxt_buf = vec![0x8000; buf_size];
|
||||
let mut bgm_index = 0;
|
||||
|
|
|
@ -73,12 +73,13 @@ impl PlaybackEngine {
|
|||
}
|
||||
}
|
||||
|
||||
for (inst, buf) in song.tracks[8..].iter().zip(buffers[128..].iter_mut()) {
|
||||
for (idx, (track, buf)) in song.tracks[8..].iter().zip(buffers[128..].iter_mut()).enumerate() {
|
||||
*buf =
|
||||
MaybeUninit::new(
|
||||
RenderBuffer::new(
|
||||
// FIXME: *frustrated screaming*
|
||||
samples.samples[inst.inst.inst as usize].clone()
|
||||
//samples.samples[track.inst.inst as usize].clone()
|
||||
samples.samples[idx].clone()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue