delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/04/06:21:32

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE30136624E@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Allegro and Fonts
Date: Tue, 4 May 1999 11:21:30 +0100
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

CrashLogix writes:
> set_color_depth(24);
> set_gfx_mode(GFX_AUTODETECT,800,600,0,0);

You should always check for an error here: set_gfx_mode() might fail, 
and bad things (crashes) will happen if you just carry on regardless.

> test_dat = load_datafile("test.dat");
> if (test_dat != NULL)
> {
>  textout_centre(screen,test_dat[TEST].dat,"abcd",400,300,96);

Is it actually returning a NULL test_dat? If so, I'd guess that your
test.dat file isn't actually located in the current directory, or
perhaps that you put a password on it when you saved it out from
the grabber. If this load is working, the only thing I can think
is that your TEST object is in fact some other type than a FONT:
maybe you imported the PCX file as a bitmap or something by mistake?


	Shawn Hargreaves.

- Raw text -


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