C help

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
beyondsociety

C help

Post 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!
PlayOS

Re:C help

Post 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.
beyondsociety

Re:C help

Post 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)]
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:C help

Post 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 ....
Post Reply