Mail Archives: djgpp/1997/02/27/16:37:31
>I think, I was to lazy to write (unsigned char*) before "HELLO" in
>
> textout(screen,font,(unsigned char*) "HELLO",20,10,1)
I don't think you should have to write that! This will teach me to test
things more thouroughly: after I changed the type to unsigned, I forgot
to make sure it worked in C++ (there's no problem with the type difference
in C).
There's an easy fix, though. In allegro.h, just after the definition of
destroy_font() (line 918), insert the lines:
<-- snip -->
#ifdef __cplusplus
} /* end of extern "C" */
__INLINE__ void textout(BITMAP *bmp, FONT *f, char *str, int x, int y, int color)
{
textout(bmp, f, (unsigned char *)str, x, y, color);
}
__INLINE__ void textout_centre(BITMAP *bmp, FONT *f, char *str, int x, int y, int color)
{
textout_centre(bmp, f, (unsigned char *)str, x, y, color);
}
__INLINE__ int text_length(FONT *f, char *str)
{
return text_length(f, (unsigned char *)str);
}
extern "C" {
#endif /* ifdef __cplusplus */
<-- snip -->
I can't think of any problems that thich could cause. I'll upload a
patched 2.2 tomorrow...
/*
* 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 -