Click to See Complete Forum and Search --> : RGB in QBasic?
filburt1
Jul 30th, 2001, 04:37 PM
Use the QB color constants. I think red is 11 or 4 or 2 or something. :) Look in the help.
hypnos
Jul 30th, 2001, 05:17 PM
Ah I see, a little disappointing though. There are only 16 colours :D
Sastraxi
Jul 31st, 2001, 08:56 AM
I believe screen 9 gives you 320x240x8, so you have 256 colours to work with, you just must add in all of the dcolours yourself (make the pallette at the start of the program.)
Also, with unofficial QB DLLs, you can access any mode that windows can (I had my QB program going at 1024x768x32!!)
hypnos
Jul 31st, 2001, 01:22 PM
Thanks, I'm gonna' have to get me one of those DLLs :D
abdul
Aug 4th, 2001, 10:05 PM
You can try any numbers - I think:p
eXterminator
Oct 18th, 2001, 06:35 AM
I use the 13th screen mode for my games, it is 320x200 and has 256 colors. I use PixelPlus to make the graphics.
eXterminator
Oct 18th, 2001, 06:38 AM
With PixelPlus you just PUT the images on the screen, but if you still want to PSET images, just use PSET (x,y), color, where color is 0-255, depending on what color you want...
But PSET is so slow...
FRAIL_KNIGHT
Dec 4th, 2001, 08:36 AM
Try the palette statement, which should get you 256 colors to chose from. Then set the pset's color to the palette color's variable. I think its something like this. I used to make screen fading effects with it.
Palette 1, Blue, Green, Red
I remember there being numbers in the statement though, like...
Palette 1, Blue, Green*256, Red*256^65536
(Not exact form, but something like this)
Then you change the Red, Green, and Blue variables from 0 to 255 to get different colors.
Try the QB Help file by pressing F1, and search for palette. They might have an example.
:D
sTyLeZ
Dec 23rd, 2001, 06:52 AM
If you are changing the palette a lot, you'll want to use OUT to avoid slowdown:
OUT &H3C8, colorAttribute 'the palette number to change
OUT &H3C9, redIntensity '0 to 63
OUT &H3C9, greenIntensity '0 to 63
OUT &H3C9, blueIntensity '0 to 63
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.