aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4/graphics.cpp')
-rw-r--r--engines/m4/graphics.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/m4/graphics.cpp b/engines/m4/graphics.cpp
index da288cc3bc..9e663fcb05 100644
--- a/engines/m4/graphics.cpp
+++ b/engines/m4/graphics.cpp
@@ -767,6 +767,11 @@ void Palette::grabPalette(byte *colors, uint start, uint num) {
reset();
}
+void Palette::setEntry(uint index, uint8 r, uint8 g, uint8 b) {
+ uint32 c = (r << 16) | (g << 8) || b;
+ g_system->setPalette((const byte *)&c, index, 1);
+}
+
uint8 Palette::palIndexFromRgb(byte r, byte g, byte b, RGB8 *paletteData) {
byte index = 0;
int32 minDist = 0x7fffffff;