Graphics in Qbasic or Qui

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. SCREEN 13 FOR x = 1 TO 63 PALETTE x, x * 65536 'Blue Shades PALETTE x + 63, x + x * 256 + x * 65536 'White Shades PALETTE x + 127, x 'Red Shades PALETTE x + 190, x * 257 'Yellow Shades PALETTE 255, 50 * 256 + 10 COLOR x + 63 NEXT x 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. SCREEN 13 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 NEXT 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. Necrocixelsyd
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET