Skip to content

Commit

Permalink
ACCESS: Simplification of logic for selectively applying loaded palettes
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Dec 13, 2014
1 parent d23d95b commit d6963d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
5 changes: 4 additions & 1 deletion engines/access/files.cpp
Expand Up @@ -144,7 +144,10 @@ void FileManager::loadScreen(Graphics::Surface *dest, int fileNum, int subfile)
}

void FileManager::handleScreen(Graphics::Surface *dest, Resource *res) {
_vm->_screen->loadPalette(res->_stream);
_vm->_screen->loadRawPalette(res->_stream);
if (_setPaletteFlag)
_vm->_screen->setPalette();
_setPaletteFlag = true;

// The remainder of the file after the palette may be separately compressed,
// so call handleFile to handle it if it is
Expand Down
7 changes: 0 additions & 7 deletions engines/access/screen.cpp
Expand Up @@ -99,13 +99,6 @@ void Screen::setInitialPalettte() {
g_system->getPaletteManager()->setPalette(INITIAL_PALETTE, 0, 18);
}

void Screen::loadPalette(Common::SeekableReadStream *stream) {
loadRawPalette(stream);
if (_vm->_files->_setPaletteFlag)
setPalette();
_vm->_files->_setPaletteFlag = true;
}

void Screen::loadPalette(int fileNum, int subfile) {
Resource *res = _vm->_files->loadFile(fileNum, subfile);
byte *palette = res->data();
Expand Down
2 changes: 0 additions & 2 deletions engines/access/screen.h
Expand Up @@ -121,8 +121,6 @@ class Screen: public ASurface {
*/
void setIconPalette() {}

void loadPalette(Common::SeekableReadStream *stream);

void loadPalette(int fileNum, int subfile);

void setPalette();
Expand Down

0 comments on commit d6963d8

Please sign in to comment.