delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/03/05:52:22

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro - textmode() help
Date: 29 Aug 1997 08:52:02 GMT
Organization: The National Capital FreeNet
Lines: 33
Message-ID: <5u62ji$9kn@freenet-news.carleton.ca>
References: <01bcb423$03ef4a00$5905a8c0 AT grunt>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"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 -


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