colourformat is now copy
This commit is contained in:
parent
91276caf1c
commit
4290640870
14 changed files with 24 additions and 24 deletions
|
@ -159,7 +159,7 @@ pub enum SramType {
|
|||
#[non_exhaustive]
|
||||
pub struct EmulatorOptions<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub(crate) window: R,
|
||||
|
@ -179,7 +179,7 @@ where
|
|||
|
||||
impl<ColourFormat, R> EmulatorOptions<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub fn new(window: R, rom: RomFile, output: AudioOutput) -> Self {
|
||||
|
|
|
@ -36,7 +36,7 @@ pub const HEIGHT: usize = 144;
|
|||
|
||||
pub struct EmulatorCore<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ where
|
|||
|
||||
impl<ColourFormat, R, C> EmulatorCore<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ where
|
|||
|
||||
impl<ColourFormat, R, C> EmulatorCoreTrait for EmulatorCore<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
|
||||
impl<ColourFormat, R, C> Cpu<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::ops::{BitAnd, BitOr};
|
|||
|
||||
impl<ColourFormat, R, C> Cpu<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@ struct CgbPeripherals {
|
|||
|
||||
pub struct Memory<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ where
|
|||
|
||||
pub(crate) struct OutputTargets<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ where
|
|||
|
||||
impl<ColourFormat, R, C> OutputTargets<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -152,7 +152,7 @@ where
|
|||
|
||||
impl<ColourFormat, R, C> Memory<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -418,7 +418,7 @@ where
|
|||
|
||||
impl<ColourFormat, R, C> Cpu<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ impl DoubleSpeed {
|
|||
|
||||
impl<ColourFormat, R, C> Memory<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -82,7 +82,7 @@ impl VramDma {
|
|||
|
||||
impl<ColourFormat, R, C> Memory<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ const TILE_WINDOW_HEIGHT: usize = 24 * 8;
|
|||
|
||||
pub struct Gpu<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub buffer: Vec<ColourFormat>,
|
||||
|
@ -56,7 +56,7 @@ where
|
|||
|
||||
impl<ColourFormat, R> Gpu<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub fn new(
|
||||
|
|
|
@ -10,7 +10,7 @@ use super::{
|
|||
|
||||
impl<ColourFormat, R> Gpu<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub fn update_lcdc(&mut self, data: u8) {
|
||||
|
|
|
@ -80,7 +80,7 @@ impl CgbPalette {
|
|||
|
||||
impl<ColourFormat, R> Gpu<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub(crate) fn get_cgb_palette(&self, address: CgbPaletteAddress) -> u8 {
|
||||
|
|
|
@ -11,7 +11,7 @@ use super::{
|
|||
|
||||
pub(super) struct TileWindow<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
sprite_buffer: Vec<ColourFormat>,
|
||||
|
@ -21,7 +21,7 @@ where
|
|||
|
||||
impl<ColourFormat, R> TileWindow<ColourFormat, R>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
{
|
||||
pub(super) fn new(mut window: R, cgb: bool) -> Self {
|
||||
|
|
|
@ -37,7 +37,7 @@ impl OamDma {
|
|||
|
||||
impl<ColourFormat, R, C> Memory<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ pub(crate) enum Direction {
|
|||
|
||||
pub struct Cpu<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ where
|
|||
|
||||
impl<ColourFormat, R, C> Cpu<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ use super::memory::mmio::gpu::Colour;
|
|||
|
||||
impl<ColourFormat, R, C> Cpu<ColourFormat, R, C>
|
||||
where
|
||||
ColourFormat: From<Colour> + Clone,
|
||||
ColourFormat: From<Colour> + Copy,
|
||||
R: Renderer<ColourFormat>,
|
||||
C: PocketCamera + Send + 'static,
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue