aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/parallaction/callables_ns.cpp50
-rw-r--r--engines/parallaction/graphics.cpp7
-rw-r--r--engines/parallaction/graphics.h1
3 files changed, 8 insertions, 50 deletions
diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp
index 9b3972723f..94a0747ab1 100644
--- a/engines/parallaction/callables_ns.cpp
+++ b/engines/parallaction/callables_ns.cpp
@@ -205,11 +205,11 @@ void Parallaction_ns::_c_fade(void *parm) {
memset(pal, 0, sizeof(Gfx::Palette));
for (uint16 _di = 0; _di < 64; _di++) {
- _gfx->fadeInPalette(pal);
+ _gfx->fadePalette(pal, _gfx->_palette, 1);
_gfx->setPalette(pal);
- g_system->delayMillis(20);
_gfx->updateScreen();
+ g_system->delayMillis(20);
}
return;
@@ -338,11 +338,6 @@ void Parallaction_ns::_c_setMask(void *parm) {
void Parallaction_ns::_c_endComment(void *param) {
- byte* _enginePal = _gfx->_palette;
- Gfx::Palette pal;
-
- _gfx->makeGrayscalePalette(pal);
-
int16 w = 0, h = 0;
_gfx->getStringExtent(_location._endComment, 130, &w, &h);
@@ -359,45 +354,16 @@ void Parallaction_ns::_c_endComment(void *param) {
_gfx->displayWrappedString(_location._endComment, 3, 5, 0, 130);
_gfx->updateScreen();
- uint32 si, di;
- for (di = 0; di < PALETTE_COLORS; di++) {
- for (si = 0; si <= 93; si +=3) {
-
- int8 al;
-
- if (_enginePal[si] != pal[si]) {
- al = _enginePal[si];
- if (al < pal[si])
- al = 1;
- else
- al = -1;
- _enginePal[si] += al;
- }
-
- if (_enginePal[si+1] != pal[si+1]) {
- al = _enginePal[si+1];
- if (al < pal[si+1])
- al = 1;
- else
- al = -1;
- _enginePal[si+1] += al;
- }
- if (_enginePal[si+2] != pal[si+2]) {
- al = _enginePal[si+2];
- if (al < pal[si+2])
- al = 1;
- else
- al = -1;
- _enginePal[si+2] += al;
- }
+ Gfx::Palette pal;
+ _gfx->makeGrayscalePalette(pal);
- }
+ for (uint di = 0; di < 64; di++) {
+ _gfx->fadePalette(_gfx->_palette, pal, 1);
+ _gfx->setPalette(_gfx->_palette);
- _gfx->setPalette(_enginePal);
- g_system->delayMillis(20);
_gfx->updateScreen();
-
+ g_system->delayMillis(20);
}
waitUntilLeftClick();
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 27e2de939d..16b1059c28 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -203,13 +203,6 @@ void Gfx::animatePalette() {
return;
}
-void Gfx::fadeInPalette(Palette pal) {
- for (uint16 i = 0; i < BASE_PALETTE_COLORS * 3; i++)
- if (pal[i] < _palette[i]) pal[i]++;
-
- return;
-}
-
void Gfx::makeGrayscalePalette(Palette pal) {
for (uint16 i = 0; i < BASE_PALETTE_COLORS; i++) {
diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h
index b7013d125e..cb92c90547 100644
--- a/engines/parallaction/graphics.h
+++ b/engines/parallaction/graphics.h
@@ -209,7 +209,6 @@ public:
void setPalette(Palette palette, uint32 first = FIRST_BASE_COLOR, uint32 num = BASE_PALETTE_COLORS);
void setBlackPalette();
void animatePalette();
- void fadeInPalette(Palette palette); // fades palette (from black) to system palette
void fadePalette(Palette palette, Palette target, uint step); // fades palette to target palette, with specified step
void makeGrayscalePalette(Palette palette); // transform palette into black and white