mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-22 07:06:41 +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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue