mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Add method to hide background
This commit is contained in:
parent
93d82f309e
commit
7c3725497c
|
@ -255,6 +255,12 @@ impl RegularMap {
|
|||
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) {
|
||||
let new_bg_control_value = (self.priority as u16) | ((self.screenblock as u16) << 8);
|
||||
|
||||
|
|
Loading…
Reference in a new issue