From: Barry Rodewald Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie allegro graphics question Date: Tue, 28 Oct 1997 13:51:12 +1300 Lines: 22 Message-ID: <345536FF.1A58@hn.pl.net> References: <6335en$1ed$1 AT postern DOT mbnet DOT mb DOT ca> NNTP-Posting-Host: bsr.hn.planet.gen.nz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Mark Phillips wrote: > > If I am in graphics mode (any one) and I want to write an integer to > the screen, how do I do it? thanks in advance, > > mark phillips First, try to create a string containing the integer. You can use sprintf. eg: sprintf(string,"%i",integer); Next, use Allegro's textout function to write the string to a bitmap. eg: textout(screen, font, string, x, y, colour); Note that there is a variable called screen and one called font. screen refers to the actual screen, and font refers to the default font. You can replace screen with any bitmap in case you are using a double buffering technique for graphics, that is write all the graphics for one frame onto a memory bitmap then blit (copy) it in one go to the screen. x and y are the location of the bitmap/screen to write to. Hope that this clears it up, Barry Rodewald.