[NO TESTS] WIP

This commit is contained in:
Reid 'arrdem' McKenzie 2023-01-02 23:07:24 -07:00
parent a731616146
commit b0260ce315

View file

@ -46,13 +46,13 @@ impl Sdl2VideoDevice {
fn clear(&mut self) {
{
let fg = self.fg.borrow_mut();
let mut fg = self.fg.borrow_mut();
for i in 0..(self.width * self.height) as usize {
fg.pixels[i] = 0x00;
}
}
{
let bg = self.bg.borrow_mut();
let mut bg = self.bg.borrow_mut();
for i in 0..(self.width * self.height) as usize {
bg.pixels[i] = 0x00;
}
@ -63,7 +63,7 @@ impl Sdl2VideoDevice {
* Update an entry in either the foreground or background buffers, marking the buffer as dirty.
*/
fn write_pixel(&mut self, layer: bool, x: u16, y: u16, color: u8) {
let layer = if layer {
let mut layer = if layer {
self.fg.borrow_mut()
} else {
self.bg.borrow_mut()