RE: [AD] Font loadin: Feature Request |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Erik Heemskerk writes:
> inline FONT *load_font(const char *file, const char *fnt)
> {
> if (!file || !fnt) return NULL;
> DATAFILE *dat = load_datafile_object(file, fnt);
>
> if (!dat) return NULL;
> FONT *font = (FONT *)dat->dat;
>
> unload_datafile_object(dat);
Noooo! The datafile object contains the font: after unloading it,
your font is no longer in memory. The unload call is equivalent
to destroy_font().
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |