Skip to content

Commit

Permalink
FIX: RemapFromLegacyColourNumber to not include alpha
Browse files Browse the repository at this point in the history
... causes negative numbers in property fields
  • Loading branch information
ivan-mogilko committed Aug 27, 2024
1 parent 0097445 commit 46a98fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Editor/AGS.Editor/Utils/ColorMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static int RemapFromLegacyColourNumber(int legacyColourNumber, PaletteEnt
if ((legacyColourNumber > 0) && (legacyColourNumber < 32))
{
var rgbColor = palette[legacyColourNumber].Colour;
return rgbColor.B + (rgbColor.G << 8) + (rgbColor.R << 16) + (rgbColor.A << 24);
return rgbColor.B | (rgbColor.G << 8) | (rgbColor.R << 16);
}

// The rest is a R5G6B5 color; we convert it to a proper 32-bit xRGB
Expand Down

0 comments on commit 46a98fc

Please sign in to comment.