www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/31/07:18:01

Message-ID: <37CB4E6F.525C@ns.sympatico.ca>
From: Klaas <klaas1 AT ns DOT sympatico DOT ca>
X-Mailer: Mozilla 3.04 (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ASCII values in ALLEGRO
References: <37CAAFE5 DOT F6DFBD5 AT swipnet DOT se>
Lines: 30
Date: Tue, 31 Aug 1999 03:39:23 GMT
NNTP-Posting-Host: 142.177.71.11
X-Complaints-To: abuse AT ns DOT sympatico DOT ca
X-Trace: sapphire.mtt.net 936070763 142.177.71.11 (Tue, 31 Aug 1999 00:39:23 ADT)
NNTP-Posting-Date: Tue, 31 Aug 1999 00:39:23 ADT
Organization: Sympatico-Subscriber
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Erik Ellingsson wrote:
> 
> Hello!
> 
> We are two swedish boys, we are currently working with a project using
> DJGPP and ALLEGRO. Because -we are swedish we want to use ASCII
> characters in the function textout( ); The characters are between the
> value 128-255. Is this possible using ALLEGRO? and if it is possible
> how are we going to do this? Do we have to alter the keyboard
> settings/file or something like that?

1. Set your font to include whatever characters you need.
2. Use chars in the string to display those characters.

For example:
Say I created a font with "ò" in ANSI (not ASCII) #149.

To display this in Allegro:

textprintf(mybmp,myfont,myx,myy,mycolor,"oo%coo",149); /* this will
display "ooòoo" */

OR

sprintf(mystr,"oo%coo",149);
textout(mybmp,myfont,mystr,myx,myy,mycolor);

*note: I'm not sure as to the exact argument order.

-Mike

- Raw text -


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