<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>masked_blit problem</title>
		<link>http://www.allegro.cc/forums/view/586351</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 08 Jul 2006 09:25:27 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, I have started up a simple pong clone for something to do, and I&#39;m attempting to blit the title using masked blit.</p><div class="source-code snippet"><div class="inner"><pre>media <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_datafile" target="_blank"><span class="a">load_datafile</span></a><span class="k2">(</span><span class="s">"media.dat"</span><span class="k2">)</span><span class="k2">;</span>
 
<a href="http://www.allegro.cc/manual/masked_blit" target="_blank"><span class="a">masked_blit</span></a><span class="k2">(</span>media<span class="k2">[</span>TITLE<span class="k2">]</span>.dat, <a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <span class="n">0</span>, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/SCREEN_W" target="_blank"><span class="a">SCREEN_W</span></a><span class="k3">/</span><span class="n">2</span> <span class="k3">-</span> <span class="n">147</span>, <span class="n">25</span>, <span class="n">294</span>, <span class="n">54</span><span class="k2">)</span><span class="k2">;</span>
<span class="c">//TITLE is equal to 1, the number inside the dat file</span>
</pre></div></div><p>
The problem with this, is the pink is still showing.  I&#39;m not sure if I&#39;m making a deadly obvious mistake, or there&#39;s something else wrong.  I&#39;ve tried changing the color depth from 8 to 16, 24, and 32 and they all just distort it and change it to bright silver like colors.  Has anyone ever had a problem like this?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paladin)</author>
		<pubDate>Sat, 08 Jul 2006 09:11:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>1. Make sure the datafile was loaded <u>after</u> set_gfx_mode<br />2. Make sure the colordepth was set <u>before</u> set_gfx_mode<br />3. Try calling <span class="source-code"><a href="http://www.allegro.cc/manual/set_color_conversion" target="_blank"><span class="a">set_color_conversion</span></a></span> before you load the datafile (look at the COLORCONV_KEEP_TRANS option).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 08 Jul 2006 09:15:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I called set_color_depth(32) before I set the gfx mode and that did the trick.  I thought you didn&#39;t have to set the color depth at all though.  <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paladin)</author>
		<pubDate>Sat, 08 Jul 2006 09:24:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you never set the color depth before set_gfx_mode allegro chooses 8bit. Always.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 08 Jul 2006 09:25:27 +0000</pubDate>
	</item>
</rss>
