From 10ee427772c03db711dfd3d363075000e45697b6 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 12 Aug 2007 17:13:21 +0000 Subject: 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 --- engines/parallaction/parallaction_br.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'engines/parallaction/parallaction_br.cpp') 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(); -- cgit v1.2.3