Opened 20 years ago

Closed 20 years ago

Last modified 6 years ago

#8329 closed patch

EGA palette range correction

Reported by: SF/lord_nightmare Owned by: Kirben
Priority: normal Component: Graphics
Version: Keywords:
Cc: Game:


This fixes the EGA palette so that the low two bits are not always 0 for each Red, Green, and Blue element. The reason that the current values are that way is because someone transscribed the standard IBM VGA-equivalents-of-EGA-pallete (which is 6-bits-per-color-channel) and didn't adjust the range when converting them to 8-bit values. [they only did (val << 2) instead of ((val << 2) | (val >> 4))] So, instead of 0x2A, 0x15, and 0x3F ending up as 0xAA, 0x55, 0xFF, they ended up as 0xA8, 0x54, and 0xFC. This patch fixes that. I can't think of any regressions this could possibly cause.

Jonathan Gevaryahu (AKA Lord Nightmare)

Ticket imported from: #896434. Ticket imported from: patches/434.

Attachments (1)

palette.diff (1.2 KB ) - added by SF/lord_nightmare 20 years ago.
EGA values patch to palette.cpp

Download all attachments as: .zip

Change History (3)

by SF/lord_nightmare, 20 years ago

Attachment: palette.diff added

EGA values patch to palette.cpp

comment:1 by Kirben, 20 years ago

Owner: set to Kirben
Status: newclosed

comment:2 by digitall, 6 years ago

Component: Graphics
Note: See TracTickets for help on using tickets.