diff options
author | Nicola Mettifogo | 2007-03-04 11:10:55 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-03-04 11:10:55 +0000 |
commit | 61fe32066bd76ae284fe55c0db1b91cade40f427 (patch) | |
tree | 9c7ca8295af97d22bdff99966002133f2649a47a /engines/parallaction | |
parent | 696b080f633c6dd4c3e878e275efdf292e78b6dd (diff) | |
download | scummvm-rg350-61fe32066bd76ae284fe55c0db1b91cade40f427.tar.gz scummvm-rg350-61fe32066bd76ae284fe55c0db1b91cade40f427.tar.bz2 scummvm-rg350-61fe32066bd76ae284fe55c0db1b91cade40f427.zip |
hid mask and path loading details from the engine, so it is now independent from background management
svn-id: r25970
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/disk.cpp | 12 | ||||
-rw-r--r-- | engines/parallaction/disk.h | 2 | ||||
-rw-r--r-- | engines/parallaction/location.cpp | 8 |
3 files changed, 14 insertions, 8 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index 8e33816415..317f8932da 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -426,4 +426,16 @@ void loadScenery(const char *filename) { loadBackground(path); } +void loadBackground(const char* background, const char* mask) { + + loadScenery(background); + + if (scumm_stricmp(background, mask)) { + // load external masks and paths only for certain locations + loadMaskAndPath(mask); + } + +} + + } // namespace Parallaction diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 27b6012d9f..8d1bed99f4 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -83,7 +83,7 @@ void loadStatic(const char* name, StaticCnv* cnv); void loadFrames(const char* name, Cnv* cnv); void loadSlide(const char *filename); void loadScenery(const char *filename); -void loadMaskAndPath(const char *name); +void loadBackground(const char* background, const char* mask); } // namespace Parallaction diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index 84db62aa03..2b38678ebd 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -278,13 +278,7 @@ void switchBackground(const char* background, const char* mask) { _vm->_graphics->palUnk0(palette); } - loadScenery(background); - _vm->_graphics->copyScreen(Graphics::kBitBack, Graphics::kBit2); - - if (scumm_stricmp(background, mask)) { - // load external masks and paths only for certain locations - loadMaskAndPath(mask); - } + loadBackground(background, mask); return; } |