Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ Vanilla fixes:
- `ElectricAssault` weapons can now auto acquire allies' overpowerable defenses (by Ollerus)
- Fixed the issue that the time for units in the area guard mission to reacquire targets after eliminating the target is significantly longer than that in other missions (by TaranDahl)
- Purely visual animations and particles excluded from sync checks (by Starkku)
- Fixed the issue where tint color RGB mode conversion was incorrect (by Shatyuka)
Phobos fixes:
- Fixed the bug that `AllowAirstrike=no` cannot completely prevent air strikes from being launched against it (by NetsuNegi)
Expand Down
15 changes: 10 additions & 5 deletions src/Utilities/GeneralUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,18 @@ int GeneralUtils::GetColorFromColorAdd(int colorIndex)
const int green = color.G;
const int blue = color.B;

if (Drawing::ColorMode == RGBMode::RGB565)
switch (Drawing::ColorMode)
{
case RGBMode::RGB565:
colorValue |= blue | (32 * (green | (red << 6)));

if (Drawing::ColorMode != RGBMode::RGB655)
break;
case RGBMode::RGB556:
colorValue |= blue | (((32 * red) | (green >> 1)) << 6);

colorValue |= blue | (32 * ((32 * red) | (green >> 1)));
break;
default:
colorValue |= blue | (32 * ((32 * red) | (green >> 1)));
break;
}

return colorValue;
}
Expand Down
Loading