From 4290640870a23380ae1e227fac097772b873e8fc Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Tue, 18 Jul 2023 09:17:28 +1000 Subject: [PATCH] colourformat is now copy --- lib/src/connect/mod.rs | 4 ++-- lib/src/lib.rs | 6 +++--- lib/src/processor/instructions/instructions.rs | 2 +- lib/src/processor/instructions/primitives.rs | 2 +- lib/src/processor/memory.rs | 10 +++++----- lib/src/processor/memory/mmio/cgb/double_speed.rs | 2 +- lib/src/processor/memory/mmio/cgb/vram_dma.rs | 2 +- lib/src/processor/memory/mmio/gpu.rs | 4 ++-- lib/src/processor/memory/mmio/gpu/addresses.rs | 2 +- lib/src/processor/memory/mmio/gpu/cgb.rs | 2 +- lib/src/processor/memory/mmio/gpu/tile_window.rs | 4 ++-- lib/src/processor/memory/mmio/oam_dma.rs | 2 +- lib/src/processor/mod.rs | 4 ++-- lib/src/processor/opcodes.rs | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/src/connect/mod.rs b/lib/src/connect/mod.rs index 507279c..c8eb4c8 100644 --- a/lib/src/connect/mod.rs +++ b/lib/src/connect/mod.rs @@ -159,7 +159,7 @@ pub enum SramType { #[non_exhaustive] pub struct EmulatorOptions where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub(crate) window: R, @@ -179,7 +179,7 @@ where impl EmulatorOptions where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub fn new(window: R, rom: RomFile, output: AudioOutput) -> Self { diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 06e26a9..57b5220 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -36,7 +36,7 @@ pub const HEIGHT: usize = 144; pub struct EmulatorCore where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -47,7 +47,7 @@ where impl EmulatorCore where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -191,7 +191,7 @@ where impl EmulatorCoreTrait for EmulatorCore where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/instructions/instructions.rs b/lib/src/processor/instructions/instructions.rs index d8a5c93..1bc2779 100644 --- a/lib/src/processor/instructions/instructions.rs +++ b/lib/src/processor/instructions/instructions.rs @@ -6,7 +6,7 @@ use crate::{ impl Cpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/instructions/primitives.rs b/lib/src/processor/instructions/primitives.rs index 2de2f3e..d45db0b 100644 --- a/lib/src/processor/instructions/primitives.rs +++ b/lib/src/processor/instructions/primitives.rs @@ -7,7 +7,7 @@ use std::ops::{BitAnd, BitOr}; impl Cpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/memory.rs b/lib/src/processor/memory.rs index 1275497..ded6ebb 100644 --- a/lib/src/processor/memory.rs +++ b/lib/src/processor/memory.rs @@ -87,7 +87,7 @@ struct CgbPeripherals { pub struct Memory where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -111,7 +111,7 @@ where pub(crate) struct OutputTargets where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -126,7 +126,7 @@ where impl OutputTargets where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -152,7 +152,7 @@ where impl Memory where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -418,7 +418,7 @@ where impl Cpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/memory/mmio/cgb/double_speed.rs b/lib/src/processor/memory/mmio/cgb/double_speed.rs index 44607e3..28f3eec 100644 --- a/lib/src/processor/memory/mmio/cgb/double_speed.rs +++ b/lib/src/processor/memory/mmio/cgb/double_speed.rs @@ -22,7 +22,7 @@ impl DoubleSpeed { impl Memory where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/memory/mmio/cgb/vram_dma.rs b/lib/src/processor/memory/mmio/cgb/vram_dma.rs index 4af2ad2..801c4a6 100644 --- a/lib/src/processor/memory/mmio/cgb/vram_dma.rs +++ b/lib/src/processor/memory/mmio/cgb/vram_dma.rs @@ -82,7 +82,7 @@ impl VramDma { impl Memory where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/memory/mmio/gpu.rs b/lib/src/processor/memory/mmio/gpu.rs index c0f5414..ed4ec9d 100644 --- a/lib/src/processor/memory/mmio/gpu.rs +++ b/lib/src/processor/memory/mmio/gpu.rs @@ -25,7 +25,7 @@ const TILE_WINDOW_HEIGHT: usize = 24 * 8; pub struct Gpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub buffer: Vec, @@ -56,7 +56,7 @@ where impl Gpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub fn new( diff --git a/lib/src/processor/memory/mmio/gpu/addresses.rs b/lib/src/processor/memory/mmio/gpu/addresses.rs index b51a373..1f8ab3c 100644 --- a/lib/src/processor/memory/mmio/gpu/addresses.rs +++ b/lib/src/processor/memory/mmio/gpu/addresses.rs @@ -10,7 +10,7 @@ use super::{ impl Gpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub fn update_lcdc(&mut self, data: u8) { diff --git a/lib/src/processor/memory/mmio/gpu/cgb.rs b/lib/src/processor/memory/mmio/gpu/cgb.rs index c8ff267..df53a7a 100644 --- a/lib/src/processor/memory/mmio/gpu/cgb.rs +++ b/lib/src/processor/memory/mmio/gpu/cgb.rs @@ -80,7 +80,7 @@ impl CgbPalette { impl Gpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub(crate) fn get_cgb_palette(&self, address: CgbPaletteAddress) -> u8 { diff --git a/lib/src/processor/memory/mmio/gpu/tile_window.rs b/lib/src/processor/memory/mmio/gpu/tile_window.rs index c9dd47c..9ccf6a1 100644 --- a/lib/src/processor/memory/mmio/gpu/tile_window.rs +++ b/lib/src/processor/memory/mmio/gpu/tile_window.rs @@ -11,7 +11,7 @@ use super::{ pub(super) struct TileWindow where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { sprite_buffer: Vec, @@ -21,7 +21,7 @@ where impl TileWindow where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, { pub(super) fn new(mut window: R, cgb: bool) -> Self { diff --git a/lib/src/processor/memory/mmio/oam_dma.rs b/lib/src/processor/memory/mmio/oam_dma.rs index 61797d1..cb6f8a8 100644 --- a/lib/src/processor/memory/mmio/oam_dma.rs +++ b/lib/src/processor/memory/mmio/oam_dma.rs @@ -37,7 +37,7 @@ impl OamDma { impl Memory where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/mod.rs b/lib/src/processor/mod.rs index 184c1cd..e13723e 100644 --- a/lib/src/processor/mod.rs +++ b/lib/src/processor/mod.rs @@ -22,7 +22,7 @@ pub(crate) enum Direction { pub struct Cpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { @@ -38,7 +38,7 @@ where impl Cpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, { diff --git a/lib/src/processor/opcodes.rs b/lib/src/processor/opcodes.rs index 140d469..4d58d85 100644 --- a/lib/src/processor/opcodes.rs +++ b/lib/src/processor/opcodes.rs @@ -11,7 +11,7 @@ use super::memory::mmio::gpu::Colour; impl Cpu where - ColourFormat: From + Clone, + ColourFormat: From + Copy, R: Renderer, C: PocketCamera + Send + 'static, {