<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Is there any convenient way fadeout screen to darkness? - Comments</title>
 <link>http://www.newlc.com/topic-13</link>
 <description>Comments for &quot;Is there any convenient way fadeout screen to darkness?&quot;</description>
 <language>en</language>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13#comment-3005</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;65536colors is 16bits. And in 4096 colors mode already 16bits/pixel are used. So only the content of your palette will have to be changed.&lt;/div&gt;</description>
 <pubDate>Fri, 09 May 2003 12:37:20 +0200</pubDate>
 <dc:creator>nanard</dc:creator>
 <guid isPermaLink="false">comment 3005 at http://www.newlc.com</guid>
</item>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13#comment-3004</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;what does you mean?&lt;/div&gt;</description>
 <pubDate>Fri, 25 Apr 2003 08:10:07 +0200</pubDate>
 <dc:creator>ouseka</dc:creator>
 <guid isPermaLink="false">comment 3004 at http://www.newlc.com</guid>
</item>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13#comment-3003</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;well in fact only your palette will change ...&lt;/div&gt;</description>
 <pubDate>Thu, 24 Apr 2003 17:01:51 +0200</pubDate>
 <dc:creator>nanard</dc:creator>
 <guid isPermaLink="false">comment 3003 at http://www.newlc.com</guid>
</item>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13#comment-3002</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi!&lt;br /&gt;&lt;br /&gt;All my game bitmaps are in 8 bit format (e.g. TUint8*). Each value (0-255) is mapped to a 12 bit rgb-value.&lt;br /&gt;In the final output pass I am using an output table to do the conversion.&lt;br /&gt;Look at this:&lt;br /&gt;&lt;br /&gt;TUint8* myGameBitmap; // 8 bit game colors&lt;br /&gt;TUint16 myPalette[256]; // 12 bit palette in here&lt;br /&gt;TUint16* outputBitmap = out-&amp;gt;DataAddress(); // CFbsBitmap (12 bit)&lt;br /&gt;&lt;br /&gt;for (int i=0; i&amp;lt;176*208; i++) {&lt;br /&gt;&amp;nbsp; outputBitmap[i] = myPalette[myGameBitmap[i]];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;So all colors can be changed by manipulating the myPalette array, and it&#039;s fast too because we save a lot of memory bandwidth in the sprite blitting routines, etc.&lt;br /&gt;&lt;br /&gt;The downside with this is that by using a custom data format, all blitting routines have to be written by yourself. It took several days to create conversion tools that create a master palette out of several bitmaps etc.&lt;br /&gt;&lt;br /&gt;One downside is that some newer devices (Siemens SX-1?) support 64k colors and probably are using another data format. So I will have to choose different copying routines, depending on the device.&lt;br /&gt;&lt;br /&gt;Did this make it clearer?&lt;br /&gt;&lt;br /&gt;zeep&lt;/div&gt;</description>
 <pubDate>Wed, 09 Apr 2003 07:32:43 +0200</pubDate>
 <dc:creator>zeep</dc:creator>
 <guid isPermaLink="false">comment 3002 at http://www.newlc.com</guid>
</item>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13#comment-3001</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: zeep&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;...&lt;br /&gt;&lt;br /&gt;In my project I am using &amp;quot;virtual paletted&amp;quot; 8 bit bitmaps which are converted to 12 bit in the final copy-to-screen pass using a look-up table. There you can just change the palette table to fade in/out.&lt;br /&gt;&lt;br /&gt;...&lt;/div&gt;&lt;br /&gt;Thanx for your help, but I can&#039;t understand your concept &amp;quot;virtual paletted&amp;quot;.&lt;br /&gt;I only know code like below:&lt;br /&gt;&lt;br /&gt;const TInt8 alpha = 0x7; &amp;nbsp;// 0x0 - 0xf&lt;br /&gt;TUint32* ptr = aFbsBitmap-&amp;gt;DataAddress();&lt;br /&gt;TInt w = aFbsBitmap-&amp;gt;SizeInPixels().iWidth;&lt;br /&gt;TInt h = aFbsBitmap-&amp;gt;SizeInPixels().iHeight;&lt;br /&gt;for (TInt i=0; i&amp;lt;w*h; i++) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; TInt8 r_4bits = (ptr[i] &amp;gt;&amp;gt; &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/cool.gif&quot; alt=&quot;Cool&quot; border=&quot;0&quot; /&gt; &amp; 0xf;&lt;br /&gt;&amp;nbsp; &amp;nbsp; TInt8 g_4bits = (ptr[i] &amp;gt;&amp;gt; 4) &amp; 0xf;&lt;br /&gt;&amp;nbsp; &amp;nbsp; TInt8 b_4bits = (ptr[i] &amp;gt;&amp;gt; 0) &amp; 0xf;&lt;br /&gt;&amp;nbsp; &amp;nbsp; ptr[i] = ((r_4bits * alpha / 0xf) &amp;lt;&amp;lt; &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/cool.gif&quot; alt=&quot;Cool&quot; border=&quot;0&quot; /&gt; | ((g_4bits * alpha / 0xf) &amp;lt;&amp;lt; 4) | (b_4bits * alpha / 0xf);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;But this runs very slowly &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/sad.gif&quot; alt=&quot;Sad&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;Can you explain your &amp;quot;virtual palette&amp;quot;? tnx very much!&lt;br /&gt;&lt;br /&gt;BR, ouseka&lt;/div&gt;</description>
 <pubDate>Wed, 09 Apr 2003 03:46:55 +0200</pubDate>
 <dc:creator>ouseka</dc:creator>
 <guid isPermaLink="false">comment 3001 at http://www.newlc.com</guid>
</item>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13#comment-3000</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Get the bitmap data you want to fade out directly using the CFbsBitmap-&amp;gt;DataAddress method.&lt;br /&gt;In 12 bit Series 60 devices high-color bitmap have a 444-Pixel format. The first 4 bits are just 0.&lt;br /&gt;&lt;br /&gt;It should be quite easy to scale these pixel values down to 0. There&#039;s just some bit-masking magic involved &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/smiley.gif&quot; alt=&quot;Smiley&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;br /&gt;In my project I am using &amp;quot;virtual paletted&amp;quot; 8 bit bitmaps which are converted to 12 bit in the final copy-to-screen pass using a look-up table. There you can just change the palette table to fade in/out.&lt;br /&gt;&lt;br /&gt;I would not call that a convenient way but it seems that there is no other to do this...&lt;/div&gt;</description>
 <pubDate>Tue, 08 Apr 2003 19:31:53 +0200</pubDate>
 <dc:creator>zeep</dc:creator>
 <guid isPermaLink="false">comment 3000 at http://www.newlc.com</guid>
</item>
<item>
 <title>Is there any convenient way fadeout screen to darkness?</title>
 <link>http://www.newlc.com/topic-13</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/topic-13&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/topic-13#comments</comments>
 <category domain="http://www.newlc.com/forums/2d-3d-graphics">Bitmaps and Graphics</category>
 <pubDate>Tue, 01 Apr 2003 03:08:25 +0200</pubDate>
 <dc:creator>ouseka</dc:creator>
 <guid isPermaLink="false">1123 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
