Re: [AD] Destroying fonts |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
In reply to Michael Bukin (Michael Bukin <M.A.Bukin@xxxxxxxxxx>): >Applied it too. And one more? Sorry :-) but there was an oversight - the font destruction routine will generally need to know how many glyphs there are.
diff -ru d:/allegro/include/allegro.h c:/home/cvs/allegro/include/allegro.h --- d:/allegro/include/allegro.h Tue Aug 29 01:19:38 2000 +++ c:/home/cvs/allegro/include/allegro.h Sun Aug 27 02:21:08 2000 @@ -1319,7 +1319,7 @@ AL_METHOD(void, renderhook, (BITMAP *bmp, void *glyphs, int ch, int x, int y, int color)); AL_METHOD(int, widthhook, (void *glyphs, int ch)); AL_METHOD(int, heighthook, (void *glyphs)); - AL_METHOD(void, destroyhook, (void *glyphs, int start, int end)); + AL_METHOD(void, destroyhook, (void *glyphs)); } FONT; diff -ru d:/allegro/src/text.c c:/home/cvs/allegro/src/text.c --- d:/allegro/src/text.c Tue Aug 29 01:19:12 2000 +++ c:/home/cvs/allegro/src/text.c Sun Aug 27 02:21:30 2000 @@ -354,7 +354,7 @@ while (f) { if (f->glyphs) { if(f->destroyhook) - f->destroyhook(f->glyphs, f->start, f->end); + f->destroyhook(f->glyphs); else { for (c=0; c<=f->end-f->start; c++) { if (f->glyphs[c]) {
Question: in the font structure, why do the hooks take the `glyphs' variable as type `void*', when it is in fact `void**'? Just wondering because I was writing some hooks of my own... Bye for now, -- Laurence Withers, lwithers@xxxxxxxxxx http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |