Skip to content
Snippets Groups Projects
Verified Commit 561147f7 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

chore: master priority set mode enabled

parent c806d7cc
No related branches found
No related tags found
1 merge request!16Support for Game Boy Color (CGB) 😎🖍️
Pipeline #2631 failed
...@@ -368,6 +368,8 @@ pub struct Ppu { ...@@ -368,6 +368,8 @@ pub struct Ppu {
mode_clock: u16, mode_clock: u16,
/// Controls if the background is going to be drawn to screen. /// Controls if the background is going to be drawn to screen.
/// In CGB mode this flag controls the master priority instead
/// enabling or disabling complex priority rules.
switch_bg: bool, switch_bg: bool,
/// Controls if the sprites/objects are going to be drawn to screen. /// Controls if the sprites/objects are going to be drawn to screen.
...@@ -985,7 +987,7 @@ impl Ppu { ...@@ -985,7 +987,7 @@ impl Ppu {
if self.first_frame { if self.first_frame {
return; return;
} }
if self.switch_bg { if self.gb_mode != GameBoyMode::Dmg || self.switch_bg {
self.render_map(self.bg_map, self.scx, self.scy, 0, 0, self.ly); self.render_map(self.bg_map, self.scx, self.scy, 0, 0, self.ly);
} }
if self.switch_window { if self.switch_window {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment