Page 1 of 1

C help

Posted: Wed Oct 16, 2002 7:46 pm
by beyondsociety
I want to change the color of the background and I can't figure out how to.

I know this sounds like a stupid question to ask, but we all have to start somewhere, don't we!

Re:C help

Posted: Wed Oct 16, 2002 8:00 pm
by PlayOS
What do you mean by background?

If you mean text mode then you just need to modify the attribute byte to be the color you desire. There are two parts to the attribute byte, the background and fore ground colors. Just set the background part to the color you desire. You can find info on the attribute in threads on this forum.

If you mean in graphics mode then you need to set every pixel to the background color and then draw on top of it.

Hope this helps.

Re:C help

Posted: Wed Oct 16, 2002 8:08 pm
by beyondsociety
I figured it out. I wanted to color the whole background a certain color.

To change the background color, you use [textbackground(color)]

Re:C help

Posted: Thu Oct 17, 2002 1:05 am
by Pype.Clicker
an alternative is to use VGA palette ports (3C9 or somewhere around) and directly send your RGB values to make color 0 to be no more black but the wanted colour ....