From bc1bf3416c891c2c6b31b26cf44e6169db826641 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sat, 4 Jun 2022 13:52:58 +0100 Subject: [PATCH] Add some doc comments around the video struct --- agb/src/display/video.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agb/src/display/video.rs b/agb/src/display/video.rs index 57ae60e3..6367eff0 100644 --- a/agb/src/display/video.rs +++ b/agb/src/display/video.rs @@ -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()) }