clean imports
This commit is contained in:
parent
b363de3608
commit
1a0a45527a
|
@ -6,7 +6,7 @@ use clap::{ArgGroup, Parser};
|
||||||
use minifb::{Window, WindowOptions};
|
use minifb::{Window, WindowOptions};
|
||||||
use processor::{
|
use processor::{
|
||||||
memory::{Memory, ROM},
|
memory::{Memory, ROM},
|
||||||
CPU,
|
Registers, CPU,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
fs,
|
fs,
|
||||||
|
@ -14,8 +14,6 @@ use std::{
|
||||||
sync::RwLock,
|
sync::RwLock,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::processor::Registers;
|
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! verbose_println {
|
macro_rules! verbose_println {
|
||||||
($($tts:tt)*) => {
|
($($tts:tt)*) => {
|
||||||
|
|
|
@ -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 minifb::{Window, WindowOptions};
|
||||||
|
|
||||||
use crate::{FACTOR, HEIGHT, WIDTH};
|
|
||||||
|
|
||||||
use super::{as_signed, get_bit, set_bit, set_or_clear_bit, CPU};
|
|
||||||
|
|
||||||
mod tile_window;
|
mod tile_window;
|
||||||
|
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
processor::{get_bit, CPU},
|
processor::{
|
||||||
|
get_bit,
|
||||||
|
gpu::{
|
||||||
|
bits_to_mapped_colour, scale_buffer, Palette, TiledataArea, TILE_WINDOW_EDGE_LENGTH,
|
||||||
|
TILE_WINDOW_EDGE_LENGTH_SCALED,
|
||||||
|
},
|
||||||
|
CPU,
|
||||||
|
},
|
||||||
FACTOR,
|
FACTOR,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
|
||||||
bits_to_mapped_colour, scale_buffer, Palette, TiledataArea, TILE_WINDOW_EDGE_LENGTH,
|
|
||||||
TILE_WINDOW_EDGE_LENGTH_SCALED,
|
|
||||||
};
|
|
||||||
|
|
||||||
impl CPU {
|
impl CPU {
|
||||||
pub(super) fn draw_sprite_window(&mut self, area: TiledataArea, palette: Palette) {
|
pub(super) fn draw_sprite_window(&mut self, area: TiledataArea, palette: Palette) {
|
||||||
for tile_y in 0..16 {
|
for tile_y in 0..16 {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
use std::ops::{BitAnd, BitOr};
|
|
||||||
|
|
||||||
use crate::processor::{get_bit, get_rotation_carry, rotate, Direction, Flags, SplitRegister, CPU};
|
use crate::processor::{get_bit, get_rotation_carry, rotate, Direction, Flags, SplitRegister, CPU};
|
||||||
|
use std::ops::{BitAnd, BitOr};
|
||||||
|
|
||||||
impl CPU {
|
impl CPU {
|
||||||
pub(crate) fn pop_word(&mut self) -> u16 {
|
pub(crate) fn pop_word(&mut self) -> u16 {
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
use std::io::{stdout, Write};
|
use crate::{
|
||||||
|
processor::{clear_bit, get_bit},
|
||||||
|
verbose_println,
|
||||||
|
};
|
||||||
use minifb::Key;
|
use minifb::Key;
|
||||||
|
use std::io::{stdout, Write};
|
||||||
use crate::verbose_println;
|
|
||||||
|
|
||||||
use super::{clear_bit, get_bit};
|
|
||||||
|
|
||||||
pub(crate) type Address = u16;
|
pub(crate) type Address = u16;
|
||||||
pub(crate) type ROM = Vec<u8>;
|
pub(crate) type ROM = Vec<u8>;
|
||||||
|
|
|
@ -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::gpu::GPU;
|
||||||
use self::memory::Memory;
|
use self::memory::Memory;
|
||||||
|
use crate::{processor::instructions::instructions::set, verbose_println};
|
||||||
|
use minifb::Window;
|
||||||
|
use std::{mem::transmute, time::Duration};
|
||||||
|
|
||||||
pub mod gpu;
|
pub mod gpu;
|
||||||
mod instructions;
|
mod instructions;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use super::{
|
use crate::processor::{
|
||||||
as_signed,
|
as_signed,
|
||||||
instructions::instructions::{res, set},
|
instructions::instructions::{res, set},
|
||||||
Flags, Reg8, SplitRegister, CPU,
|
Flags, Reg8, SplitRegister, CPU,
|
||||||
|
|
Loading…
Reference in a new issue