From 826b16ef714a228c8908b0f312cf342ee1216dfd Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 4 Mar 2007 12:55:25 +0000 Subject: no more overloading for loadBackground svn-id: r25971 --- engines/parallaction/disk.cpp | 12 +++--------- engines/parallaction/disk.h | 3 +-- engines/parallaction/location.cpp | 5 ++--- engines/parallaction/menu.cpp | 2 +- 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp index 317f8932da..10d2d197b1 100644 --- a/engines/parallaction/disk.cpp +++ b/engines/parallaction/disk.cpp @@ -420,22 +420,16 @@ void loadSlide(const char *filename) { loadBackground(path); } -void loadScenery(const char *filename) { +void loadScenery(const char *name, const char *mask) { char path[PATH_LEN]; - sprintf(path, "%s.dyn", filename); + sprintf(path, "%s.dyn", name); loadBackground(path); -} - -void loadBackground(const char* background, const char* mask) { - loadScenery(background); - - if (scumm_stricmp(background, mask)) { + if (mask != NULL) { // 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 8d1bed99f4..7b00ccd87d 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -82,8 +82,7 @@ void loadFont(const char* name, Cnv* cnv); 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 loadBackground(const char* background, const char* mask); +void loadScenery(const char* background, const char* mask); } // namespace Parallaction diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index 2b38678ebd..32e5163dfa 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -65,8 +65,7 @@ void Parallaction::parseLocation(const char *filename) { if (mask) { mask[0] = '\0'; mask++; - } else - mask = _tokens[1]; + } // WORKAROUND: the original code erroneously incremented // _currentLocationIndex, thus producing inconsistent @@ -278,7 +277,7 @@ void switchBackground(const char* background, const char* mask) { _vm->_graphics->palUnk0(palette); } - loadBackground(background, mask); + loadScenery(background, mask); return; } diff --git a/engines/parallaction/menu.cpp b/engines/parallaction/menu.cpp index 554917875a..51d884bc99 100644 --- a/engines/parallaction/menu.cpp +++ b/engines/parallaction/menu.cpp @@ -167,7 +167,7 @@ void Menu::newGame() { const char **v14 = introMsg3; - loadScenery("test"); + loadScenery("test", NULL); _vm->_graphics->palUnk0(_palette); _vm->_graphics->swapBuffers(); -- cgit v1.2.3