mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 17:11:40 -04:00
#21, added Debug.RenderPlainHouseColor control so remap color will be highlighted as older version .
This commit is contained in:
parent
654e68fdbc
commit
dad9a9d701
2 changed files with 13 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue