Skip to content

Commit ae8331f

Browse files
committed
less ugly colors
1 parent 9ecbd0a commit ae8331f

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@
1010
[submodule "gameboy-doctor"]
1111
path = gameboy-doctor
1212
url = https://github.com/robert/gameboy-doctor
13+
[submodule "mealybug-tearoom-tests"]
14+
path = mealybug-tearoom-tests
15+
url = https://github.com/mattcurrie/mealybug-tearoom-tests.git
16+
[submodule "gbmicrotest"]
17+
path = gbmicrotest
18+
url = https://github.com/aappleby/gbmicrotest.git

gbmicrotest

Submodule gbmicrotest added at 463eb6b

mealybug-tearoom-tests

Submodule mealybug-tearoom-tests added at 70e88fb

src/ppu.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,14 @@ pub struct PPU {
114114

115115
pub fn pixel_code_to_rgba(pixel_code: u8) -> [u8; PIXEL_DATA_SIZE] {
116116
match pixel_code {
117-
0b00 => [15, 56, 15, 255],
118-
0b01 => [48, 98, 48, 255],
119-
0b10 => [139, 172, 15, 255],
120-
0b11 => [155, 188, 15, 255],
117+
0b00 => [0, 0, 0, 255],
118+
0b01 => [0x55, 0x55, 0x55, 255],
119+
0b10 => [0xAA, 0xAA, 0xAA, 255],
120+
0b11 => [0xFF, 0xFF, 0xFF, 255],
121+
// 0b00 => [15, 56, 15, 255],
122+
// 0b01 => [48, 98, 48, 255],
123+
// 0b10 => [139, 172, 15, 255],
124+
// 0b11 => [155, 188, 15, 255],
121125
_ => panic!("pixel_code is: 0x{:08b}", pixel_code),
122126
}
123127
}

0 commit comments

Comments
 (0)