mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 09:06:33 +11:00
Add method to hide background
This commit is contained in:
parent
93d82f309e
commit
7c3725497c
1 changed files with 6 additions and 0 deletions
|
@ -255,6 +255,12 @@ impl RegularMap {
|
||||||
DISPLAY_CONTROL.set(new_mode);
|
DISPLAY_CONTROL.set(new_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn hide(&mut self) {
|
||||||
|
let mode = DISPLAY_CONTROL.get();
|
||||||
|
let new_mode = mode & !(1 << (self.background_id + 0x08));
|
||||||
|
DISPLAY_CONTROL.set(new_mode);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn commit(&mut self) {
|
pub fn commit(&mut self) {
|
||||||
let new_bg_control_value = (self.priority as u16) | ((self.screenblock as u16) << 8);
|
let new_bg_control_value = (self.priority as u16) | ((self.screenblock as u16) << 8);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue