BBS: The MOONFLOWER
Date: - - (11:54) Number: 64
From: NECROCIXELSYD #20 @2523 Refer#: NONE
To: Recvd: YES
Subj: Graphics in Qbasic or Qui Conf: (104) The Progra
To do graphics(VGA) in quickbasic, you need to first specify screen 13. which
puts you in 320*200*256 color mode. Then you need to adjust the palette sicne
the colors that it gives you are pretty crappy. All you get are some garbage
colors then about 20 shades of gray. Here's some code.
FOR x = 1 TO 63
PALETTE x, x * 65536
PALETTE x + 63, x + x * 256 + x * 65536
PALETTE x + 127, x
PALETTE x + 190, x * 257
PALETTE 255, 50 * 256 + 10
COLOR x + 63
That should give you good shades of grey, red, yellow, and blue all the RGB
colors are hard to get, so this is how you get those.
Red = 1
Green = 1
Blue = 1
FOR PaletteRange = 1 TO 50
Red = PaletteRange
Green = PaletteRange
Blue = PaletteRange
ToColor = 65536 * Blue + 255 * Green + Red
PALETTE PaletteRange, ToColor
Okay, that should give you all of them, just rem out the "Green =
PaletteRange" statements to get rid of that shade.
Both those examples will not work together, well, they may, but it will
be a pretty nasty sight.