Merge pull request #204 from gwilymk/remove-enable-sprites-in-background

Don't need to enable objects in tiled background any more
This commit is contained in:
Gwilym Kuiper 2022-03-28 22:06:07 +01:00 committed by GitHub
commit 770ebe508b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -89,6 +89,9 @@ unsafe fn set_graphics_mode(mode: DisplayMode) {
let current = current & (!0b111); let current = current & (!0b111);
let s = current | (mode as u16 & 0b111); let s = current | (mode as u16 & 0b111);
// disable blank screen
let s = s & !(1 << 7);
DISPLAY_CONTROL.set(s); DISPLAY_CONTROL.set(s);
} }

View file

@ -2,7 +2,7 @@ use core::cell::RefCell;
use crate::{ use crate::{
bitarray::Bitarray, bitarray::Bitarray,
display::{set_graphics_mode, set_graphics_settings, DisplayMode, GraphicsSettings, Priority}, display::{set_graphics_mode, DisplayMode, Priority},
}; };
use super::{MapLoan, RegularMap}; use super::{MapLoan, RegularMap};
@ -13,7 +13,6 @@ pub struct Tiled0 {
impl Tiled0 { impl Tiled0 {
pub(crate) unsafe fn new() -> Self { pub(crate) unsafe fn new() -> Self {
set_graphics_settings(GraphicsSettings::empty() | GraphicsSettings::SPRITE1_D);
set_graphics_mode(DisplayMode::Tiled0); set_graphics_mode(DisplayMode::Tiled0);
Self { Self {