mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
FREESCAPE: improved palette handling for Driller Amstrad CPC releases
This commit is contained in:
parent
b2b75baad5
commit
fb9f163c89
@ -83,13 +83,20 @@ byte kDrillerCPCPalette[27][3] = {
|
||||
{0xff, 0xff, 0xff},
|
||||
};
|
||||
|
||||
byte kDrillerCPCPalette1[27][3] = {
|
||||
{0x00, 0x00, 0x00}, // 0: black
|
||||
{0xff, 0x80, 0x00}, // 1: orange
|
||||
{0x00, 0xff, 0xff}, // 2: cyan
|
||||
{0x00, 0x80, 0x00}, // 3: green
|
||||
};
|
||||
|
||||
void FreescapeEngine::loadColorPalette() {
|
||||
if (_renderMode == Common::kRenderEGA) {
|
||||
_gfx->_palette = (byte *)&dos_EGA_palette;
|
||||
} else if (_renderMode == Common::kRenderZX) {
|
||||
_gfx->_palette = (byte *)kDrillerZXPalette;
|
||||
} else if (_renderMode == Common::kRenderCPC) {
|
||||
_gfx->_palette = (byte *)kDrillerCPCPalette;
|
||||
_gfx->_palette = (byte *)kDrillerCPCPalette1;
|
||||
} else if (_renderMode == Common::kRenderCGA) {
|
||||
_gfx->_palette = nullptr; // palette depends on the area
|
||||
} else if (_renderMode == Common::kRenderAmiga || _renderMode == Common::kRenderAtariST) {
|
||||
|
@ -126,7 +126,7 @@ bool Renderer::getRGBAtCPC(uint8 index, uint8 &r1, uint8 &g1, uint8 &b1, uint8 &
|
||||
return false;
|
||||
|
||||
assert (_renderMode == Common::kRenderCPC);
|
||||
if (index == 4) { // Solid colors
|
||||
if (index <= 4) { // Solid colors
|
||||
readFromPalette(index - 1, r1, g1, b1);
|
||||
r2 = r1;
|
||||
g2 = g1;
|
||||
@ -135,11 +135,12 @@ bool Renderer::getRGBAtCPC(uint8 index, uint8 &r1, uint8 &g1, uint8 &b1, uint8 &
|
||||
}
|
||||
|
||||
byte *entry = (*_colorMap)[index - 1];
|
||||
byte be = *(entry);
|
||||
readFromPalette((be >> 4), r1, g1, b1);
|
||||
//entry++;
|
||||
entry++;
|
||||
be = *(entry);
|
||||
readFromPalette((be >> 4), r2, g2, b2);
|
||||
byte be = *(entry);
|
||||
//be = *(entry);
|
||||
readFromPalette((be >> 4) % 4, r1, g1, b1);
|
||||
readFromPalette((be & 0xf) % 4, r2, g2, b2);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user