Update bitmap4.rs

This commit is contained in:
xokz 2023-09-28 15:03:24 -04:00 committed by GitHub
parent cf80e313b1
commit 575976bf52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,9 +48,9 @@ impl Bitmap4 {
let c = addr.get(x_in_screen, y_in_screen); let c = addr.get(x_in_screen, y_in_screen);
if x & 0b1 != 0 { if x & 0b1 != 0 {
addr.set(x_in_screen, y_in_screen, (c & 0xff) | u16::from(colour) << 8); addr.set(x_in_screen, y_in_screen, c & 0xff | u16::from(colour) << 8);
} else { } else {
addr.set(x_in_screen, y_in_screen, (c & 0xff00) | u16::from(colour)); addr.set(x_in_screen, y_in_screen, c & 0xff00 | u16::from(colour));
} }
} }