Opened 15 years ago

Closed 15 years ago

Last modified 8 months ago

#8329 closed patch

EGA palette range correction

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

Description

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 15 years ago.
EGA values patch to palette.cpp

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by SF/lord_nightmare

Attachment: palette.diff added

EGA values patch to palette.cpp

comment:1 Changed 15 years ago by Kirben

Owner: set to Kirben
Status: newclosed

comment:2 Changed 8 months ago by digitall

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