implements PR014 a PR016

This commit is contained in:
2026-03-24 13:40:46 +00:00
parent a75df486ce
commit 24c81d27a9
24 changed files with 386 additions and 116 deletions
@@ -166,6 +166,7 @@ impl Audio {
}
}
#[allow(clippy::too_many_arguments)]
pub fn play(
&mut self,
bank_id: u8,
@@ -202,6 +203,7 @@ impl Audio {
// }
}
#[allow(clippy::too_many_arguments)]
pub fn play_sample(
&mut self,
sample: Arc<Sample>,
+1 -1
View File
@@ -857,7 +857,7 @@ impl Gfx {
for (row_idx, row) in glyph.iter().enumerate() {
for col_idx in 0..3 {
if (row >> (2 - col_idx)) & 1 == 1 {
let px = x + col_idx as i32;
let px = x + col_idx;
let py = y + row_idx as i32;
self.draw_pixel(px, py, color);
}
@@ -35,6 +35,12 @@ pub struct Hardware {
pub assets: AssetManager,
}
impl Default for Hardware {
fn default() -> Self {
Self::new()
}
}
impl HardwareBridge for Hardware {
fn gfx(&self) -> &dyn GfxBridge {
&self.gfx
@@ -40,6 +40,12 @@ pub struct MemoryBanks {
sound_bank_pool: Arc<RwLock<[Option<Arc<SoundBank>>; 16]>>,
}
impl Default for MemoryBanks {
fn default() -> Self {
Self::new()
}
}
impl MemoryBanks {
/// Creates a new set of memory banks with empty slots.
pub fn new() -> Self {
+2 -2
View File
@@ -12,8 +12,8 @@ impl Touch {
/// Transient flags should last only 1 frame.
pub fn begin_frame(&mut self, signals: &InputSignals) {
self.f.begin_frame(signals.f_signal);
self.x = signals.x_pos.clone();
self.y = signals.y_pos.clone();
self.x = signals.x_pos;
self.y = signals.y_pos;
}
}