🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1209

Re: getting the palette from a PCX file

#1209
From: sl8nl
Date: Wed, 14 Oct 1992 22:57
8 lines
613 bytes
>            blockread(PCXfile,PaletteVar,768); <-record size is 1
> 
> Any suggestions as to what the problem might be would be much appreciated.

You need to divide everything by 4 (or shr 2).  The palette values are stored
from 0-255, but the VGA card expects 0-63.

Josh
Technical Details
Message-ID: <1992Oct14.165717.59716@cc.usu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
References: <1061@cybaswan.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!caen!hellgate.utah.edu!cc.usu.edu!sl8nl
From: sl8nl@cc.usu.edu
Newsgroups: rec.games.programmer
Subject: Re: getting the palette from a PCX file
Message-ID: <1992Oct14.165717.59716@cc.usu.edu>
Date: 14 Oct 92 16:57:17 MDT
References: <1061@cybaswan.UUCP>
Organization: Utah State University
Lines: 9