From 6e692195c8b305fac026c139e8b0d199755a0656 Mon Sep 17 00:00:00 2001 From: Le Philousophe Date: Sun, 10 Mar 2019 17:25:34 +0100 Subject: [PATCH] CRYOMNI3D: Let change individual color in main palette --- engines/cryomni3d/versailles/engine.cpp | 7 +++++++ engines/cryomni3d/versailles/engine.h | 1 + 2 files changed, 8 insertions(+) diff --git a/engines/cryomni3d/versailles/engine.cpp b/engines/cryomni3d/versailles/engine.cpp index bb018255513..b9795c28e37 100644 --- a/engines/cryomni3d/versailles/engine.cpp +++ b/engines/cryomni3d/versailles/engine.cpp @@ -339,6 +339,13 @@ void CryOmni3DEngine_Versailles::setupPalette(const byte *palette, uint start, u } } +void CryOmni3DEngine_Versailles::setMainPaletteColor(byte color, byte red, byte green, byte blue) { + _mainPalette[3 * color + 0] = red; + _mainPalette[3 * color + 1] = green; + _mainPalette[3 * color + 2] = blue; + setPalette(_mainPalette, 0, 256); +} + struct transparentScore { unsigned int score; byte redScaled; diff --git a/engines/cryomni3d/versailles/engine.h b/engines/cryomni3d/versailles/engine.h index 34f2c6cb884..e38e57c6a82 100644 --- a/engines/cryomni3d/versailles/engine.h +++ b/engines/cryomni3d/versailles/engine.h @@ -311,6 +311,7 @@ private: typedef void (CryOmni3DEngine_Versailles::*DisplayObjectHook)(Graphics::ManagedSurface &surface); void displayObject(const Common::String &imgName, DisplayObjectHook hook = nullptr); + void setMainPaletteColor(byte color, byte red, byte green, byte blue); void setupPalette(const byte *colors, uint start, uint num, bool commit); bool showSubtitles() const;