Mail Archives: djgpp/1997/09/03/05:52:22
"Michael McPheat" (mikem AT jiwa DOT com DOT au) writes:
> Does the textmode function work?
>
> I am wanting to use textmode(-1) to use transparent text but when I set
> textmode() to any value I get a protection violation and subsequent program
> termination. I am using the 320x200 VGA mode but the other modes produce
> the same problem. Am I supposed to set something up before using the
> textmode() function? I am not using any special palettes or fonts.
> Everything is just plain vanilla.
This may seem stupid, or even insulting, but... have you set up a graphics
mode? If you're in the text mode, having not called a set_gfx_mode yet,
then you deserve what you get :-) Also, how are you calling set_gfx_mode
and textmode? Make sure they aren't winding up in the opposite order from
what you expected. (This can happen with lines like
some_func(another_func(),a_third_func());
in which you can't be sure, as the standard doesn't say (C or C++), what
order another_func and a_third_func will be called in. It can also happen
with constructors in C++. I doubt you can guarantee the order in which
the constructors of my_class and my_other_class are called in this:
void foofunc (void) {
my_class my_obj;
my_other_class my_other_obj;
...
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -