diff options
Diffstat (limited to 'engines/neverhood/palette.cpp')
-rw-r--r-- | engines/neverhood/palette.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/neverhood/palette.cpp b/engines/neverhood/palette.cpp index 936ca39ac6..c27bd867bc 100644 --- a/engines/neverhood/palette.cpp +++ b/engines/neverhood/palette.cpp @@ -139,6 +139,17 @@ void Palette::startFadeToPalette(int counter) { _status = 2; } +void Palette::fillBaseWhite(int index, int count) { + if (index + count > 256) + count = 256 - index; + for (int i = 0; i < count; i++) { + _basePalette[(i + index) * 4 + 0] = 0xFF; + _basePalette[(i + index) * 4 + 1] = 0xFF; + _basePalette[(i + index) * 4 + 2] = 0xFF; + _basePalette[(i + index) * 4 + 3] = 0; + } +} + void Palette::update() { debug(2, "Palette::update() _status = %d", _status); if (_status == 1) { |