Mail Archives: djgpp/1999/04/08/12:16:59
> 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 -