move constants in the display module
This commit is contained in:
parent
b447f0ccee
commit
717a5a85c6
2 changed files with 3 additions and 9 deletions
|
@ -5,10 +5,10 @@ use ratatui::widgets::{Block, Borders};
|
|||
use ratatui::DefaultTerminal;
|
||||
|
||||
/// Represents the display's width in pixels.
|
||||
const DISPLAY_WIDTH: usize = 64;
|
||||
pub const DISPLAY_WIDTH: usize = 64;
|
||||
|
||||
/// Represents the display's height pixels.
|
||||
const DISPLAY_HEIGHT: usize = 32;
|
||||
pub const DISPLAY_HEIGHT: usize = 32;
|
||||
|
||||
/// Display trait
|
||||
pub trait Display {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
use crate::display::Display;
|
||||
use crate::display::{DISPLAY_HEIGHT, DISPLAY_WIDTH};
|
||||
use crate::instruction::{Instruction, ProcessorInstruction};
|
||||
use crate::sound::SoundModule;
|
||||
use crate::stack::Stack;
|
||||
|
@ -11,12 +12,6 @@ use std::path::Path;
|
|||
use std::thread::sleep;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
/// Represents the display's width in pixels.
|
||||
const DISPLAY_WIDTH: usize = 64;
|
||||
|
||||
/// Represents the display's height pixels.
|
||||
const DISPLAY_HEIGHT: usize = 32;
|
||||
|
||||
const MEMORY_SIZE: usize = 4096;
|
||||
const NUMBER_OF_REGISTERS: usize = 16;
|
||||
const FONT_SPRITES: [u8; 80] = [
|
||||
|
@ -138,7 +133,6 @@ where
|
|||
}
|
||||
|
||||
tick_timer = Instant::now();
|
||||
|
||||
} else {
|
||||
sleep(Duration::from_millis(1));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue