#21, added Debug.RenderPlainHouseColor control so remap color will be highlighted as older version .

This commit is contained in:
Zero Fanker 2024-06-01 12:05:34 -04:00
parent 654e68fdbc
commit dad9a9d701
2 changed files with 13 additions and 2 deletions

View file

@ -614,6 +614,16 @@ __forceinline void BlitPic(void* dst, int x, int y, int dleft, int dtop, int dpi
CalculateHouseColorPalette(houseColors, newPal, color);
const BYTE* const pLighting = (bpp == 4 && pd.lighting && !pd.lighting->empty()) ? pd.lighting->data() : nullptr;
auto getHouseColor = std::function([](BYTE idx, BYTE houseColorMinIdx) -> int {
return idx - houseColorMinIdx;
});
if (g_data["Debug"].GetBool("RenderPlainHouseColor")) {
getHouseColor = [](BYTE idx, BYTE houseColorMinIdx) -> int {
return 0;
};
}
for (e = srcRect.top; e < srcRect.bottom; e++) {
int left = pd.vborder[e].left;
int right = pd.vborder[e].right;
@ -640,7 +650,7 @@ __forceinline void BlitPic(void* dst, int x, int y, int dleft, int dtop, int dpi
} else {
// Replace the original palette color with the house color
ASSERT(val >= houseColorMin && val <= houseColorMax);
const int v = (val - houseColorMin);
const int v = getHouseColor(val, houseColorMin);
c = houseColors[v];
}
if (pLighting) {

View file

@ -1,6 +1,6 @@
; FAData.ini - Data file for FinalAlert 2: Yuri's Revenge
; This file offers data for FinalAlert 2
; last change: Matthias Wagner, Feb 12, 2024
; last change: Zero Fanker, June 1, 2024
; Debug section: use carefully!
[Debug]
@ -10,6 +10,7 @@
AllowTunnels=yes
AllowUnidirectionalTunnels=yes
;ShowBuildingsWithToTile=no
RenderPlainHouseColor=yes
[Sides]
0=Allied