aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2013-04-12 07:18:53 +0300
committerFilippos Karapetis2013-04-12 07:19:53 +0300
commit687e47d332e24e4579c8ff4bab4858a66cbf8ab6 (patch)
tree076d67c1bc6ed97a40c401401fa3b9b8fdcd5785 /engines
parent94b328fa7fc0b4f2cc5bb9e8b20ca8a771b3f7f4 (diff)
downloadscummvm-rg350-687e47d332e24e4579c8ff4bab4858a66cbf8ab6.tar.gz
scummvm-rg350-687e47d332e24e4579c8ff4bab4858a66cbf8ab6.tar.bz2
scummvm-rg350-687e47d332e24e4579c8ff4bab4858a66cbf8ab6.zip
TINSEL: Remove the unused ghost palette
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/palette.cpp31
-rw-r--r--engines/tinsel/palette.h2
-rw-r--r--engines/tinsel/savescn.cpp1
-rw-r--r--engines/tinsel/tinlib.cpp1
4 files changed, 0 insertions, 35 deletions
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index c2ba40b26d..505cb21adb 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -72,8 +72,6 @@ static VIDEO_DAC_Q *g_pDAChead;
/** the translucent palette lookup table */
uint8 g_transPalette[MAX_COLORS]; // used in graphics.cpp
-uint8 g_ghostPalette[MAX_COLORS];
-
static int g_translucentIndex = 228;
static int g_talkIndex = 233;
@@ -576,35 +574,6 @@ void CreateTranslucentPalette(SCNHANDLE hPalette) {
}
/**
- * Creates the ghost palette
- */
-void CreateGhostPalette(SCNHANDLE hPalette) {
- // get a pointer to the palette
- PALETTE *pPal = (PALETTE *)LockMem(hPalette);
-
- // leave background color alone
- g_ghostPalette[0] = 0;
-
- int32 numColors = FROM_32(pPal->numColors);
- for (int32 i = 0; i < numColors; i++) {
- // get the RGB color model values
- uint8 red = TINSEL_GetRValue(pPal->palRGB[i]);
- uint8 green = TINSEL_GetGValue(pPal->palRGB[i]);
- uint8 blue = TINSEL_GetBValue(pPal->palRGB[i]);
-
- // calculate the Value field of the HSV color model
- unsigned val = (red > green) ? red : green;
- val = (val > blue) ? val : blue;
-
- // map the Value field to one of the 4 colors reserved for the translucent palette
- val /= 64;
- assert(/*val >= 0 &&*/ val <= 3);
- g_ghostPalette[i + 1] = (uint8)(val + SysVar(ISV_GHOST_BASE));
- }
-}
-
-
-/**
* Returns an adjusted color RGB
* @param color Color to scale
*/
diff --git a/engines/tinsel/palette.h b/engines/tinsel/palette.h
index 9bcbfd242d..c57b8df2ba 100644
--- a/engines/tinsel/palette.h
+++ b/engines/tinsel/palette.h
@@ -146,8 +146,6 @@ void FadingPalette(PALQ *pPalQ, bool bFading);
void CreateTranslucentPalette(SCNHANDLE BackPal);
-void CreateGhostPalette(SCNHANDLE hPalette);
-
void NoFadingPalettes(); // All fading processes have just been killed
void DimPartPalette(
diff --git a/engines/tinsel/savescn.cpp b/engines/tinsel/savescn.cpp
index 10f98df6d7..d2537169f7 100644
--- a/engines/tinsel/savescn.cpp
+++ b/engines/tinsel/savescn.cpp
@@ -360,7 +360,6 @@ static int DoRestoreSceneFrame(SAVED_DATA *sd, int n) {
RestoreActorZ(sd->savedActorZ);
RestoreZpositions(sd->zPositions);
RestoreSysVars(sd->SavedSystemVars);
- CreateGhostPalette(BgPal());
RestoreActors(sd->NumSavedActors, sd->SavedActorInfo);
RestoreSoundReels(sd->SavedSoundReels);
return 1;
diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp
index d15ac2fbba..34aa64a609 100644
--- a/engines/tinsel/tinlib.cpp
+++ b/engines/tinsel/tinlib.cpp
@@ -1198,7 +1198,6 @@ static void Ghost(int actor, int tColor, int tPalOffset) {
SetSysVar(ISV_GHOST_ACTOR, actor);
SetSysVar(ISV_GHOST_COLOR, tColor);
SetSysVar(ISV_GHOST_BASE, tPalOffset);
- CreateGhostPalette(BgPal());
}
/**