<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>screen tinting</title>
		<link>http://www.allegro.cc/forums/view/572247</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 13 Mar 2006 08:05:21 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You know how in some games the contrast of the screen decreases to give the atmosphere of twilight or darkness, and in some it tints it a certain colour? I would like to know how this could be achieved with allegro. I&#39;ve seen it done before in Fenix Blade and I want to encorporate the effect into my games.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (The Master)</author>
		<pubDate>Sat, 11 Mar 2006 17:33:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The easiest way to do this is by using 8 bit graphics and palettes. Simply shade the palette to change the overal tint.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 11 Mar 2006 18:58:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Some tricks I&#39;ve seen consisted in tint the screen to a dark blue / purple tone and then reduce saturation.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Pedro Avelar Gontijo)</author>
		<pubDate>Sat, 11 Mar 2006 19:11:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>if you use Openlayer and allegroGl you will have hardware accelleration and also there is a tintscreen function that you can just pass an rgba color to which will tint the screen for you. if you do a search there are alot of threads out there with how to install these extra packages.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Padraic Hennessy)</author>
		<pubDate>Sat, 11 Mar 2006 19:53:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>As Evert said, the easiest way to do this (if you&#39;re not using AllegroGL) is to use 8-bit palletts. I can give you an excellent example for this. I find this to be the most efficent way to do things, to be honest with you; Not to mention you get really neat, high-end-looking effects with 8-bit <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Synapse Jumps)</author>
		<pubDate>Sat, 11 Mar 2006 21:41:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>FBlend all the way (assuming a simple full screen wash is all you want). Bob is god <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Except in the fade functions where he doesn&#39;t take into account magic pink.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 12 Mar 2006 04:32:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I found FBlend ok.<br />Has anyone had any issues with installing it tho? cuz it&#39;s asking for obj files that aren&#39;t there. Does anyone have a precompiled one for msvc?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (The Master)</author>
		<pubDate>Sun, 12 Mar 2006 06:38:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>when was FBlend last updated ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Sun, 12 Mar 2006 14:39:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Bob made an update a couple of years ago, just shows it&#39;s stable <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>He said a while ago he might fix the magic pink problem with the fade routine.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Does anyone have a precompiled one for msvc?
</p></div></div><p><a href="http://retrospec.sgn.net/allegro.php">http://retrospec.sgn.net/allegro.php</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 12 Mar 2006 15:14:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;d say do it to a double buffer.  Basically you&#39;d draw to your buffer like regular, and then draw a transparent box on top of it.</p><p>So, first you would draw everything to your bitmap named buffer.  Once thats done you&#39;d draw your rectangle onto the buffer.</p><p>Heres some code to do that:</p><div class="source-code snippet"><div class="inner"><pre>    <span class="k1">int</span> col <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>

    <a href="http://www.allegro.cc/manual/set_trans_blender" target="_blank"><span class="a">set_trans_blender</span></a><span class="k2">(</span>col, col, col, <span class="k1">int</span><span class="k2">(</span>step <span class="k3">*</span> <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>

    <a href="http://www.allegro.cc/manual/drawing_mode" target="_blank"><span class="a">drawing_mode</span></a><span class="k2">(</span>DRAW_MODE_TRANS, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
    <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span>buffer, x, y, x <span class="k3">+</span> w, y <span class="k3">+</span> h, <a href="http://www.allegro.cc/manual/makeacol32" target="_blank"><span class="a">makeacol32</span></a><span class="k2">(</span>col, col, col, <span class="k1">int</span><span class="k2">(</span>step <span class="k3">*</span> <span class="n">255</span><span class="k2">)</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
    <a href="http://www.allegro.cc/manual/drawing_mode" target="_blank"><span class="a">drawing_mode</span></a><span class="k2">(</span>DRAW_MODE_SOLID, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>The pasted code will work in 32 bpp.  if step is 1.0 the screen is totaly black, if step is 0 the screen is normal.</p><p>Now blit the buffer to the screen like you would normally.</p><p>To fade to white instead of black, do<span class="source-code"><span class="k1">int</span> col <span class="k3">=</span> <span class="n">255</span><span class="k2">;</span></span></p><p>Beware of speed issues.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ImLeftFooted)</author>
		<pubDate>Mon, 13 Mar 2006 08:05:21 +0000</pubDate>
	</item>
</rss>
