aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2017-11-24 22:50:53 -0500
committerDeterminant <[email protected]>2017-11-24 22:50:53 -0500
commit5be0d9084b4e10a82caec8f6ca86c2d56856ce0e (patch)
treeca09cb55a4a6c8495535e3ca0c7dc025d9ec5fe4 /src
parent9f51c12bc8c85c49eea616897905767e57eea726 (diff)
wrap around the palette value
Diffstat (limited to 'src')
-rw-r--r--src/bin.rs4
-rw-r--r--src/ppu.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bin.rs b/src/bin.rs
index e608e7e..76ef5c9 100644
--- a/src/bin.rs
+++ b/src/bin.rs
@@ -2,8 +2,8 @@ extern crate core;
use std::fs::File;
use std::io::Read;
-use core::cell::RefCell;
-use core::intrinsics::transmute;
+use std::cell::RefCell;
+use std::intrinsics::transmute;
use std::time::{Instant, Duration};
use std::thread::sleep;
diff --git a/src/ppu.rs b/src/ppu.rs
index 095e3e1..faf0664 100644
--- a/src/ppu.rs
+++ b/src/ppu.rs
@@ -440,7 +440,7 @@ impl<'a> PPU<'a> {
0 => 0,
_ => bg
}
- }));
+ }) & 0x3f);
}
pub fn new(mem: PPUMemory<'a>, scr: &'a mut Screen) -> Self {