mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-16 18:30:32 +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: Many other graphics modes.
|
||||||
// TODO: much smarter loops. Duff plus a tail?
|
// TODO: much smarter loops. Duff plus a tail?
|
||||||
|
|
||||||
|
const auto active_palette = palette();
|
||||||
|
|
||||||
if constexpr (mode == ScreenMode::YamahaGraphics4) {
|
if constexpr (mode == ScreenMode::YamahaGraphics4) {
|
||||||
for(int c = start >> 2; c < end >> 2; c++) {
|
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
|
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) {
|
if constexpr (mode == ScreenMode::YamahaGraphics5) {
|
||||||
for(int c = start >> 1; c < end >> 1; c++) {
|
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
|
buffer.bitmap[c >> 2] >> ((((c & 3) ^ 3) << 1)) & 3
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user