Message-Id: <199710290727.UAA17119@fep1-orange.clear.net.nz> From: "Jamie Love" To: Subject: Re: Newbie allegro graphics question Date: Wed, 29 Oct 1997 08:57:13 +1300 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Precedence: bulk ---------- > From: Mark Phillips > To: djgpp AT delorie DOT com > Subject: Newbie allegro graphics question > Date: Tuesday, October 28, 1997 11:47 > > 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 > To do this you must convert the integer to a string first like so: #include (at the start of your file) and use the itoa (ie, integer to to ascii) function like so: itoa( my_int, dummy_string, base_conversion); where my_int is the int you want change, dummy_string is a character buffer long enought to hold the converted integer and base_conversion is the base number you want the integer to convert by (ie, base ten, base 2 etc, use base ten for normal numbers). then call the textout function with the dummy_string. textout(screen, font, dummy_string, x, y, colour); J Love