mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
Update bitmap4.rs
colors of lower values can now overwrite colors of higher values.
This commit is contained in:
parent
9ab17e7cf6
commit
cf80e313b1
|
@ -48,9 +48,9 @@ impl Bitmap4 {
|
|||
|
||||
let c = addr.get(x_in_screen, y_in_screen);
|
||||
if x & 0b1 != 0 {
|
||||
addr.set(x_in_screen, y_in_screen, c | u16::from(colour) << 8);
|
||||
addr.set(x_in_screen, y_in_screen, (c & 0xff) | u16::from(colour) << 8);
|
||||
} else {
|
||||
addr.set(x_in_screen, y_in_screen, c | u16::from(colour));
|
||||
addr.set(x_in_screen, y_in_screen, (c & 0xff00) | u16::from(colour));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue