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

docs: new comments added

parent 01167074
No related branches found
No related tags found
No related merge requests found
Pipeline #1673 passed
...@@ -992,6 +992,8 @@ impl Ppu { ...@@ -992,6 +992,8 @@ impl Ppu {
/// is useful to "flush" color computation whenever the base /// is useful to "flush" color computation whenever the base
/// palette colors are changed. /// palette colors are changed.
fn compute_palettes(&mut self) { fn compute_palettes(&mut self) {
// re-computes the complete set of palettes according to
// the currently set palette colors (that may have chaged)
Self::compute_palette(&mut self.palette, &self.palette_colors, self.palettes[0]); Self::compute_palette(&mut self.palette, &self.palette_colors, self.palettes[0]);
Self::compute_palette( Self::compute_palette(
&mut self.palette_obj_0, &mut self.palette_obj_0,
...@@ -1003,6 +1005,9 @@ impl Ppu { ...@@ -1003,6 +1005,9 @@ impl Ppu {
&self.palette_colors, &self.palette_colors,
self.palettes[2], self.palettes[2],
); );
// clears the frame buffer to allow the new background
// color to be used
self.clear_frame_buffer(); self.clear_frame_buffer();
} }
......
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