FREESCAPE: load correct border palette for certain driller releases

This commit is contained in:
neuromancer 2023-03-07 21:27:34 +01:00
parent 23a594af6c
commit 047d525f13
2 changed files with 13 additions and 1 deletions

View File

@ -54,7 +54,7 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
else if (isSpectrum())
_viewArea = Common::Rect(56, 20, 264, 124);
else if (isCPC())
_viewArea = Common::Rect(36, 19, 284, 120);
_viewArea = Common::Rect(36, 16, 284, 117);
else if (isC64())
_viewArea = Common::Rect(32, 16, 288, 119);

View File

@ -215,6 +215,18 @@ void FreescapeEngine::swapPalette(uint16 levelID) {
_gfx->_inkColor = _areaMap[levelID]->_inkColor;
_gfx->_paperColor = _areaMap[levelID]->_paperColor;
_gfx->_underFireBackgroundColor = _areaMap[levelID]->_underFireBackgroundColor;
byte *palette = (byte *)malloc(sizeof(byte) * 4 * 3);
for (int c = 0; c < 4; c++) {
byte r, g, b;
_gfx->selectColorFromFourColorPalette(c, r, g, b);
palette[3 * c + 0] = r;
palette[3 * c + 1] = g;
palette[3 * c + 2] = b;
}
_border->setPalette(palette, 0, 4);
free(palette);
processBorder();
} else if (isDOS() && _renderMode == Common::kRenderCGA) {
const CGAPalettteEntry *entry = rawCGAPaletteTable;
while (entry->areaId) {