<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Which type of output is faster</title>
		<link>http://www.allegro.cc/forums/view/563790</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 10 Feb 2006 15:11:28 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hey Guys,</p><p>Which version of text output do you think is faster?</p><p>textprintf?</p><p>or </p><p>textout?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kevin Epps)</author>
		<pubDate>Fri, 03 Feb 2006 21:31:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Isn&#39;t textout using textprintf ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Fri, 03 Feb 2006 21:49:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Assuming it doesn&#39;t... textout, for obvious reasons.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (X-G)</author>
		<pubDate>Fri, 03 Feb 2006 21:57:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Isn&#39;t textout using textprintf ?
</p></div></div><p>
Wouldn&#39;t make sense to me. textprintf formatting the text and then using textout would be much more plausible.</p><p>EDIT: I just decided to take a look at the source to find out <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />EDIT2: I was right, textprintf_ex calls textout_ex.
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> <a href="http://www.allegro.cc/manual/textprintf_ex" target="_blank"><span class="a">textprintf_ex</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>bmp, AL_CONST <a href="http://www.allegro.cc/manual/FONT" target="_blank"><span class="a">FONT</span></a> <span class="k3">*</span>f, <span class="k1">int</span> x, <span class="k1">int</span> y, <span class="k1">int</span> color, <span class="k1">int</span> bg, AL_CONST <span class="k1">char</span> <span class="k3">*</span>format, ...<span class="k2">)</span>
<span class="k2">{</span>
   <span class="k1">char</span> buf<span class="k2">[</span><span class="n">512</span><span class="k2">]</span><span class="k2">;</span>
   va_list ap<span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/ASSERT" target="_blank"><span class="a">ASSERT</span></a><span class="k2">(</span>bmp<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/ASSERT" target="_blank"><span class="a">ASSERT</span></a><span class="k2">(</span>f<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/ASSERT" target="_blank"><span class="a">ASSERT</span></a><span class="k2">(</span>format<span class="k2">)</span><span class="k2">;</span>

   va_start<span class="k2">(</span>ap, format<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/uvszprintf" target="_blank"><span class="a">uvszprintf</span></a><span class="k2">(</span>buf, <span class="k1">sizeof</span><span class="k2">(</span>buf<span class="k2">)</span>, format, ap<span class="k2">)</span><span class="k2">;</span>
   va_end<span class="k2">(</span>ap<span class="k2">)</span><span class="k2">;</span>

   <a href="http://www.allegro.cc/manual/textout_ex" target="_blank"><span class="a">textout_ex</span></a><span class="k2">(</span>bmp, f, buf, x, y, color, bg<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Lenman)</author>
		<pubDate>Fri, 03 Feb 2006 22:11:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, great. </p><p>I&#39;ll use textout then. </p><p>Thanks!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kevin Epps)</author>
		<pubDate>Fri, 03 Feb 2006 22:34:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>General rule of thumb: Use textprintf when you need the formatting, textout when you don&#39;t.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 10 Feb 2006 15:11:28 +0000</pubDate>
	</item>
</rss>
