Page 1 of 1

InvertPalette doesn't work correctly

Posted: Tue Mar 18, 2025 2:54 pm
by jPV
InvertPalette() doesn't seem to work correctly. It changes colors to ARGB values instead of RGB or something like that.

Code: Select all

CreatePalette(1, #PALETTE_MONOCHROME)
t = GetAttribute(#PALETTE, 1, #ATTRPALETTE)
DebugPrint(HexStr(t[0]), HexStr(t[1]))

InvertPalette(1)
t = GetAttribute(#PALETTE, 1, #ATTRPALETTE)
DebugPrint(HexStr(t[0]), HexStr(t[1]))
Result:
$0 $FFFFFF
$FFFFFFFF $FF000000

Re: InvertPalette doesn't work correctly

Posted: Sun Mar 23, 2025 9:16 pm
by airsoftsoftwair
Right, will be fixed, thanks for reporting!

Re: InvertPalette doesn't work correctly

Posted: Sun May 04, 2025 5:31 pm
by airsoftsoftwair

Code: Select all

- Fix: InvertPalette() also inverted bits 24 to 31 even though they are never used resulting in the upper-
  most 8 bits getting always completely set to 1 after calling InvertPalette()