aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction_br.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-08-12 17:13:21 +0000
committerNicola Mettifogo2007-08-12 17:13:21 +0000
commit10ee427772c03db711dfd3d363075000e45697b6 (patch)
tree405b34c2e258eef46821fd12be2bb8b7029f61a8 /engines/parallaction/parallaction_br.cpp
parent0ec634ea06d3e4f8506ab7dd1ddfdeedc3d28f23 (diff)
downloadscummvm-rg350-10ee427772c03db711dfd3d363075000e45697b6.tar.gz
scummvm-rg350-10ee427772c03db711dfd3d363075000e45697b6.tar.bz2
scummvm-rg350-10ee427772c03db711dfd3d363075000e45697b6.zip
Changed signature of disk routines for backgrounds to something resembling revisions prior to 28524, yet keeping the new useful BackgroundInfo struct. Those routines can now be used to fill specific fields of the struct, instead of having them create a new one at each call.
This feature is needed by BRA, since background, mask and path are specified by different instructions in the script. svn-id: r28566
Diffstat (limited to 'engines/parallaction/parallaction_br.cpp')
-rw-r--r--engines/parallaction/parallaction_br.cpp27
1 files changed, 12 insertions, 15 deletions
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 45dfbc134f..f6dd1aee45 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -151,26 +151,24 @@ int Parallaction_br::go() {
void Parallaction_br::splash(const char *name) {
- BackgroundInfo *info;
+ BackgroundInfo info;
_gfx->clearScreen(Gfx::kBitFront);
- info = _disk->loadSlide(name);
- _gfx->setPalette(info->palette);
- _gfx->flatBlitCnv(&info->bg, (640 - info->width) >> 1, (400 - info->height) >> 1, Gfx::kBitFront);
+ _disk->loadSlide(info, name);
+ _gfx->setPalette(info.palette);
+ _gfx->flatBlitCnv(&info.bg, (640 - info.width) >> 1, (400 - info.height) >> 1, Gfx::kBitFront);
_gfx->updateScreen();
_system->delayMillis(600);
Palette pal;
for (uint i = 0; i < 64; i++) {
- info->palette.fadeTo(pal, 1);
- _gfx->setPalette(info->palette);
+ info.palette.fadeTo(pal, 1);
+ _gfx->setPalette(info.palette);
_gfx->updateScreen();
_system->delayMillis(20);
}
- info->bg.free();
-
- delete info;
+ info.bg.free();
return;
}
@@ -197,7 +195,7 @@ int Parallaction_br::showMenu() {
_gfx->clearScreen(Gfx::kBitFront);
- BackgroundInfo *info;
+ BackgroundInfo info;
Graphics::Surface _menuItems[7];
@@ -221,9 +219,9 @@ int Parallaction_br::showMenu() {
kMenuPart4
};
- info = _disk->loadSlide("tbra");
- _gfx->setPalette(info->palette);
- _gfx->flatBlitCnv(&info->bg, 20, 50, Gfx::kBitFront);
+ _disk->loadSlide(info, "tbra");
+ _gfx->setPalette(info.palette);
+ _gfx->flatBlitCnv(&info.bg, 20, 50, Gfx::kBitFront);
int availItems = 4 + _progress;
@@ -274,8 +272,7 @@ int Parallaction_br::showMenu() {
_system->showMouse(false);
- info->bg.free();
- delete info;
+ info.bg.free();
for (int i = 0; i < availItems; i++)
_menuItems[i].free();