diff options
Diffstat (limited to 'engines/cine/pal.cpp')
-rw-r--r-- | engines/cine/pal.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp index f3031c3b60..e02fb3ae9a 100644 --- a/engines/cine/pal.cpp +++ b/engines/cine/pal.cpp @@ -26,6 +26,7 @@ #include "cine/cine.h" #include "cine/various.h" #include "cine/pal.h" +#include "common/system.h" // For g_system->setPalette namespace Cine { @@ -229,6 +230,12 @@ Graphics::PixelFormat Palette::colorFormat() const { return _format; } +void Palette::setGlobalOSystemPalette() const { + byte buf[256 * 4]; // Allocate space for the largest possible palette + save(buf, sizeof(buf), Cine::kSystemPalFormat, CINE_LITTLE_ENDIAN); + g_system->setPalette(buf, 0, colorCount()); +} + void Palette::setColorFormat(const Graphics::PixelFormat format) { _format = format; |