Use the QB color constants. I think red is 11 or 4 or 2 or something. :) Look in the help.
Printable View
Use the QB color constants. I think red is 11 or 4 or 2 or something. :) Look in the help.
Ah I see, a little disappointing though. There are only 16 colours :D
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!!)
Thanks, I'm gonna' have to get me one of those DLLs :D
You can try any numbers - I think:p
I use the 13th screen mode for my games, it is 320x200 and has 256 colors. I use PixelPlus to make the graphics.
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...
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
If you are changing the palette a lot, you'll want to use OUT to avoid slowdown:
Code: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