clean imports

This commit is contained in:
Alex Janka 2023-02-07 09:12:39 +11:00
parent b363de3608
commit 1a0a45527a
7 changed files with 23 additions and 28 deletions

View file

@ -6,7 +6,7 @@ use clap::{ArgGroup, Parser};
use minifb::{Window, WindowOptions};
use processor::{
memory::{Memory, ROM},
CPU,
Registers, CPU,
};
use std::{
fs,
@ -14,8 +14,6 @@ use std::{
sync::RwLock,
};
use crate::processor::Registers;
#[macro_export]
macro_rules! verbose_println {
($($tts:tt)*) => {

View file

@ -1,9 +1,9 @@
use crate::{
processor::{as_signed, get_bit, set_bit, set_or_clear_bit, CPU},
FACTOR, HEIGHT, WIDTH,
};
use minifb::{Window, WindowOptions};
use crate::{FACTOR, HEIGHT, WIDTH};
use super::{as_signed, get_bit, set_bit, set_or_clear_bit, CPU};
mod tile_window;
#[derive(PartialEq)]

View file

@ -1,11 +1,13 @@
use crate::{
processor::{get_bit, CPU},
FACTOR,
};
use super::{
processor::{
get_bit,
gpu::{
bits_to_mapped_colour, scale_buffer, Palette, TiledataArea, TILE_WINDOW_EDGE_LENGTH,
TILE_WINDOW_EDGE_LENGTH_SCALED,
},
CPU,
},
FACTOR,
};
impl CPU {

View file

@ -1,6 +1,5 @@
use std::ops::{BitAnd, BitOr};
use crate::processor::{get_bit, get_rotation_carry, rotate, Direction, Flags, SplitRegister, CPU};
use std::ops::{BitAnd, BitOr};
impl CPU {
pub(crate) fn pop_word(&mut self) -> u16 {

View file

@ -1,10 +1,9 @@
use std::io::{stdout, Write};
use crate::{
processor::{clear_bit, get_bit},
verbose_println,
};
use minifb::Key;
use crate::verbose_println;
use super::{clear_bit, get_bit};
use std::io::{stdout, Write};
pub(crate) type Address = u16;
pub(crate) type ROM = Vec<u8>;

View file

@ -1,11 +1,8 @@
use std::{mem::transmute, time::Duration};
use minifb::Window;
use crate::{processor::instructions::instructions::set, verbose_println};
use self::gpu::GPU;
use self::memory::Memory;
use crate::{processor::instructions::instructions::set, verbose_println};
use minifb::Window;
use std::{mem::transmute, time::Duration};
pub mod gpu;
mod instructions;

View file

@ -1,4 +1,4 @@
use super::{
use crate::processor::{
as_signed,
instructions::instructions::{res, set},
Flags, Reg8, SplitRegister, CPU,