InvertPalette doesn't work correctly

Report any Hollywood bugs here
Post Reply
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

InvertPalette doesn't work correctly

Post 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
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: InvertPalette doesn't work correctly

Post by airsoftsoftwair »

Right, will be fixed, thanks for reporting!
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: InvertPalette doesn't work correctly

Post 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()
Post Reply