From d45534d29d8cca396bf2f1bbd3bc63e74edeee30 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 12 Apr 2013 06:41:29 +0300 Subject: TINSEL: Remove the unused noFadeTable parameter from the fader functions --- engines/tinsel/bg.cpp | 2 +- engines/tinsel/faders.cpp | 54 +++++++++++++--------------------------------- engines/tinsel/faders.h | 12 ++++------- engines/tinsel/savescn.cpp | 2 +- engines/tinsel/tinlib.cpp | 4 ++-- engines/tinsel/tinsel.cpp | 2 +- 6 files changed, 24 insertions(+), 52 deletions(-) (limited to 'engines') diff --git a/engines/tinsel/bg.cpp b/engines/tinsel/bg.cpp index ed15bfef2a..9f1f2c43f4 100644 --- a/engines/tinsel/bg.cpp +++ b/engines/tinsel/bg.cpp @@ -153,7 +153,7 @@ static void BGmainProcess(CORO_PARAM, const void *param) { } if (g_bDoFadeIn) { - FadeInFast(NULL); + FadeInFast(); g_bDoFadeIn = false; } else if (TinselV2) PokeInTagColor(); diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp index e9517103a9..b772e37b47 100644 --- a/engines/tinsel/faders.cpp +++ b/engines/tinsel/faders.cpp @@ -137,9 +137,8 @@ static void FadeProcess(CORO_PARAM, const void *param) { * Generic palette fader/unfader. Creates a 'FadeProcess' process * for each palette that is to fade. * @param multTable Fixed point color multiplier table - * @param noFadeTable List of palettes not to fade */ -static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) { +static void Fader(const long multTable[]) { PALQ *pPal; // palette manager iterator if (TinselV2) { @@ -151,84 +150,61 @@ static void Fader(const long multTable[], SCNHANDLE noFadeTable[]) { // create a process for each palette in the palette queue for (pPal = GetNextPalette(NULL); pPal != NULL; pPal = GetNextPalette(pPal)) { - bool bFade = true; - // assume we want to fade this palette - - // is palette in the list of palettes not to fade - if (noFadeTable != NULL) { - // there is a list of palettes not to fade - for (int i = 0; noFadeTable[i] != 0; i++) { - if (pPal->hPal == noFadeTable[i]) { - // palette is in the list - dont fade it - bFade = false; - - // leave loop prematurely - break; - } - } - } - - if (bFade) { - FADE fade; + FADE fade; - // fill in FADE struct - fade.pColorMultTable = multTable; - fade.pPalQ = pPal; + // fill in FADE struct + fade.pColorMultTable = multTable; + fade.pPalQ = pPal; - // create a fader process for this palette - CoroScheduler.createProcess(PID_FADER, FadeProcess, (void *)&fade, sizeof(FADE)); - } + // create a fader process for this palette + CoroScheduler.createProcess(PID_FADER, FadeProcess, (void *)&fade, sizeof(FADE)); } } /** * Fades a list of palettes down to black. - * 'noFadeTable' is a NULL terminated list of palettes not to fade. */ -void FadeOutMedium(SCNHANDLE noFadeTable[]) { +void FadeOutMedium() { // Fixed point fade multiplier table static const long fadeout[] = {0xea00, 0xd000, 0xb600, 0x9c00, 0x8200, 0x6800, 0x4e00, 0x3400, 0x1a00, 0, -1}; // call generic fader - Fader(fadeout, noFadeTable); + Fader(fadeout); } /** * Fades a list of palettes down to black. - * @param noFadeTable A NULL terminated list of palettes not to fade. */ -void FadeOutFast(SCNHANDLE noFadeTable[]) { +void FadeOutFast() { // Fixed point fade multiplier table static const long fadeout[] = {0xd000, 0xa000, 0x7000, 0x4000, 0x1000, 0, -1}; // call generic fader - Fader(fadeout, noFadeTable); + Fader(fadeout); } /** * Fades a list of palettes from black to their current colors. - * 'noFadeTable' is a NULL terminated list of palettes not to fade. */ -void FadeInMedium(SCNHANDLE noFadeTable[]) { +void FadeInMedium() { // Fade multiplier table static const long fadein[] = {0, 0x1a00, 0x3400, 0x4e00, 0x6800, 0x8200, 0x9c00, 0xb600, 0xd000, 0xea00, 0x10000L, -1}; // call generic fader - Fader(fadein, noFadeTable); + Fader(fadein); } /** * Fades a list of palettes from black to their current colors. - * @param noFadeTable A NULL terminated list of palettes not to fade. */ -void FadeInFast(SCNHANDLE noFadeTable[]) { +void FadeInFast() { // Fade multiplier table static const long fadein[] = {0, 0x1000, 0x4000, 0x7000, 0xa000, 0xd000, 0x10000L, -1}; // call generic fader - Fader(fadein, noFadeTable); + Fader(fadein); } void PokeInTagColor() { diff --git a/engines/tinsel/faders.h b/engines/tinsel/faders.h index dc0b903d7e..f7db902fe5 100644 --- a/engines/tinsel/faders.h +++ b/engines/tinsel/faders.h @@ -39,14 +39,10 @@ namespace Tinsel { |* Fader Function Prototypes *| \*----------------------------------------------------------------------*/ -// usefull palette faders - they all need a list of palettes that -// should not be faded. This parameter can be -// NULL - fade all palettes. - -void FadeOutMedium(SCNHANDLE noFadeTable[]); -void FadeOutFast(SCNHANDLE noFadeTable[]); -void FadeInMedium(SCNHANDLE noFadeTable[]); -void FadeInFast(SCNHANDLE noFadeTable[]); +void FadeOutMedium(); +void FadeOutFast(); +void FadeInMedium(); +void FadeInFast(); void PokeInTagColor(); } // End of namespace Tinsel diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp index 0c0cc5c81e..10f98df6d7 100644 --- a/engines/tinsel/savescn.cpp +++ b/engines/tinsel/savescn.cpp @@ -303,7 +303,7 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) { switch (n) { case RS_COUNT + COUNTOUT_COUNT: // Trigger pre-load and fade and start countdown - FadeOutFast(NULL); + FadeOutFast(); break; case RS_COUNT: diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 6a396b9b01..d15ac2fbba 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -1151,14 +1151,14 @@ static void FaceTag(int actor, HPOLYGON hp) { * FadeIn */ static void FadeIn() { - FadeInMedium(NULL); + FadeInMedium(); } /** * FadeOut */ static void FadeOut() { - FadeOutMedium(NULL); + FadeOutMedium(); } /** diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index e836fdff1f..9075e1adb1 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -666,7 +666,7 @@ bool ChangeScene(bool bReset) { default: // Trigger pre-load and fade and start countdown CountOut = COUNTOUT_COUNT; - FadeOutFast(NULL); + FadeOutFast(); if (TinselV2) _vm->_pcmMusic->startFadeOut(COUNTOUT_COUNT); break; -- cgit v1.2.3