mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Use redirected palette in bitmap modes.
This commit is contained in:
parent
bfa167fcdf
commit
95fd5a52ba
@ -441,9 +441,11 @@ void Base<personality>::draw_yamaha(LineBuffer &buffer, int start, int end) {
|
||||
// TODO: Many other graphics modes.
|
||||
// TODO: much smarter loops. Duff plus a tail?
|
||||
|
||||
const auto active_palette = palette();
|
||||
|
||||
if constexpr (mode == ScreenMode::YamahaGraphics4) {
|
||||
for(int c = start >> 2; c < end >> 2; c++) {
|
||||
pixel_target_[c] = Storage<personality>::palette_[
|
||||
pixel_target_[c] = active_palette[
|
||||
buffer.bitmap[c >> 1] >> ((((c & 1) ^ 1) << 2)) & 0xf
|
||||
];
|
||||
}
|
||||
@ -451,7 +453,7 @@ void Base<personality>::draw_yamaha(LineBuffer &buffer, int start, int end) {
|
||||
|
||||
if constexpr (mode == ScreenMode::YamahaGraphics5) {
|
||||
for(int c = start >> 1; c < end >> 1; c++) {
|
||||
pixel_target_[c] = Storage<personality>::palette_[
|
||||
pixel_target_[c] = active_palette[
|
||||
buffer.bitmap[c >> 2] >> ((((c & 3) ^ 3) << 1)) & 3
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user