Skip to content

Commit ca35e7e

Browse files
committed
fix small palette issue
1 parent 69979ad commit ca35e7e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/Resource/XcomResourcePack.cpp‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,11 @@ void XcomResourcePack::loadBattlescapeResources()
815815
"PAL_BATTLESCAPE_2",
816816
"PAL_BATTLESCAPE_3"};
817817

818+
SDL_Color backPal[] = {{0, 5, 4, 255},
819+
{0, 10, 34, 255},
820+
{2, 9, 24, 255},
821+
{2, 0, 24, 255}};
822+
818823
for (size_t i = 0; i < sizeof(lbms)/sizeof(lbms[0]); ++i)
819824
{
820825
std::ostringstream s;
@@ -828,7 +833,9 @@ void XcomResourcePack::loadBattlescapeResources()
828833
Surface *tempSurface = new Surface(1, 1);
829834
tempSurface->loadImage(CrossPlatform::getDataFile(s.str()));
830835
_palettes[pals[i]] = new Palette();
831-
_palettes[pals[i]]->setColors(tempSurface->getPalette(), 256);
836+
SDL_Color *colors = tempSurface->getPalette();
837+
colors[255] = backPal[i];
838+
_palettes[pals[i]]->setColors(colors, 256);
832839
delete tempSurface;
833840
}
834841
}

0 commit comments

Comments
 (0)