diff options
author | Nicola Mettifogo | 2008-07-31 12:50:43 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-07-31 12:50:43 +0000 |
commit | 6ed4beb1bfc1ffe7a2ca9f99dbd63eaf9c245bea (patch) | |
tree | 3950297e2117050ba53575ed417d6a0b7cec4569 /engines/parallaction/parallaction_ns.cpp | |
parent | 591973c827c60648b6d94e2bca44fd1df49ed2f5 (diff) | |
download | scummvm-rg350-6ed4beb1bfc1ffe7a2ca9f99dbd63eaf9c245bea.tar.gz scummvm-rg350-6ed4beb1bfc1ffe7a2ca9f99dbd63eaf9c245bea.tar.bz2 scummvm-rg350-6ed4beb1bfc1ffe7a2ca9f99dbd63eaf9c245bea.zip |
Made changing of background more flexible, in that the engine can now configure its BackgroundInfo before passing it to Gfx.
svn-id: r33469
Diffstat (limited to 'engines/parallaction/parallaction_ns.cpp')
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 851fe38138..e81492e655 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -253,8 +253,14 @@ void Parallaction_ns::switchBackground(const char* background, const char* mask) } -void Parallaction_ns::showSlide(const char *name) { - _gfx->setBackground(kBackgroundSlide, name, 0, 0); +void Parallaction_ns::showSlide(const char *name, int x, int y) { + BackgroundInfo *info = new BackgroundInfo; + _disk->loadSlide(*info, name); + + info->x = (x == CENTER_LABEL_HORIZONTAL) ? ((_vm->_screenWidth - info->width) >> 1) : x; + info->y = (y == CENTER_LABEL_VERTICAL) ? ((_vm->_screenHeight - info->height) >> 1) : y; + + _gfx->setBackground(kBackgroundSlide, info); } void Parallaction_ns::runPendingZones() { |