diff options
Diffstat (limited to 'engines/access/screen.cpp')
-rw-r--r-- | engines/access/screen.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp index 8dcc9f1db9..3823267bc0 100644 --- a/engines/access/screen.cpp +++ b/engines/access/screen.cpp @@ -26,6 +26,7 @@ #include "common/textconsole.h" #include "common/system.h" #include "graphics/palette.h" +#include "access/access.h" #include "access/screen.h" #include "access/resources.h" @@ -42,6 +43,8 @@ Screen::Screen(AccessEngine *vm) : _vm(vm) { _topSkip = _bottomSkip = 0; _clipWidth = _clipHeight = 0; _scrollFlag = false; + _scrollThreshold = 0; + _startColor = _numColors = 0; } void Screen::setDisplayScan() { @@ -71,6 +74,12 @@ void Screen::loadPalette(Common::SeekableReadStream *stream) { _loadPalFlag = true; } +void Screen::loadPalette(int fileNum, int subfile) { + byte *palette = _vm->_files->loadFile(fileNum, subfile); + Common::copy(palette, palette + (_numColors * 3), &_rawPalette[_startColor * 3]); + delete[] palette; +} + void Screen::setPalette() { g_system->getPaletteManager()->setPalette(&_rawPalette[0], 0, PALETTE_COUNT); } |