🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #114

How do I iterate through Physical Screen Colors?

#114
From: sivasailam thiagarajan
Date: Mon, 02 Nov 1992 15:14
32 lines
1858 bytes
First of all, a hearty CHEER to IBM for (finally!) including the
Palette Manager in the new ET4000 SVGA drivers! At long last, we'll be
able to do real grayscales and other such graphics.

Now that we have a working Palette Manager, we need a utility program
that'll display the physical colors that are currently available
onscreen. That is, I want to write a PM program that will draw filled
rectangles showing all the physical screen colors currently available.
(If you've seen COLORS.EXE for Windows, I want to do a PM version). My
problem is, the only way I know to select colors is by doing
GpiSetColor (hps, CLR_FOO), where CLR_FOO is a constant denoting an
"abstract" color (e.g., CLR_RED). But how do I simply iterate through
the physical colors from #0 to #255?

To make my question more concrete, run the following QBASIC program
fullscreen:

screen 13
for j = 0 to 255
  line (j * 320/256,0)-((j+1)*320/256,200),j,BF
next j

Now, how do I get this same sort of effect in PM? I have everything
working except I don't know how to iterate through the physical
colors. In other words, how do I port the ",j," part in the above
program to PM?

Thanks a million for any help. I'll make the utility (and full source)
public domain as soon as it's done.

Raja Thiagarajan
(sthiagar@bronze.ucs.indiana.edu)
Technical Details
Message-ID: <Bx3H05.L0s@usenet.ucs.indiana.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!sthiagar

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!sthiagar
From: sthiagar@bronze.ucs.indiana.edu (sivasailam thiagarajan)
Subject: How do I iterate through Physical Screen Colors?
Message-ID: <Bx3H05.L0s@usenet.ucs.indiana.edu>
Sender: news@usenet.ucs.indiana.edu (USENET News System)
Nntp-Posting-Host: bronze.ucs.indiana.edu
Organization: Indiana University
Distribution: na
Date: Mon, 2 Nov 1992 15:14:29 GMT
Lines: 32