Article View: rec.games.programmer
Article #514damn palettes are driving me insane
From: 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
Technical Details
Message-ID:
<BsLH0y.6o2@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!s.psych.uiuc.edu!ameadShow Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!s.psych.uiuc.edu!amead From: amead@s.psych.uiuc.edu (Alan Mead) Subject: damn palettes are driving me insane Message-ID: <BsLH0y.6o2@news.cso.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: UIUC Department of Psychology Date: Fri, 7 Aug 1992 03:43:45 GMT Lines: 24