Add some doc comments around the video struct

This commit is contained in:
Gwilym Kuiper 2022-06-04 13:52:58 +01:00
parent 3c7d97e7f4
commit bc1bf3416c

View file

@ -4,6 +4,10 @@ use super::{
tiled::{Tiled0, VRamManager},
};
/// The video struct controls access to the video hardware.
/// It ensures that only one video mode is active at a time.
///
/// Most games will use tiled modes, as bitmap modes are too slow to run at the full 60 FPS.
#[non_exhaustive]
pub struct Video {}
@ -18,6 +22,7 @@ impl Video {
unsafe { Bitmap4::new() }
}
/// Tiled 0 mode provides 4 regular, tiled backgrounds
pub fn tiled0(&mut self) -> (Tiled0, VRamManager) {
(unsafe { Tiled0::new() }, VRamManager::new())
}