TINSEL: Initialize graphics for Noir as 16 Bit 565

Also avoid touching palettes when drawing backgrounds.
This commit is contained in:
Einar Johan Trøan Sømåen 2021-02-16 23:24:10 +01:00
parent dfbdd4bca6
commit 3d461fca18
No known key found for this signature in database
GPG Key ID: E78D26458077C9C5
2 changed files with 12 additions and 5 deletions

View File

@ -242,9 +242,11 @@ void Background::DrawBackgnd() {
}
}
// transfer any new palettes to the video DAC
PalettesToVideoDAC();
if (!TinselV3) {
// transfer any new palettes to the video DAC
PalettesToVideoDAC();
}
// update the screen within the clipping rectangles
for (RectList::const_iterator r = clipRects.begin(); r != clipRects.end(); ++r) {
UpdateScreenRect(*r);

View File

@ -1023,9 +1023,14 @@ Common::Error TinselEngine::run() {
// Initialize backend
if (getGameID() == GID_NOIR) {
initGraphics(640, 480);
int width = 640;
int height = 480;
_screenSurface.create(640, 432, Graphics::PixelFormat::createFormatCLUT8());
Graphics::PixelFormat noirFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
initGraphics(width, height, &noirFormat);
_screenSurface.create(width, height, noirFormat);
} else if (getGameID() == GID_DW2) {
#ifndef DW2_EXACT_SIZE
initGraphics(640, 480);