Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bitmap modes #496

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions agb/examples/bitmap3.rs

This file was deleted.

33 changes: 0 additions & 33 deletions agb/examples/bitmap4.rs

This file was deleted.

84 changes: 0 additions & 84 deletions agb/examples/multiple_video.rs

This file was deleted.

22 changes: 0 additions & 22 deletions agb/examples/panic.rs

This file was deleted.

19 changes: 0 additions & 19 deletions agb/examples/syscall.rs

This file was deleted.

48 changes: 0 additions & 48 deletions agb/src/display/bitmap3.rs

This file was deleted.

91 changes: 0 additions & 91 deletions agb/src/display/bitmap4.rs

This file was deleted.

13 changes: 0 additions & 13 deletions agb/src/display/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ use self::{
window::Windows,
};

/// Graphics mode 3. Bitmap mode that provides a 16-bit colour framebuffer.
pub mod bitmap3;
/// Graphics mode 4. Bitmap 4 provides two 8-bit paletted framebuffers with page switching.
pub mod bitmap4;
/// Test logo of agb.
pub mod example_logo;
pub mod object;
Expand Down Expand Up @@ -142,15 +138,6 @@ unsafe fn set_graphics_mode(mode: DisplayMode) {
DISPLAY_CONTROL.set(s);
}

unsafe fn set_graphics_settings(settings: GraphicsSettings) {
let current = DISPLAY_CONTROL.get();
// preserve display mode
let current = current & 0b111;
let s = settings.bits() | current;

DISPLAY_CONTROL.set(s);
}

/// Waits until vblank using a busy wait loop, this should almost never be used.
/// I only say almost because whilst I don't believe there to be a reason to use
/// this I can't rule it out.
Expand Down
16 changes: 1 addition & 15 deletions agb/src/display/video.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
use super::{
bitmap3::Bitmap3,
bitmap4::Bitmap4,
tiled::{Tiled0, Tiled1, Tiled2, VRamManager},
};
use super::tiled::{Tiled0, Tiled1, Tiled2, VRamManager};

/// The video struct controls access to the video hardware.
/// It ensures that only one video mode is active at a time.
Expand All @@ -12,16 +8,6 @@ use super::{
pub struct Video;

impl Video {
/// Bitmap mode that provides a 16-bit colour framebuffer
pub fn bitmap3(&mut self) -> Bitmap3<'_> {
unsafe { Bitmap3::new() }
}

/// Bitmap 4 provides two 8-bit paletted framebuffers with page switching
pub fn bitmap4(&mut self) -> Bitmap4<'_> {
unsafe { Bitmap4::new() }
}

/// Tiled 0 mode provides 4 regular, tiled backgrounds
pub fn tiled0(&mut self) -> (Tiled0<'_>, VRamManager) {
(unsafe { Tiled0::new() }, VRamManager::new())
Expand Down
Loading