From 2accc78948fa4a18e37ab0bc405f9b2758acaa3e Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Thu, 3 Jul 2025 15:26:07 +1200 Subject: Initial commit --- src/lib.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..f260042 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,31 @@ +#![feature(bigint_helper_methods)] +#![feature(seek_stream_len)] +#![feature(unchecked_shifts)] + +mod debug; +mod devices; +mod emulators; +mod types; + +pub use debug::*; +pub use devices::*; +pub use emulators::*; +pub use types::*; + +use bedrock_core::*; +use log::*; +use phosphor::*; + +use std::num::NonZeroU32; +use std::path::{Path, PathBuf}; +use std::time::{Duration, Instant}; + +pub const BATCH_SIZE: usize = 1000; +pub const TICK_DURATION: Duration = Duration::from_nanos( 1_000_000_000/256 ); +pub const MIN_FRAME_DURATION: Duration = Duration::from_millis( 10 ); +pub const MAX_FRAME_DURATION: Duration = Duration::from_millis( 500 ); +pub const DEFAULT_SCREEN_SIZE: ScreenDimensions = ScreenDimensions::new(800,600); +pub const DEFAULT_SCREEN_SCALE: NonZeroU32 = unsafe { NonZeroU32::new_unchecked(1) }; + +pub type ScreenPosition = geometry::Point; +pub type ScreenDimensions = geometry::Dimensions; -- cgit v1.2.3-70-g09d2