aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood/palette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/neverhood/palette.cpp')
-rw-r--r--engines/neverhood/palette.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp
index bfabf8998a..e186d3814f 100644
--- a/engines/neverhood/palette.cpp
+++ b/engines/neverhood/palette.cpp
@@ -82,6 +82,13 @@ void Palette::addPalette(uint32 fileHash, int toIndex, int count, int fromIndex)
_vm->_screen->testPalette(_palette);
}
+void Palette::copyPalette(const byte *palette, int toIndex, int count, int fromIndex) {
+ if (toIndex + count > 256)
+ count = 256 - toIndex;
+ memcpy(_palette + toIndex * 4, palette + fromIndex * 4, count * 4);
+ _vm->_screen->testPalette(_palette);
+}
+
void Palette::startFadeToBlack(int counter) {
debug("Palette::startFadeToBlack(%d)", counter);
if (counter == 0)