Mail Archives: djgpp/1997/05/06/10:36:43
From: | Shawn Hargreaves <shawn AT talula DOT demon DOT co DOT uk>
|
To: | djgpp AT delorie DOT com
|
MMDF-Warning: | Parse error in original version of preceding line at punt-2.mail.demon.net
|
Subject: | Re: allegro: textout_centre() / gfx_mode_select()
|
Date: | Tue, 6 May 1997 09:31:00 +0100
|
MIME-Version: | 1.0
|
Message-ID: | <862922028.094987.0@[194.129.18.166]>
|
KaRNaGE writes:
> for some reason at runtime, when gfx_mode_select() is prompting the user
> to pick a video mode, and i use the mouse to select
it....textout_centre()
> and textout() the textcolor / textbackground color are both the same
> (therefore the text is unreadable)....if use the keyboard to select the
Would this by any chance be in a mode-X resolution?
If so, you are either using an old version of Allegro, which had a bug with
solid text backgrounds in mode-X (upgrade to v2.2), or you are using a
customised proportional font (just yesterday I found a bug with regard to
solid text backgrounds with proportional fonts in mode-X :-) If this is
the case, edit modex.c and in the _x_draw_character() function, replace:
for (c1=0; c1<sprite->h; c1++)
for (c2=0; c2<sprite->w; c2++)
if (sprite->line[c1][c2])
if (sprite->line[c1][c2])
x_write(bmp, x+c2, y+c1, color);
else
if (_textmode >= 0)
x_write(bmp, x+c2, y+c1, _textmode);
with:
for (c1=0; c1<sprite->h; c1++)
for (c2=0; c2<sprite->w; c2++)
if (sprite->line[c1][c2])
x_write(bmp, x+c2, y+c1, color);
else
if (_textmode >= 0)
x_write(bmp, x+c2, y+c1, _textmode);
If that isn't it, I'm baffled: try to isolate a fragment of code that
demonstrates the trouble and I'll see what I can do...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk
"Beauty is a French phonetic corruption of a short cloth neck ornament"
- Raw text -