Thread View: rec.games.programmer
1 messages
1 total messages
Started by Alan Mead
Fri, 07 Aug 1992 03:43
damn palettes are driving me insane
Author: Alan Mead
Date: Fri, 07 Aug 1992 03:43
Date: Fri, 07 Aug 1992 03:43
24 lines
1611 bytes
1611 bytes
I got a routine running to display PCX files without too much sweat. Until, that is, I started displaying 16 color 640x480 files that didn't use the "default" palette. I have 16 color (apparently that means 16 actual colors or 16 shades of grey) files with 24 bit RBG "true color" palettes. But the EGA (and VGA 640x480x16 EGAiod mode) doesn't work with RGB values (not directly). And I'm using the BGI to interact with the board, so I am stuck with their palette functions (Turbo Pascal--no snickering) and I have not been able to either (1) get the SetRgbPalette() routine to work or (2) to translate the RGB values into one of the 64 EGA color numbers. I think I can translate the 24 bit RGB value into a 6 bit RBG value, but I don't know how to load that into ... (the EGA registers?) so I can set the palette straight. Let me be clear, I have a PCX file that displays fine if I don't mess with the palette. But if I try to set the palette (any palette in any manner), the image is displayed really wrong. The other files don't show up at all or are worse off. Any help would be appreciated. -alan mead
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads