mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
disp -> display
This commit is contained in:
parent
140442fe0b
commit
32a8b213fb
|
@ -58,10 +58,10 @@ impl Bitmap4 {
|
||||||
/// index whose colour is specified in the background palette. Panics if (x,
|
/// index whose colour is specified in the background palette. Panics if (x,
|
||||||
/// y) is out of the bounds of the screen.
|
/// y) is out of the bounds of the screen.
|
||||||
pub fn draw_point(&mut self, x: i32, y: i32, colour: u8) {
|
pub fn draw_point(&mut self, x: i32, y: i32, colour: u8) {
|
||||||
let disp = DISPLAY_CONTROL.get();
|
let display = DISPLAY_CONTROL.get();
|
||||||
|
|
||||||
// get other page
|
// get other page
|
||||||
let page = if disp & GraphicsSettings::PAGE_SELECT.bits() != 0 {
|
let page = if display & GraphicsSettings::PAGE_SELECT.bits() != 0 {
|
||||||
Page::Front
|
Page::Front
|
||||||
} else {
|
} else {
|
||||||
Page::Back
|
Page::Back
|
||||||
|
@ -78,8 +78,8 @@ impl Bitmap4 {
|
||||||
/// Flips page, changing the Gameboy advance to draw the contents of the
|
/// Flips page, changing the Gameboy advance to draw the contents of the
|
||||||
/// other page
|
/// other page
|
||||||
pub fn flip_page(&mut self) {
|
pub fn flip_page(&mut self) {
|
||||||
let disp = DISPLAY_CONTROL.get();
|
let display = DISPLAY_CONTROL.get();
|
||||||
let swapped = disp ^ GraphicsSettings::PAGE_SELECT.bits();
|
let swapped = display ^ GraphicsSettings::PAGE_SELECT.bits();
|
||||||
DISPLAY_CONTROL.set(swapped);
|
DISPLAY_CONTROL.set(swapped);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue