delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/08/12:16:59

Date: Thu, 8 Apr 1999 12:17:00 -0400
Message-Id: <199904081617.MAA13420@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <GHFKBOAAANNJCAAA@mailcity.com> (rithe@mailcity.com)
Subject: Re: text background
References: <GHFKBOAAANNJCAAA AT mailcity DOT com>
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Does the intensevideo() work with textbackground()?

intensevideo() reprograms the video card; nothing else.  It should
immediately change all cells on the screen to the new meaning.

> I tried it with no results.

Were any of the characters blinking before?

> I understand all but the (BLUE<<4)|LIGHTCYAN part.  I know that it
> is for the colors, but how does that work?

Each cell on the screen is a 16-bit value.  Eight bits are the
glyph, and eight are the colors.  The colors are four bits each,
like this:

	FG FG FG FG BL BG BG BG CH CH CH CH CH CH CH CH

FG=foreground
BL=blink (part of BG if intensevideo())
BG=background
CH=character

The ScreenPutChar() function takes the character and "attribute"
(colors) separately, and merges them together when it puts them on the
screen.

You might have forgotten the #include <conio.h> line, where the colors
are #defined to the corresponding bit patterns.

> One last question, when I did try the ScreenPutChar(), it gave me a
> warning "implicit declaration of function 'int ScreenPutChar(...).'"

You need #include <pc.h>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019