<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>DirectX VRAM-VRAM accelerated stretch blit</title>
		<link>http://www.allegro.cc/forums/view/558465</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 07 Feb 2006 20:35:31 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The most useful feature i want from Allegro is VRAM to VRAM accelerated stretch blit.  I dont think the current DirectX driver has this feature as its using dx3.</p><p>What versions of DirectX contain this feature ?<br />When would allegro get this DirectX version ?</p><p>if this is not likely to occur any time soon, does anyone know of other allegro-like libs that can do it ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Mon, 09 Jan 2006 15:41:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
When would allegro get this DirectX version ?
</p></div></div><p>when someone implements it.</p><p>I personally think there is little point in improving current drivers. The main energy should go into developing a decent OpenGL driver. With that it would be possible to accelerate almost anything and it would be portable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Mon, 09 Jan 2006 15:45:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>As HoHo said, it&#39;ll be there when someone writes the code. I&#39;m sure you&#39;re aware of the number of active Windows developers we have right now, so if you care to implement it that would be welcome.</p><p>Regarding OpenGL to do this, it&#39;s possible that AllegroGL already implements this functionality. I don&#39;t know for sure that it does, but it would be possible for it to support it. If it doesn&#39;t, I&#39;m sure some help there is also appreciated.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Mon, 09 Jan 2006 16:00:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
AJ: If you use OpenLayer you can effectively do this already (and with blending, roatation, etc..)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Mon, 09 Jan 2006 16:25:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
What versions of DirectX contain this feature ?
</p></div></div><p>

No DirectDraw version has this, so upgrading Allegro&#39;s code to DirectDraw 7 would have no effect. The only way would be to replace the &quot;DirectDraw&quot; interface based driver by a &quot;Direct3D&quot; interface based one, which is the equivalent of OpenGL. Probably it would make most sense to use DX9. But it means, a complete driver rewrite is necessary. (Someone started such a driver once I think.. not sure what happened to it.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 09 Jan 2006 16:58:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The problem with DX9 is, we would lose &quot;ddraw.h&quot;, because the last directX version supporting standard 2D interfaces is DirectX8. DX9 is 3D interfaces only and that would require to emulate 2D through 3D interfaces. Another point for not using DX9 would be that there are a lot of video cards out there, who simply can not run DX9 games in hardware, so there would be a need for fallback drivers to DX8 and DX7 to support the most common video cards in use. (Otherwise those unsupported cards would use DX9 software interfaces, which would slow everything down and not utilize the acceleration potential of those cards.)</p><p>Sounds all nice and easy in theory. In practice that means a huge workload and i don&#39;t know if that&#39;s worth the trouble in the current Allegro version(which sources are horrible). Goes without saying that, if i knew HOW to do all of the above, i would long have started to implement it, but since i don&#39;t know anything about Direct3D and don&#39;t have the time to learn it, i have not.;D
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dennis)</author>
		<pubDate>Mon, 09 Jan 2006 19:11:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The problem with DX9 is, ...
</p></div></div><p>Or in other words, doing the same with OpenGL would be much simplier and would work cross-platform everywhere <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Mon, 09 Jan 2006 19:27:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
No DirectDraw version has this
</p></div></div><p>
With all due respect, every version of DirectDraw has this. It&#39;s the reason IDirectDrawSurface::Blt has a source RECT and a dest RECT. Microsoft aren&#39;t in the habit of keeping around old documentation, but I can still find IDirectDrawSurface5::Blt in MSDN and note particularly from the comments (emphasis added):
</p><div class="quote_container"><div class="title">MSDN said:</div><div class="quote"><p>
This method is capable of synchronous or asynchronous blits (the default behavior), either display memory to display memory, display memory to system memory, system memory to display memory, or system memory to system memory. The blits can be performed by using source color keys, and destination color keys. <b>Arbitrary stretching or shrinking will be performed if the source and destination rectangles are not the same size.</b>
</p></div></div><p>
I can&#39;t find an MSDN source for it, but I can assert that this method was not changed as DirectDraw advanced. The ability to scale is what differentiates Blt from BltFast. Of course DirectDraw is able to use either of its blit functions for the equivalent of Allegro _blit and _sprite functionality.</p><p>To implement an accelerated stretch on Windows should be as simple as duplicating the hardware non-scaled blitter, changing the (hopefully) BltFast to a Blt and independently building a destination rectangle. It should be a quick enough modification. Although I don&#39;t have a suitable build chain, I&#39;ll go glance at the source.</p><p>EDIT:</p><p>Having found the non-accelerated version (src/win/wddaccel.c, line 88 onwards), what is the purpose of this clause at line 139:
</p><div class="source-code snippet"><div class="inner"><pre>   <span class="k1">else</span> <span class="k2">{</span>
      <span class="c">/* have to use the original software version */</span>
      _orig_masked_blit<span class="k2">(</span>source, dest, source_x, source_y, dest_x, dest_y, width, height<span class="k2">)</span><span class="k2">;</span>
   <span class="k2">}</span>
<span class="k2">}</span>
</pre></div></div><p>

I cannot imagine that the Allegro developers think they have implemented a faster software blit than that provided by DirectDraw? Perhaps it is to mask Allegro&#39;s continuing deficiencies with locking and unlocking?</p><p>EDIT2:<br />The following code should do:
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">static</span> <span class="k1">void</span> ddraw_masked_stretch_blit<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> source, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height<span class="k2">)</span></td></tr><tr><td class="number">2</td><td><span class="k2">{</span></td></tr><tr><td class="number">3</td><td>   RECT dest_rect, source_rect<span class="k2">;</span></td></tr><tr><td class="number">4</td><td>   DDCOLORKEY src_key<span class="k2">;</span></td></tr><tr><td class="number">5</td><td>   HRESULT hr<span class="k2">;</span></td></tr><tr><td class="number">6</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest_parent<span class="k2">;</span></td></tr><tr><td class="number">7</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source_parent<span class="k2">;</span></td></tr><tr><td class="number">8</td><td>&#160;</td></tr><tr><td class="number">9</td><td>   dest_rect.left <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">10</td><td>   dest_rect.top <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">11</td><td>   dest_rect.right <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">12</td><td>   dest_rect.bottom <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">13</td><td>&#160;</td></tr><tr><td class="number">14</td><td>   source_rect.left <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">15</td><td>   source_rect.top <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">16</td><td>   source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">17</td><td>   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">18</td><td>&#160;</td></tr><tr><td class="number">19</td><td>   src_key.dwColorSpaceLowValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">20</td><td>   src_key.dwColorSpaceHighValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">21</td><td>&#160;</td></tr><tr><td class="number">22</td><td>   <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">23</td><td>&#160;</td></tr><tr><td class="number">24</td><td>      <span class="c">/* find parents */</span></td></tr><tr><td class="number">25</td><td>      dest_parent <span class="k3">=</span> dest<span class="k2">;</span></td></tr><tr><td class="number">26</td><td>      <span class="k1">while</span> <span class="k2">(</span>dest_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">27</td><td>         dest_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>dest_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">28</td><td>&#160;</td></tr><tr><td class="number">29</td><td>      source_parent <span class="k3">=</span> source<span class="k2">;</span></td></tr><tr><td class="number">30</td><td>      <span class="k1">while</span> <span class="k2">(</span>source_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">31</td><td>         source_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>source_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">32</td><td>&#160;</td></tr><tr><td class="number">33</td><td>      _enter_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>      gfx_directx_release_lock<span class="k2">(</span>dest<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">35</td><td>      gfx_directx_release_lock<span class="k2">(</span>source<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>      IDirectDrawSurface2_SetColorKey<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id,</td></tr><tr><td class="number">38</td><td>                                      DDCKEY_SRCBLT, <span class="k3">&amp;</span>src_key<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">39</td><td>&#160;</td></tr><tr><td class="number">40</td><td>      hr <span class="k3">=</span> IDirectDrawSurface2_Blt<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>dest_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>dest_rect,</td></tr><tr><td class="number">41</td><td>                                   DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>source_rect,</td></tr><tr><td class="number">42</td><td>                                   DDBLT_KEYSRC <span class="k3">|</span> DDBLT_WAIT, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">43</td><td>      _exit_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">44</td><td>&#160;</td></tr><tr><td class="number">45</td><td>      <span class="k1">if</span> <span class="k2">(</span>FAILED<span class="k2">(</span>hr<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">46</td><td>   _TRACE<span class="k2">(</span>PREFIX_E <span class="s">"Blt failed (%x)\n"</span>, hr<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">47</td><td>&#160;</td></tr><tr><td class="number">48</td><td>      <span class="c">/* only for windowed mode */</span></td></tr><tr><td class="number">49</td><td>      <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>gfx_driver-&gt;id <span class="k3">=</span><span class="k3">=</span> GFX_DIRECTX_WIN<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>dest_parent <span class="k3">=</span><span class="k3">=</span> gfx_directx_forefront_bitmap<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">50</td><td>         win_gfx_driver-&gt;paint<span class="k2">(</span><span class="k3">&amp;</span>dest_rect<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">51</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">52</td><td>   <span class="k1">else</span> <span class="k2">{</span></td></tr><tr><td class="number">53</td><td>      <span class="c">/* have to use the original software version */</span></td></tr><tr><td class="number">54</td><td>      _orig_masked_stretch_blit<span class="k2">(</span>source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">55</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">56</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
Plus something analogous to ddraw_draw_sprite to map from stretch_sprite to masked_stretch_blit, and the flagging of this as an available accelerated routine at wherever that should be done (which I haven&#39;t quite found yet...)</p><p>EDIT3:<br />And why not use BltFast in masked blit? It is rarely faster, but it may be depending on driver and hardware, etc. i.e.
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">static</span> <span class="k1">void</span> ddraw_masked_blit<span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> source, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> width, <span class="k1">int</span> height<span class="k2">)</span></td></tr><tr><td class="number">2</td><td><span class="k2">{</span></td></tr><tr><td class="number">3</td><td>   RECT source_rect<span class="k2">;</span></td></tr><tr><td class="number">4</td><td>   DDCOLORKEY src_key<span class="k2">;</span></td></tr><tr><td class="number">5</td><td>   HRESULT hr<span class="k2">;</span></td></tr><tr><td class="number">6</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest_parent<span class="k2">;</span></td></tr><tr><td class="number">7</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source_parent<span class="k2">;</span></td></tr><tr><td class="number">8</td><td>&#160;</td></tr><tr><td class="number">9</td><td>   source_rect.left <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">10</td><td>   source_rect.top <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">11</td><td>   source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> width<span class="k2">;</span></td></tr><tr><td class="number">12</td><td>   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> height<span class="k2">;</span></td></tr><tr><td class="number">13</td><td>&#160;</td></tr><tr><td class="number">14</td><td>   src_key.dwColorSpaceLowValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">15</td><td>   src_key.dwColorSpaceHighValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">16</td><td>&#160;</td></tr><tr><td class="number">17</td><td>   <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">18</td><td>&#160;</td></tr><tr><td class="number">19</td><td>      <span class="c">/* find parents */</span></td></tr><tr><td class="number">20</td><td>      dest_parent <span class="k3">=</span> dest<span class="k2">;</span></td></tr><tr><td class="number">21</td><td>      <span class="k1">while</span> <span class="k2">(</span>dest_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">22</td><td>         dest_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>dest_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">23</td><td>&#160;</td></tr><tr><td class="number">24</td><td>      source_parent <span class="k3">=</span> source<span class="k2">;</span></td></tr><tr><td class="number">25</td><td>      <span class="k1">while</span> <span class="k2">(</span>source_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">26</td><td>         source_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>source_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">27</td><td>&#160;</td></tr><tr><td class="number">28</td><td>      _enter_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>      gfx_directx_release_lock<span class="k2">(</span>dest<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">30</td><td>      gfx_directx_release_lock<span class="k2">(</span>source<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">31</td><td>&#160;</td></tr><tr><td class="number">32</td><td>      IDirectDrawSurface2_SetColorKey<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id,</td></tr><tr><td class="number">33</td><td>                                      DDCKEY_SRCBLT, <span class="k3">&amp;</span>src_key<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>&#160;</td></tr><tr><td class="number">35</td><td>      hr <span class="k3">=</span> IDirectDrawSurface2_BltFast<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>dest_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, dest_x <span class="k3">+</span> dest-&gt;x_ofs, dest_y <span class="k3">+</span> dest-&gt;y_ofs,</td></tr><tr><td class="number">36</td><td>                                   DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>source_rect,</td></tr><tr><td class="number">37</td><td>                                   DDBLTFAST_SRCCOLORKEY <span class="k3">|</span> DDBLTFAST_WAIT, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">38</td><td>      _exit_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">39</td><td>&#160;</td></tr><tr><td class="number">40</td><td>      <span class="k1">if</span> <span class="k2">(</span>FAILED<span class="k2">(</span>hr<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">41</td><td>   _TRACE<span class="k2">(</span>PREFIX_E <span class="s">"Blt failed (%x)\n"</span>, hr<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">42</td><td>&#160;</td></tr><tr><td class="number">43</td><td>      <span class="c">/* only for windowed mode */</span></td></tr><tr><td class="number">44</td><td>      <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>gfx_driver-&gt;id <span class="k3">=</span><span class="k3">=</span> GFX_DIRECTX_WIN<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>dest_parent <span class="k3">=</span><span class="k3">=</span> gfx_directx_forefront_bitmap<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">45</td><td>         win_gfx_driver-&gt;paint<span class="k2">(</span><span class="k3">&amp;</span>dest_rect<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">46</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">47</td><td>   <span class="k1">else</span> <span class="k2">{</span></td></tr><tr><td class="number">48</td><td>      <span class="c">/* have to use the original software version */</span></td></tr><tr><td class="number">49</td><td>      _orig_masked_blit<span class="k2">(</span>source, dest, source_x, source_y, dest_x, dest_y, width, height<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">50</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">51</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Mon, 09 Jan 2006 19:42:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
To implement an accelerated stretch on Windows should be as simple as duplicating the hardware non-scaled blitter, changing the (hopefully) BltFast to a Blt and independently building a destination rectangle. It should be a quick enough modification. Although I don&#39;t have a suitable build chain, I&#39;ll go glance at the source.
</p></div></div><p>

Oh, very nice, I didn&#39;t know that.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I cannot imagine that the Allegro developers think they have implemented a faster software blit than that provided by DirectDraw?
</p></div></div><p>

That&#39;s simply the case for memory bitmaps.. there is no DX function (well, again, to my knowledge) to blit a memory rectangle to a DX surface.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 09 Jan 2006 19:55:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
That&#39;s simply the case for memory bitmaps..
</p></div></div><p>
Oh, Allegro is maintaining it&#39;s own internal format for memory bitmaps? I&#39;m curious - why would does it not just use DirectDraw memory surfaces?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Mon, 09 Jan 2006 20:02:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Oh, Allegro is maintaining it&#39;s own internal format for memory bitmaps? I&#39;m curious - why would does it not just use DirectDraw memory surfaces?
</p></div></div><p>

CrossPlatform Issues ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Mon, 09 Jan 2006 20:15:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
CrossPlatform Issues ?
</p></div></div><p>
I can&#39;t see how, if Allegro is flexible enough to be able to handle DirectDraw surfaces as BITMAPS where they are system/video resident, it could not handle DirectDraw surfaces as memory BITMAPS.</p><p>EDIT:<br />it seems the place to notify Allegro of a new accelerated function is in gfx_directx_enable_acceleration at line 453 of the same file as above - src/win/wddaccel.c. I haven&#39;t found the definition of _screen_vtable yet but at a guess you&#39;d change the final if clause, currently:
</p><div class="source-code snippet"><div class="inner"><pre>   <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>ddcaps.dwCaps <span class="k3">&amp;</span> DDCAPS_COLORKEY<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span>
       <span class="k2">(</span>ddcaps.dwCKeyCaps <span class="k3">&amp;</span> DDCKEYCAPS_SRCBLT<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
      _screen_vtable.masked_blit <span class="k3">=</span> ddraw_masked_blit<span class="k2">;</span>
      _screen_vtable.draw_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span>

      <span class="k1">if</span> <span class="k2">(</span>_screen_vtable.color_depth <span class="k3">=</span><span class="k3">=</span> <span class="n">8</span><span class="k2">)</span>
   _screen_vtable.draw_256_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span>

      <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>GFX_HW_VRAM_BLIT_MASKED <span class="k3">|</span> GFX_HW_SYS_TO_VRAM_BLIT_MASKED<span class="k2">)</span><span class="k2">;</span>
   <span class="k2">}</span>
</pre></div></div><p>
To:
</p><div class="source-code snippet"><div class="inner"><pre>   <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>ddcaps.dwCaps <span class="k3">&amp;</span> DDCAPS_COLORKEY<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span>
       <span class="k2">(</span>ddcaps.dwCKeyCaps <span class="k3">&amp;</span> DDCKEYCAPS_SRCBLT<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
      _screen_vtable.masked_blit <span class="k3">=</span> ddraw_masked_blit<span class="k2">;</span>
      _screen_vtable.draw_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span>

      <span class="c">/* new entry */</span>
      _screen_vtable.masked_stretch_blit <span class="k3">=</span> ddraw_masked_stretch_blit

      <span class="k1">if</span> <span class="k2">(</span>_screen_vtable.color_depth <span class="k3">=</span><span class="k3">=</span> <span class="n">8</span><span class="k2">)</span>
   _screen_vtable.draw_256_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span>

      <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>GFX_HW_VRAM_BLIT_MASKED <span class="k3">|</span> GFX_HW_SYS_TO_VRAM_BLIT_MASKED<span class="k2">)</span><span class="k2">;</span>
   <span class="k2">}</span>
</pre></div></div><p>

Does anybody have a Windows/GCC toolchain to try some of this stuff out?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Mon, 09 Jan 2006 20:23:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Probably the original idea was to avoid overhead in the case where you do lots of direct manipulations on the memory bitmap. I think in the new API, we won&#39;t have the separation into &quot;memory&quot;, &quot;system&quot; and &quot;video&quot; bitmaps.. it will all be managed internally. Probably with the possibility to set some extra flag if you want to override the default behavior.</p><p>[Edit:] And in my understanding, you get DX memory bitmaps as &quot;system&quot; bitmaps currently.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Mon, 09 Jan 2006 20:26:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i&#39;m trying it ...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Mon, 09 Jan 2006 20:46:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>GullRaDriel,  have any luck ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Thu, 12 Jan 2006 20:08:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ddraw_masked_stretch_blit isn&#39;t declared.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
C:\PROG\LIBRARY_IDE\Allegro\Copy of allegro&gt;make<br />Compiling Allegro for MinGW32, optimised. Please wait...<br />gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll<br />-loops -ffast-math  -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wd<br />daccel.o -c src/win/wddaccel.c<br />src/win/wddaccel.c: In function `gfx_directx_enable_acceleration&#39;:<br />src/win/wddaccel.c:468: error: structure has no member named `masked_stretch_blit&#39;<br />src/win/wddaccel.c:470: error: `ddraw_masked_stretch_blit&#39; undeclared (first use<br /> in this function)<br />src/win/wddaccel.c:470: error: (Each undeclared identifier is reported only once</p><p>src/win/wddaccel.c:470: error: for each function it appears in.)<br />src/win/wddaccel.c:470: error: syntax error before &quot;if&quot;<br />make: *** [obj/mingw32/alleg/wddaccel.o] Error 1
</p></div></div><p>

i&#39;m trying to use the Thomas&#39;s ddraw_masked_strech_blit.<br />I&#39;m currently including it to fix the gcc issue (i&#39;m dumb, i know)</p><p>EDIT: currently compiling... with no warning or error, i follow the AL_FUNC(...) and other allegro&#39;s specific way of implementing.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Fri, 13 Jan 2006 20:26:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I haven&#39;t found the definition of _screen_vtable yet
</p></div></div><p>
It&#39;s just a global variable of type GFX_VTABLE. The element you&#39;ll want to change is<br /><span class="source-code">AL_METHOD<span class="k2">(</span><span class="k1">void</span>, do_stretch_blit, <span class="k2">(</span><span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source, <span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height, <span class="k1">int</span> masked<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></span><br />masked is a flag (true or false) that determines wether or not to do a masked blit or a normal blit.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 13 Jan 2006 20:36:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m leaving work but will try to to this when at home.<br />I&#39;ll keep you informed.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Fri, 13 Jan 2006 21:33:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
... masked is a flag (true or false) that determines wether or not to do a masked blit or a normal blit.
</p></div></div><p>
Well in that case the code above won&#39;t work properly, but it should be easy to make something that does. This Sunday I&#39;ll try and get a working Windows/GCC install so that I can look into that + the clipping topics Neil Walker raised in the other thread. It seems that time I spent learning Windows/DirectDraw will not have been wasted.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Fri, 13 Jan 2006 21:43:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i&#39;m back
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Fri, 13 Jan 2006 23:45:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Any luck yet?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Sat, 14 Jan 2006 00:00:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i&#39;m currently here:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
C:\PROG\LIBRARY_IDE\Allegro\Copy of allegro&gt;make<br />Compiling Allegro for MinGW32, optimised. Please wait...<br />gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -Wno-unused -mtune=i586 -O2 -funroll-loops -ffast-math  -fomit-frame-pointer -I. -I./include -o obj/mingw32/alleg/wddaccel.o -c src/win/wddaccel.c<br />src/win/wddaccel.c: In function `gfx_directx_enable_acceleration&#39;:<br />src/win/wddaccel.c:467: error: structure has no member named `masked_stretch_blit&#39;<br />src/win/wddaccel.c: In function `ddraw_masked_stretch_blit&#39;:<br />src/win/wddaccel.c:572: warning: implicit declaration of function `_orig_masked_stretch_blit&#39;<br />make: *** [obj/mingw32/alleg/wddaccel.o] Error 1
</p></div></div><p>

any idea?</p><p>PS: if a someone is good at allegro-updating, i can provide a &#39;fast&#39; vnc connection for him.</p><p>Also a ftp.</p><p>PM me !
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 03:32:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
any idea?
</p></div></div><p>
See my above post.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 03:34:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Dump ddraw_masked_stretch_blit as suggested above and try the following:
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">static</span> <span class="k1">void</span> ddraw_do_stretch_blit<span class="k2">(</span><span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source, <span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height, <span class="k1">int</span> masked<span class="k2">)</span></td></tr><tr><td class="number">2</td><td><span class="k2">{</span></td></tr><tr><td class="number">3</td><td>   RECT dest_rect, source_rect<span class="k2">;</span></td></tr><tr><td class="number">4</td><td>   DDCOLORKEY src_key<span class="k2">;</span></td></tr><tr><td class="number">5</td><td>   HRESULT hr<span class="k2">;</span></td></tr><tr><td class="number">6</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest_parent<span class="k2">;</span></td></tr><tr><td class="number">7</td><td>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source_parent<span class="k2">;</span></td></tr><tr><td class="number">8</td><td>&#160;</td></tr><tr><td class="number">9</td><td>   dest_rect.left <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">10</td><td>   dest_rect.top <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">11</td><td>   dest_rect.right <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">12</td><td>   dest_rect.bottom <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">13</td><td>&#160;</td></tr><tr><td class="number">14</td><td>   source_rect.left <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">15</td><td>   source_rect.top <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">16</td><td>   source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">17</td><td>   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">18</td><td>&#160;</td></tr><tr><td class="number">19</td><td>   src_key.dwColorSpaceLowValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">20</td><td>   src_key.dwColorSpaceHighValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">21</td><td>&#160;</td></tr><tr><td class="number">22</td><td>   <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">23</td><td>&#160;</td></tr><tr><td class="number">24</td><td>      <span class="c">/* find parents */</span></td></tr><tr><td class="number">25</td><td>      dest_parent <span class="k3">=</span> dest<span class="k2">;</span></td></tr><tr><td class="number">26</td><td>      <span class="k1">while</span> <span class="k2">(</span>dest_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">27</td><td>         dest_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>dest_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">28</td><td>&#160;</td></tr><tr><td class="number">29</td><td>      source_parent <span class="k3">=</span> source<span class="k2">;</span></td></tr><tr><td class="number">30</td><td>      <span class="k1">while</span> <span class="k2">(</span>source_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">31</td><td>         source_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>source_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">32</td><td>&#160;</td></tr><tr><td class="number">33</td><td>      _enter_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">34</td><td>      gfx_directx_release_lock<span class="k2">(</span>dest<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">35</td><td>      gfx_directx_release_lock<span class="k2">(</span>source<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>      IDirectDrawSurface2_SetColorKey<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id,</td></tr><tr><td class="number">38</td><td>                                      DDCKEY_SRCBLT, <span class="k3">&amp;</span>src_key<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">39</td><td>&#160;</td></tr><tr><td class="number">40</td><td>      hr <span class="k3">=</span> IDirectDrawSurface2_Blt<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>dest_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>dest_rect,</td></tr><tr><td class="number">41</td><td>                                   DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>source_rect,</td></tr><tr><td class="number">42</td><td>                                   <span class="k2">(</span>masked ? DDBLT_KEYSRC <span class="k2">:</span> <span class="n">0</span><span class="k2">)</span> <span class="k3">|</span> DDBLT_WAIT, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">43</td><td>      _exit_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">44</td><td>&#160;</td></tr><tr><td class="number">45</td><td>      <span class="k1">if</span> <span class="k2">(</span>FAILED<span class="k2">(</span>hr<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">46</td><td>   _TRACE<span class="k2">(</span>PREFIX_E <span class="s">"Blt failed (%x)\n"</span>, hr<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">47</td><td>&#160;</td></tr><tr><td class="number">48</td><td>      <span class="c">/* only for windowed mode */</span></td></tr><tr><td class="number">49</td><td>      <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>gfx_driver-&gt;id <span class="k3">=</span><span class="k3">=</span> GFX_DIRECTX_WIN<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>dest_parent <span class="k3">=</span><span class="k3">=</span> gfx_directx_forefront_bitmap<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">50</td><td>         win_gfx_driver-&gt;paint<span class="k2">(</span><span class="k3">&amp;</span>dest_rect<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">51</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">52</td><td>   <span class="k1">else</span> <span class="k2">{</span></td></tr><tr><td class="number">53</td><td>      <span class="c">/* have to use the original software version */</span></td></tr><tr><td class="number">54</td><td>      _orig_stretch_blit<span class="k2">(</span>source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height, masked<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">55</td><td>   <span class="k2">}</span></td></tr><tr><td class="number">56</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
And then bin:<br /><span class="source-code">_screen_vtable.masked_stretch_blit <span class="k3">=</span> ddraw_masked_stretch_blit<span class="k2">;</span></span><br />For:<br /><span class="source-code">_screen_vtable.do_stretch_blit <span class="k3">=</span> ddraw_do_stretch_blit<span class="k2">;</span></span><br />Note that this should only accelerate stretch_blit and masked_stretch_blit (or wherever masked is added to make that an Allegro function) - if it works then a simple thing to convert accelerated stretch_sprites to stretch_blits can be added.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Sat, 14 Jan 2006 03:46:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Note that this should only accelerate stretch_blit and masked_stretch_blit (or wherever masked is added to make that an Allegro function) - if it works then a simple thing to convert accelerated stretch_sprites to stretch_blits can be added.
</p></div></div><p>
Actually, stretch_blit, masked_stretch_blit and stretch_sprite all call the same do_stretch_blit(), which is actually called that in the asm version of the code; it&#39;s the infamous self-modifying code in Allegro; it&#39;s called _al_stretch_blit in the C version of the code. Neither function is exposed through the API and they&#39;re static to their respective sourcefiles (allegro/src/i386/istretch.c and allegro/src/c/cstretch.c). Pretty confusing, isn&#39;t it?<br />Anyway, do_stretch_blit() and _al_stretch_blit() both have
</p><div class="source-code snippet"><div class="inner"><pre>   <span class="c">/* vtable hook */</span>   
   <span class="k1">if</span> <span class="k2">(</span>source-&gt;vtable-&gt;do_stretch_blit<span class="k2">)</span> <span class="k2">{</span>
      source-&gt;vtable-&gt;do_stretch_blit<span class="k2">(</span>source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height, masked<span class="k2">)</span><span class="k2">;</span>
      <span class="k1">return</span><span class="k2">;</span>
   <span class="k2">}</span>
</pre></div></div><p>

So bottom line: they should all work.</p><p>EDIT: do we need a GFX_HW_STRETCH_BLIT flag for gfx_capabilities now?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 04:20:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Please, you seem to be both competent to modify and test those file.<br />I can leave you my access throught a VNC client, and you&#39;ll have all you need to do it.</p><p>Really, i think i&#39;m not able to do this alone.</p><p>I&#39;m not enough &#39;competent&#39;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 04:24:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Please, you seem to be both competent to modify and test those file.
</p></div></div><p>
I lack a suitable operating system.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I can leave you my access throught a VNC client, and you&#39;ll have all you need to do it.
</p></div></div><p>
You couldn&#39;t make that an ssh remote login, could you? Anyway, I&#39;ll see about attaching a patched up file for you. in a moment.</p><p>EDIT: here you go! Replace allegro/src/win/wddaccel.c with the attached version and recompile Allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 04:29:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i can grant you a telnet access, openssh isn&#39;t installed.</p><p>EDIT:<br />telnet installed, ready to receive you after a little router reboot.<br />Just PM me some IM where i can join you
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 04:30:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>See my above edit.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 04:35:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ok<br />i test</p><p>EDIT: it is still OK for the access, if even you wanna test yourself
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 04:36:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>This is the full patch I&#39;m going to propose as soon as my provider&#39;s sendmail server is unblocked:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>Index: src<span class="k3">/</span>win<span class="k3">/</span>wddaccel.c</td></tr><tr><td class="number">2</td><td><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span></td></tr><tr><td class="number">3</td><td><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span> src<span class="k3">/</span>win<span class="k3">/</span>wddaccel.c  <span class="k2">(</span>revision <span class="n">5662</span><span class="k2">)</span></td></tr><tr><td class="number">4</td><td><span class="k3">+</span><span class="k3">+</span><span class="k3">+</span> src<span class="k3">/</span>win<span class="k3">/</span>wddaccel.c  <span class="k2">(</span>working copy<span class="k2">)</span></td></tr><tr><td class="number">5</td><td>@@ <span class="k3">-</span><span class="n">15</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">15</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">6</td><td>  <span class="k3">*</span>      Bugfixes by Isaac Cruz.</td></tr><tr><td class="number">7</td><td>  <span class="k3">*</span></td></tr><tr><td class="number">8</td><td>  <span class="k3">*</span>      Accelerated <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k1">and</span> <a href="http://www.allegro.cc/manual/hline" target="_blank"><span class="a">hline</span></a><span class="k2">(</span><span class="k2">)</span> added by Shawn Hargreaves.</td></tr><tr><td class="number">9</td><td><span class="k3">+</span> <span class="k3">*</span>      Accelerated <a href="http://www.allegro.cc/manual/stretch_blit" target="_blank"><span class="a">stretch_blit</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k1">and</span> friends by Thomas Harte</td></tr><tr><td class="number">10</td><td>  <span class="k3">*</span></td></tr><tr><td class="number">11</td><td>  <span class="k3">*</span>      See readme.txt <span class="k1">for</span> copyright information.</td></tr><tr><td class="number">12</td><td>  <span class="k3">*</span><span class="k3">/</span></td></tr><tr><td class="number">13</td><td>@@ <span class="k3">-</span><span class="n">34</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">35</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">14</td><td> <span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_rectfill<span class="k2">)</span> <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, <span class="k1">int</span> x1, <span class="k1">int</span> y1, <span class="k1">int</span> x2, <span class="k1">int</span> y2, <span class="k1">int</span> color<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td> <span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_draw_sprite<span class="k2">)</span> <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, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> sprite, <span class="k1">int</span> x, <span class="k1">int</span> y<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td> <span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_masked_blit<span class="k2">)</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> source, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> width, <span class="k1">int</span> height<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td><span class="k3">+</span><span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_stretch_blit<span class="k2">)</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height, <span class="k1">int</span> masked<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td> </td></tr><tr><td class="number">19</td><td> </td></tr><tr><td class="number">20</td><td> </td></tr><tr><td class="number">21</td><td>@@ <span class="k3">-</span><span class="n">193</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">195</span>,<span class="n">68</span> @@</td></tr><tr><td class="number">22</td><td> </td></tr><tr><td class="number">23</td><td> </td></tr><tr><td class="number">24</td><td> </td></tr><tr><td class="number">25</td><td><span class="k3">+</span><span class="c">/* ddraw_do_stretch_blit:</span></td></tr><tr><td class="number">26</td><td><span class="c">+ *   Accelerated stretch_blit, stretch_sprite, stretch_masked_blit</span></td></tr><tr><td class="number">27</td><td><span class="c">+ */</span></td></tr><tr><td class="number">28</td><td><span class="k3">+</span><span class="k1">static</span> <span class="k1">void</span> ddraw_do_stretch_blit<span class="k2">(</span><span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source, <span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height, <span class="k1">int</span> masked<span class="k2">)</span></td></tr><tr><td class="number">29</td><td><span class="k3">+</span><span class="k2">{</span></td></tr><tr><td class="number">30</td><td><span class="k3">+</span>   RECT dest_rect, source_rect<span class="k2">;</span></td></tr><tr><td class="number">31</td><td><span class="k3">+</span>   DDCOLORKEY src_key<span class="k2">;</span></td></tr><tr><td class="number">32</td><td><span class="k3">+</span>   HRESULT hr<span class="k2">;</span></td></tr><tr><td class="number">33</td><td><span class="k3">+</span>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest_parent<span class="k2">;</span></td></tr><tr><td class="number">34</td><td><span class="k3">+</span>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source_parent<span class="k2">;</span></td></tr><tr><td class="number">35</td><td><span class="k3">+</span></td></tr><tr><td class="number">36</td><td><span class="k3">+</span>   dest_rect.left <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">37</td><td><span class="k3">+</span>   dest_rect.top <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">38</td><td><span class="k3">+</span>   dest_rect.right <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">39</td><td><span class="k3">+</span>   dest_rect.bottom <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">40</td><td><span class="k3">+</span></td></tr><tr><td class="number">41</td><td><span class="k3">+</span>   source_rect.left <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">42</td><td><span class="k3">+</span>   source_rect.top <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">43</td><td><span class="k3">+</span>   source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">44</td><td><span class="k3">+</span>   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">45</td><td><span class="k3">+</span></td></tr><tr><td class="number">46</td><td><span class="k3">+</span>   src_key.dwColorSpaceLowValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">47</td><td><span class="k3">+</span>   src_key.dwColorSpaceHighValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">48</td><td><span class="k3">+</span></td></tr><tr><td class="number">49</td><td><span class="k3">+</span>   <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">50</td><td><span class="k3">+</span></td></tr><tr><td class="number">51</td><td><span class="k3">+</span>      <span class="c">/* find parents */</span></td></tr><tr><td class="number">52</td><td><span class="k3">+</span>      dest_parent <span class="k3">=</span> dest<span class="k2">;</span></td></tr><tr><td class="number">53</td><td><span class="k3">+</span>      <span class="k1">while</span> <span class="k2">(</span>dest_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">54</td><td><span class="k3">+</span>         dest_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>dest_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">55</td><td><span class="k3">+</span></td></tr><tr><td class="number">56</td><td><span class="k3">+</span>      source_parent <span class="k3">=</span> source<span class="k2">;</span></td></tr><tr><td class="number">57</td><td><span class="k3">+</span>      <span class="k1">while</span> <span class="k2">(</span>source_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">58</td><td><span class="k3">+</span>         source_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>source_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">59</td><td><span class="k3">+</span></td></tr><tr><td class="number">60</td><td><span class="k3">+</span>      _enter_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">61</td><td><span class="k3">+</span>      gfx_directx_release_lock<span class="k2">(</span>dest<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">62</td><td><span class="k3">+</span>      gfx_directx_release_lock<span class="k2">(</span>source<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">63</td><td><span class="k3">+</span></td></tr><tr><td class="number">64</td><td><span class="k3">+</span>      IDirectDrawSurface2_SetColorKey<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id,</td></tr><tr><td class="number">65</td><td><span class="k3">+</span>                                      DDCKEY_SRCBLT, <span class="k3">&amp;</span>src_key<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">66</td><td><span class="k3">+</span></td></tr><tr><td class="number">67</td><td><span class="k3">+</span>      hr <span class="k3">=</span> IDirectDrawSurface2_Blt<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>dest_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>dest_rect,</td></tr><tr><td class="number">68</td><td><span class="k3">+</span>                                   DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>source_rect,</td></tr><tr><td class="number">69</td><td><span class="k3">+</span>                                   <span class="k2">(</span>masked ? DDBLT_KEYSRC <span class="k2">:</span> <span class="n">0</span><span class="k2">)</span> <span class="k3">|</span> DDBLT_WAIT, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">70</td><td><span class="k3">+</span>      _exit_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">71</td><td><span class="k3">+</span></td></tr><tr><td class="number">72</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span>FAILED<span class="k2">(</span>hr<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">73</td><td><span class="k3">+</span>   _TRACE<span class="k2">(</span>PREFIX_E <span class="s">"Blt failed (%x)\n"</span>, hr<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">74</td><td><span class="k3">+</span></td></tr><tr><td class="number">75</td><td><span class="k3">+</span>      <span class="c">/* only for windowed mode */</span></td></tr><tr><td class="number">76</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>gfx_driver-&gt;id <span class="k3">=</span><span class="k3">=</span> GFX_DIRECTX_WIN<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>dest_parent <span class="k3">=</span><span class="k3">=</span> gfx_directx_forefront_bitmap<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">77</td><td><span class="k3">+</span>         win_gfx_driver-&gt;paint<span class="k2">(</span><span class="k3">&amp;</span>dest_rect<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">78</td><td><span class="k3">+</span>   <span class="k2">}</span></td></tr><tr><td class="number">79</td><td><span class="k3">+</span>   <span class="k1">else</span> <span class="k2">{</span></td></tr><tr><td class="number">80</td><td><span class="k3">+</span>      <span class="c">/* have to use the original software version */</span></td></tr><tr><td class="number">81</td><td><span class="k3">+</span>      _orig_stretch_blit<span class="k2">(</span>source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height, masked<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">82</td><td><span class="k3">+</span>   <span class="k2">}</span></td></tr><tr><td class="number">83</td><td><span class="k3">+</span><span class="k2">}</span></td></tr><tr><td class="number">84</td><td><span class="k3">+</span></td></tr><tr><td class="number">85</td><td><span class="k3">+</span></td></tr><tr><td class="number">86</td><td><span class="k3">+</span></td></tr><tr><td class="number">87</td><td> <span class="c">/* ddraw_clear_to_color:</span></td></tr><tr><td class="number">88</td><td><span class="c">  *  Accelerated screen clear routine.</span></td></tr><tr><td class="number">89</td><td><span class="c">  */</span></td></tr><tr><td class="number">90</td><td>@@ <span class="k3">-</span><span class="n">458</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">522</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">91</td><td>    _orig_rectfill <span class="k3">=</span> _screen_vtable.rectfill<span class="k2">;</span></td></tr><tr><td class="number">92</td><td>    _orig_draw_sprite <span class="k3">=</span> _screen_vtable.draw_sprite<span class="k2">;</span></td></tr><tr><td class="number">93</td><td>    _orig_masked_blit <span class="k3">=</span> _screen_vtable.masked_blit<span class="k2">;</span></td></tr><tr><td class="number">94</td><td><span class="k3">+</span>   _orig_stretch_blit <span class="k3">=</span> _screen_vtable.do_stretch_blit<span class="k2">;</span></td></tr><tr><td class="number">95</td><td> </td></tr><tr><td class="number">96</td><td>    <span class="c">/* accelerated video to video blits? */</span></td></tr><tr><td class="number">97</td><td>    <span class="k1">if</span> <span class="k2">(</span>ddcaps.dwCaps <span class="k3">&amp;</span> DDCAPS_BLT<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">98</td><td>@@ <span class="k3">-</span><span class="n">466</span>,<span class="n">8</span> <span class="k3">+</span><span class="n">531</span>,<span class="n">9</span> @@</td></tr><tr><td class="number">99</td><td>       _screen_vtable.blit_to_self_backward <span class="k3">=</span> ddraw_blit_to_self<span class="k2">;</span></td></tr><tr><td class="number">100</td><td>       _screen_vtable.blit_from_system <span class="k3">=</span> ddraw_blit_to_self<span class="k2">;</span></td></tr><tr><td class="number">101</td><td>       _screen_vtable.blit_to_system <span class="k3">=</span> ddraw_blit_to_self<span class="k2">;</span></td></tr><tr><td class="number">102</td><td><span class="k3">+</span>      _screen_vtable.do_stretch_blit <span class="k3">=</span> ddraw_do_stretch_blit<span class="k2">;</span></td></tr><tr><td class="number">103</td><td> </td></tr><tr><td class="number">104</td><td><span class="k3">-</span>      <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>GFX_HW_VRAM_BLIT <span class="k3">|</span> GFX_HW_SYS_TO_VRAM_BLIT<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">105</td><td><span class="k3">+</span>      <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>GFX_HW_VRAM_BLIT <span class="k3">|</span> GFX_HW_SYS_TO_VRAM_BLIT <span class="k3">|</span> GFX_HW_STRETCH_BLIT<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">106</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">107</td><td> </td></tr><tr><td class="number">108</td><td>    <span class="c">/* accelerated color fills? */</span></td></tr><tr><td class="number">109</td><td>Index: include<span class="k3">/</span>allegro<span class="k3">/</span>gfx.h</td></tr><tr><td class="number">110</td><td><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span></td></tr><tr><td class="number">111</td><td><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span> include<span class="k3">/</span>allegro<span class="k3">/</span>gfx.h  <span class="k2">(</span>revision <span class="n">5662</span><span class="k2">)</span></td></tr><tr><td class="number">112</td><td><span class="k3">+</span><span class="k3">+</span><span class="k3">+</span> include<span class="k3">/</span>allegro<span class="k3">/</span>gfx.h  <span class="k2">(</span>working copy<span class="k2">)</span></td></tr><tr><td class="number">113</td><td>@@ <span class="k3">-</span><span class="n">142</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">142</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">114</td><td> <span class="p">#define GFX_HW_SYS_TO_VRAM_BLIT           0x00100000</span></td></tr><tr><td class="number">115</td><td> <span class="p">#define GFX_HW_SYS_TO_VRAM_BLIT_MASKED    0x00200000</span></td></tr><tr><td class="number">116</td><td> <span class="p">#define GFX_SYSTEM_CURSOR                 0x00400000</span></td></tr><tr><td class="number">117</td><td><span class="k3">+</span>#define GFX_HW_STRETCH_BLIT               <span class="n">0x00800000</span></td></tr><tr><td class="number">118</td><td> </td></tr><tr><td class="number">119</td><td> </td></tr><tr><td class="number">120</td><td> AL_VAR<span class="k2">(</span><span class="k1">int</span>, <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a><span class="k2">)</span><span class="k2">;</span>   <span class="c">/* current driver capabilities */</span></td></tr></tbody></table></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 04:38:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>do you wanna me to post it for you ?</p><p>it&#39;s still compiling, i make a distclean before a make all</p><p>EDIT: compiled, i&#39;m uploading the whole compiled.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 04:43:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Remember to change the draw_sprite code to remove the offsets when you do the stretch_blit update. I guess the mystery of the masked_blit working/the clipping code can remain so.</p><p>I don&#39;t know how often the CVS is updated but it would also be great to have a fix for it not crashing when you destroy a system sub-bitmap <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 14 Jan 2006 04:46:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>who wanna test?</p><p><a href="http://www.nilorea.net/gull/allegro-test.exe">Download the sfx archive</a></p><p>It&#39;s the whole library including source and compiled version of allegro-patched</p><p>EDIT: when testing at my home, i just modify the exscale to load a pink masked pcx, and i use the masked_stretch_blit.</p><p>How can we check what does it use ? hardware or software ?</p><p>EDIT: attached is the modified exscale... i can ensure you that is it accelerated on my pc ! (now with source and modified mysha.pcx)</p><p>I can&#39;t see what the picture is now, it&#39;s too fast !
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 04:52:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It doesn&#39;t work. I actually only tested it for the draw_sprite change, which works, but my sample code also does stretch_blit. </p><p>If you have a memory bitmap and a memory buffer all is well, if you have a system/video buffer and/or a system/video bitmap you either end up with a crash or (in the case of sub-bitmaps) instead of stretching it it actually makes the sub-bitmap bigger so you simply get a larger area of the master image!</p><p>Do you want a copy of my test program to try it, and you can modify the bitmap types easily to see?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 14 Jan 2006 05:16:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
it&#39;s still compiling, i make a distclean before a make all
</p></div></div><p>
Next time, don&#39;t! That&#39;s the point in using make: it only recompiles what it has to to safe time.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How can we check what does it use ? hardware or software ?
</p></div></div><p>
Normally I&#39;d put printf() or trace statements in the code and see if I get output from those. That doesn&#39;t work in Windows though, so I guess you&#39;d have to check the framerate.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Remember to change the draw_sprite code to remove the offsets when you do the stretch_blit update.
</p></div></div><p>
Neil... please don&#39;t plug these things whenever you have a chance. Honestly, if it&#39;s know it&#39;s known. Don&#39;t start posting reminders for unapplied patches unless more than a week has passed since the last message about it or you get no feedback whatsoever. Also don&#39;t do it in threads about other topics. It&#39;s impolite.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I don&#39;t know how often the CVS is updated
</p></div></div><p>
The SVN repository gets updated whenever a patch is applied. I&#39;m not sure what you mean?</p><p>EDIT:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It doesn&#39;t work. I actually only tested it for the draw_sprite change, which works, but my sample code also does stretch_blit.
</p></div></div><p>
That doesn&#39;t make sense. The code for stretch_blit() and the code for draw_sprite() (and masked_stretch_blit) is the same. So as far as I can see it either works, or it doesn&#39;t.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 05:17:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>yeah, of course ! </p><p>(even if we talk here of a masked_stretch_blit)</p><p>EDIT: Modified in 800x600 for Sev&#39; attached
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 05:17:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
That doesn&#39;t make sense. The code for stretch_blit() and the code for draw_sprite() (and masked_stretch_blit) is the same. So as far as I can see it either works, or it doesn&#39;t.
</p></div></div><p>what you are saying is correct - none of them work when you are not using memory bitmaps, all of them work when you are using memory bitmaps. The errors you get are depenant upon whether you are using system/video for the graphics or the back-buffer or both and whether your graphics are sub-bitmaps</p><p>Attached is a test program that will show bitmaps and a stretched bitmap. The current version you see is using sub-bitmaps and memory bitmap/buffer only that works fine.</p><p>To change it to see how it crashes/fails then</p><p>To change the back-buffer edit config.xml, change graphicsmode=&quot;0&quot; (0=double, 1=system double, 2=paged, 3=triple). Obviously 2/3 use video. </p><p>To change the graphics edit animations.xml and change bmp_type=&quot;1&quot; (1 is memory, 2 is system, 3 is video).</p><p>It will fail in different ways when you use anything other than memory bitmaps.</p><p>After you&#39;ve waded through those, rename the animations.xml file to animations.old or something and rename animations_single.xml to be animations.xml and repeat the tests. This will change the graphics from being sub-bitmaps to be individually loaded bitmaps. These have a different result again.</p><p>btw, don&#39;t worry about the crash when you use system bitmaps and buffer with sub-bitmaps. This is a known error.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Neil... please don&#39;t plug these things whenever you have a chance. Honestly, if it&#39;s know it&#39;s known. Don&#39;t start posting reminders for unapplied patches unless more than a week has passed since the last message about it or you get no feedback whatsoever. Also don&#39;t do it in threads about other topics. It&#39;s impolite.
</p></div></div><p>Ok, I&#39;ll address the first point - all I was doing was reminding someone as it wasn&#39;t a definite CVS update, just a thread conversation. Secondly, I wasn&#39;t posting about other topics, the stretch blit problems are linked to the draw_sprite problems, which in turn are linked to the subbitmaps of system bitmaps crashing fault.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 14 Jan 2006 05:27:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i&#39;ll try to compil it tomorrow with the modified allegro.<br />I test , and it is already a nice work.<br />I&#39;m smoking my last before going to sleep.</p><p>See you tomorow for the tests, All.</p><p>EDIT: and for the &#39;windows&#39; specific , i&#39;m thinkin of providing a ssh access to my pc for AD. I&#39;ll keep you informed. I think i can easily provide a ftp-ssh-x11-vnc compliant access.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Sat, 14 Jan 2006 05:48:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve just this second modified my download file in the previous email as I included the wrong XML files, so if anyone has downloaded it before now you&#39;ll have to get it again. There is no compilation as it&#39;s a windows executable. See stretch working first then try the different modes by editing the xml files to see the new code fail.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 14 Jan 2006 05:55:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
what you are saying is correct
</p></div></div><p>
Wait... you said
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
<b>It doesn&#39;t work.</b> I actually only tested it for the <b>draw_sprite change, which works</b>, but my sample code also does <b>stretch_blit</b>.
</p></div></div><p>
I read this as `It doesn&#39;t work, but draw_sprite works. When I use stretch_blit it doesn&#39;t work&#39;. I don&#39;t think that&#39;s what you meant and it certainly doesn&#39;t make any sense (as I said). So do I understand you correctly if I understand that hardware accelerated VRAM-&gt;VRAM streched blits do not work for you?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
- none of them work when you are not using memory bitmaps, all of them work when you are using memory bitmaps. The errors you get are depenant upon whether you are using system/video for the graphics or the back-buffer or both and whether your graphics are sub-bitmaps
</p></div></div><p>
Please keep it simple, or take a little more time to explain what you&#39;re doing!<br />Leave system bitmaps, subbitmaps and whatnot out of it for the moment as testing all of this at the same time is much, much too confusing. At least it is for me. One thing at a time. If you are doing too many things at once it just becomes too complicated and convoluted to keep track of what&#39;s going on.<br />All that needs to be tested in response to the patch I posted above is wether or not VRAM-&gt;VRAM stretched blits are now hardware accelerated or not.<br />GullRaDriel&#39;s post suggested that it works for him, I get the impression that it doesn&#39;t work for you? Have you tested his modified exscale?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
After you&#39;ve waded through those, rename the animations.xml file to animations.old or something and rename animations_single.xml to be animations.xml and repeat the tests. This will change the graphics from being sub-bitmaps to be individually loaded bitmaps. These have a different result again.
</p></div></div><p>
Please keep the test case simple. As I said, there&#39;s far too much going on here to keep track of what&#39;s going on and what&#39;s failing and what isn&#39;t and why.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Ok, I&#39;ll address the first point - all I was doing was reminding someone as it wasn&#39;t a definite CVS update, just a thread conversation.
</p></div></div><p>
I fail to see what that has to do with saying `Remember to change the draw_sprite code to remove the offsets when you do the stretch_blit update.&#39; The current test has nothing to do with draw_sprite. Maybe I&#39;m missing something?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Secondly, I wasn&#39;t posting about other topics, the stretch blit problems are linked to the draw_sprite problems, which in turn are linked to the subbitmaps of system bitmaps crashing fault.
</p></div></div><p>
I don&#39;t see that. There are no subbitmaps or system bitmaps in sight <i>for this thread</i>. Anyway, if that&#39;s causing the problems you&#39;re seeing (which I&#39;m not saying it isn&#39;t), you have a patched version of Allegro, right? Does it work properly with that?</p><p>Please try to describe in a clear, simple and concise manner if and when things work and when they don&#39;t. Don&#39;t try to test every possible case at once and if you do put some work in how you present the results (eg, make a table of the posibilities and results). As it is, I can&#39;t make heads or tails of it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 06:38:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OT:</p><p>This started me thinking about possible enhancments of the X driver(s), Besides just using standard X functions, theres a few extensions that may help, though I&#39;m not sure how much.. The XDamage extension allows you to get detailed info about damaged areas, <a href="http://cvs.freedesktop.org/*checkout*/xorg/xc/doc/specs/Render/protocol">XRender</a> allows you to render the window to an off screen surface (and other windows as well) as well as use various rendering modes, and the Xcomposite extension works with the other two to give us fancy compositing eye candy.</p><p>I would be happy to work on integrating some of these (namely XDamage and XRender) into allegro, at least once the open source ATI drivers support XRender for my 9600xt. Though I probably won&#39;t beable to do it all myself.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 14 Jan 2006 07:08:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ahhh, I&#39;ve found a potential problem. To cut a long story short:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>ddcaps.dwCaps <span class="k3">&amp;</span> DDCAPS_COLORKEY<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span>
       <span class="k2">(</span>ddcaps.dwCKeyCaps <span class="k3">&amp;</span> DDCKEYCAPS_SRCBLT<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
      _screen_vtable.masked_blit <span class="k3">=</span> ddraw_masked_blit<span class="k2">;</span>
      _screen_vtable.draw_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span>

      <span class="c">/* new entry */</span>
      <span class="k1">if</span> <span class="k2">(</span>ddcaps.dwCaps<span class="k3">&amp;</span>DDCAPS_BLTSTRETCH<span class="k2">)</span>
         _screen_vtable.do_stretch_blit <span class="k3">=</span> ddraw_do_stretch_blit<span class="k2">;</span>

      <span class="k1">if</span> <span class="k2">(</span>_screen_vtable.color_depth <span class="k3">=</span><span class="k3">=</span> <span class="n">8</span><span class="k2">)</span>
   _screen_vtable.draw_256_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span>

      <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>GFX_HW_VRAM_BLIT_MASKED <span class="k3">|</span> GFX_HW_SYS_TO_VRAM_BLIT_MASKED<span class="k2">)</span><span class="k2">;</span>
   <span class="k2">}</span>
</pre></div></div><p>
A better solution would allow non-masked stretch blitting where wither of  DDCAPS_COLORKEY or DDCKEYCAPS_SRCBLT are not set.</p><p>EDIT:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
OT:</p><p>This started me thinking about possible enhancments of the X driver(s)
</p></div></div><p>
Yeah, the only reason I&#39;m suddenly so up on where Allegro does what is that I&#39;ve been researching improvements to the OS X driver...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Sat, 14 Jan 2006 07:12:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, how about the attached patch?<br />Copy it to the main Allegro directory (allegro/) and run <i>patch -p0 &lt; dx_stretch_blit.diff</i>.<br />It should test the capabilities of the graphics card and separate the blit and masked_blit tests. The test programme should also report which of these two works (but it doesn&#39;t offer a way of testing either; that&#39;ll have to be fixed later).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 15:30:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ok, i&#39;ll make a simple table of what works and what doesn&#39;t with various bitmap types in windows, to try and make it easier to read. However, I don&#39;t have any CVS tools, any chance of someone doing the diff and sending me the three files or tell me where to find patch?</p><p>Do you want me to limit the tests to just stretch_blit, or include masked_stretch or (dare I say it) draw_sprite?</p><p>Will any of the pivot/rotate stretch blits be affected by the changes?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 14 Jan 2006 16:36:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
However, I don&#39;t have any CVS tools, any chance of someone doing the diff and sending me the three files or tell me where to find patch?
</p></div></div><p>
I found <a href="http://gnuwin32.sourceforge.net/packages/patch.htm">http://gnuwin32.sourceforge.net/packages/patch.htm</a>. You can also get <a href="http://unxutils.sourceforge.net/">http://unxutils.sourceforge.net/</a> for more useful utilities, like diff, grep, sed and awk. </p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Do you want me to limit the tests to just stretch_blit, or include masked_stretch or (dare I say it) draw_sprite?
</p></div></div><p>
stretch_blit and masked_stretch_blit (or stretch_sprite). draw_sprite() is not affected by this patch so it&#39;s quite pointless to test anything with that.<br />Also check if the test programme lists `stretch blit&#39; and `masked stretch blit&#39; as hardware accelerated functions.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 14 Jan 2006 18:09:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>thanks to everyone for doing this, its fantastic !</p><p>trivia: this thread, appears in google,  i was looking for something else, and this thread was top of the google results!</p><p>I&#39;ve been looking into whether the IDirectDrawSurface2_Blt() can accept a alpha channel value.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Sat, 14 Jan 2006 19:00:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Will any of the pivot/rotate stretch blits be affected by the changes?
</p></div></div><p>
Not by the current patches, but DirectDraw has the capability to accelerate this if the driver implements it. Certainly during the &quot;classic&quot; period of DirectDraw this was very rare, but perhaps things have changed now. I wouldn&#39;t be too surprised if modern DirectDraw isn&#39;t some sort of Microsoft generic implementation that utilises DirectGraphics, which should mean that rotation is there.</p><p>If no-one else does, I&#39;ll see if I can knock anything up for rotation/pivot/etc tomorrow.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;ve been looking into whether the IDirectDrawSurface2_Blt() can accept a alpha channel value.
</p></div></div><p>
Blt (and BltFast) certainly can&#39;t, I&#39;m not sure if anything else exists that can which would not be too difficult to add into the existing code.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Sun, 15 Jan 2006 02:38:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just thought if the code for stretch_blit was being changed then maybe pivot/rotate stretch might call the same code and may be affected somehow.</p><p>Anyway, I get an error running patch. I&#39;m using the standard 4.2 allegro source code. I get the following error:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
D:\DATA\allegro&gt;patch -p0 &lt; dx_stretch_blit.diff<br />patching file src/win/wddaccel.c<br />Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 340</p><p>This application has requested the Runtime to terminate it in an unusual way.<br />Please contact the application&#39;s support team for more information.</p><p>D:\DATA\allegro&gt;
</p></div></div><p>
I&#39;ll see if I can work out from the diff what the actual changes are and make them manually unless someone is reading this and responds sharpish <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 15 Jan 2006 04:21:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Zip with modified files attached [for 4.2].
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 15 Jan 2006 05:03:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s ok, I&#39;ve done the change manually, the diff file is self-explanatory (btw, you haven&#39;t included the file anyway!) [edit]I see you now have. I&#39;ll recompile[/edit]. </p><p>Before I do my tests, here are the results of the new test.exe, which I guess says my card is doing acceleration for video/system graphics.</p><p>vram-&gt;vram blit: yes<br />masked vram-&gt;vram blit: yes<br />mem-&gt;screen blit: no <br />masked mem-&gt;screen blit: no <br />system-&gt;screen blit: yes<br />masked system-&gt;screen blit: yes
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 15 Jan 2006 05:06:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
(btw, you haven&#39;t included the file anyway!).
</p></div></div><p>
I hit add reply instead of browse by accident. I know, they&#39;re not even close. Don&#39;t ask.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Before I do my tests, here are the results of the new test.exe, which I guess says my card is doing acceleration for video/system graphics.
</p></div></div><p>
It appears that I neglected to include the display code in teh relevant location! You&#39;ll only see it reported in the logfile with the version I attached. Try the one I attacehd to this post (untested).<br />What you posted only says if normal blits are accelerated. It doesn&#39;t say anything about stretch_blit().
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 15 Jan 2006 05:14:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, updated test as well and my system is fully hardware accelerated except for memory to screen blits and stretched vram-vram (though masked stretched vram-vram is), which I guess is fairly normal. Here are my results. I tested it with all permutations of video/system/memory bitmaps onto memory/system/video buffers using both single graphics and sub-bitmaps. I also tested them as a base with the original 4.2 DLL and the new changes:</p><p>Tests are :<br />A. draw buffer is memory. graphics are memory (normal, not sub-bitmap)<br />B. draw buffer is memory. graphics are system (normal, not sub-bitmap)<br />C. draw buffer is memory. graphics are video (normal, not sub-bitmap)<br />D. draw buffer is system. graphics are memory (normal, not sub-bitmap)<br />E. draw buffer is system. graphics are system (normal, not sub-bitmap)<br />F. draw buffer is system. graphics are video (normal, not sub-bitmap)<br />G. draw buffer is video. graphics are memory (normal, not sub-bitmap)<br />H. draw buffer is video. graphics are system (normal, not sub-bitmap)<br />I. draw buffer is video. graphics are video (normal, not sub-bitmap)</p><p>Firstly, as a base, I tested all the above using the standard allegro 4.2 dll. All the stretch functions works. draw_sprite is as my other emails so I won&#39;t mention it.</p><p>Using the new DLL the results are as follows, <br />Y - works fine<br />Nx - fails, number corresponds to the errors below the table.
</p><div class="source-code snippet"><div class="inner"><pre>test  <a href="http://www.allegro.cc/manual/stretch_blit" target="_blank"><span class="a">stretch_blit</span></a>  <a href="http://www.allegro.cc/manual/masked_stretch_blit" target="_blank"><span class="a">masked_stretch_blit</span></a>  <a href="http://www.allegro.cc/manual/stretch_sprite" target="_blank"><span class="a">stretch_sprite</span></a>  <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a>
A    Y    Y      Y    Y
B    N1    N1      N1    Y
C    N1    N1      N1    Y
D    Y    Y      Y    Y
E    N2    N2      N2    Y
F    N2    N2      N2    Y
G    Y    Y      Y    Y
H    N2    N2      N2    Y
I    N2    N2      N2    Y
</pre></div></div><p>
Failure types<br />N1:		crash on calling function<br />N2:		sprite is not shown</p><p>Using the new code and single bitmaps it&#39;s pretty clear that stretch only works when the buffer being drawn onto is memory. Where it fails the majority must be failing to draw, but when you draw memory bitmaps onto accelerated buffer it crashes.</p><p>------------------------------------<br />I then repeated all the tests again, but this time the graphics being shown are sub-bitmaps of a master sheet. I will only show below the results that are different (i.e. a different result blitting sub-bitmaps rather than normal bitmaps)</p><div class="source-code snippet"><div class="inner"><pre>test  <a href="http://www.allegro.cc/manual/stretch_blit" target="_blank"><span class="a">stretch_blit</span></a>  <a href="http://www.allegro.cc/manual/masked_stretch_blit" target="_blank"><span class="a">masked_stretch_blit</span></a>  <a href="http://www.allegro.cc/manual/stretch_sprite" target="_blank"><span class="a">stretch_sprite</span></a>  <a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a>
B                  N3
E    N4    N4      N4    N3
F    N4    N4      N4    N3
H    N4    N4      N4    N3
I    N4    N4      N4    Y
</pre></div></div><p>
Failure types<br />N3 Crashes on destroying the subbitmap (this is already documented by me earlier)<br />N4 This is a freaky error! instead of drawing the bitmap stretched it is increasing the size of the bitmap (i.e. if my sprite was 32x32, instead of stretching it to 64x64 as in the code, it actually simply changes the size of the sub-bitmap to 64x64 - showing simply a larger part of the master bitmap)</p><p>So it looks like when your graphic being drawn is a subbitmap and your drawing buffer is a system or video bitmap and your graphic is a system or video you get the bitmap being enlarged not stretched.</p><p>Hope this helps <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>btw, in the test code you popped up, you forgot a comma in this line and the one bwlow:<br />      &quot;stretch vram-&gt;vram blit:&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sun, 15 Jan 2006 06:08:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
stretched vram-vram (though masked stretched vram-vram is)
</p></div></div><p>
That&#39;s just weird.</p><p>I&#39;m not at all sure what to make of these results though. Someone with Windows should have a look and try to isolate the problem. I may check if my XP64 license hasn&#39;t expired yet (I think it has), in which case I might check for myself. No promises though.</p><p>Your test is fairly exhaustive, which I&#39;m sure will help eventually. However, you could have left out the mem-&gt;* and draw_sprite() tests since they are (should) be unaffected by the patch in this thread.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
btw, in the test code you popped up, you forgot a comma in this line and the one bwlow:<br />&quot;stretch vram-&gt;vram blit:&quot;
</p></div></div><p>
I know. I fixed it a minute after posting that but neglectied to attach the updated file.</p><p>EDIT: For the `bitmap size is wrong&#39;, I think you need to have <br />   </p><div class="source-code snippet"><div class="inner"><pre>source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> source_width<span class="k2">;</span>
   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> source_height<span class="k2">;</span>
</pre></div></div><p>
instead of<br />   </p><div class="source-code snippet"><div class="inner"><pre>source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span>
   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span>
</pre></div></div><p>
Please try it out and see if that helps.</p><p>EDIT2: In the test programme, add<br /><span class="source-code">       <span class="s">"Mouse pointer:"</span>,</span><br />at line 1752 (before &quot;stretch vram-&gt;vram blit:&quot;).</p><p>EDIT3:<br />Ok, I managed to boot into Windows after some tinkering with grub (I added a harddisk a few weeks ago and had to change some settings because of that) and apparently my licesense hasn&#39;t expired yet.<br />Try the following patch:
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>Index: src<span class="k3">/</span>win<span class="k3">/</span>wddaccel.c</td></tr><tr><td class="number">2</td><td><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span></td></tr><tr><td class="number">3</td><td><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span> src<span class="k3">/</span>win<span class="k3">/</span>wddaccel.c  <span class="k2">(</span>revision <span class="n">5662</span><span class="k2">)</span></td></tr><tr><td class="number">4</td><td><span class="k3">+</span><span class="k3">+</span><span class="k3">+</span> src<span class="k3">/</span>win<span class="k3">/</span>wddaccel.c  <span class="k2">(</span>working copy<span class="k2">)</span></td></tr><tr><td class="number">5</td><td>@@ <span class="k3">-</span><span class="n">15</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">15</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">6</td><td>  <span class="k3">*</span>      Bugfixes by Isaac Cruz.</td></tr><tr><td class="number">7</td><td>  <span class="k3">*</span></td></tr><tr><td class="number">8</td><td>  <span class="k3">*</span>      Accelerated <a href="http://www.allegro.cc/manual/rectfill" target="_blank"><span class="a">rectfill</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k1">and</span> <a href="http://www.allegro.cc/manual/hline" target="_blank"><span class="a">hline</span></a><span class="k2">(</span><span class="k2">)</span> added by Shawn Hargreaves.</td></tr><tr><td class="number">9</td><td><span class="k3">+</span> <span class="k3">*</span>      Accelerated <a href="http://www.allegro.cc/manual/stretch_blit" target="_blank"><span class="a">stretch_blit</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k1">and</span> friends by Thomas Harte</td></tr><tr><td class="number">10</td><td>  <span class="k3">*</span></td></tr><tr><td class="number">11</td><td>  <span class="k3">*</span>      See readme.txt <span class="k1">for</span> copyright information.</td></tr><tr><td class="number">12</td><td>  <span class="k3">*</span><span class="k3">/</span></td></tr><tr><td class="number">13</td><td>@@ <span class="k3">-</span><span class="n">34</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">35</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">14</td><td> <span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_rectfill<span class="k2">)</span> <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, <span class="k1">int</span> x1, <span class="k1">int</span> y1, <span class="k1">int</span> x2, <span class="k1">int</span> y2, <span class="k1">int</span> color<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td> <span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_draw_sprite<span class="k2">)</span> <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, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> sprite, <span class="k1">int</span> x, <span class="k1">int</span> y<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td> <span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_masked_blit<span class="k2">)</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> source, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span> dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> width, <span class="k1">int</span> height<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td><span class="k3">+</span><span class="k1">static</span> <span class="k1">void</span> <span class="k2">(</span><span class="k3">*</span>_orig_stretch_blit<span class="k2">)</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source, <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height, <span class="k1">int</span> masked<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td> </td></tr><tr><td class="number">19</td><td> </td></tr><tr><td class="number">20</td><td> </td></tr><tr><td class="number">21</td><td>@@ <span class="k3">-</span><span class="n">193</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">195</span>,<span class="n">70</span> @@</td></tr><tr><td class="number">22</td><td> </td></tr><tr><td class="number">23</td><td> </td></tr><tr><td class="number">24</td><td> </td></tr><tr><td class="number">25</td><td><span class="k3">+</span><span class="c">/* ddraw_do_stretch_blit:</span></td></tr><tr><td class="number">26</td><td><span class="c">+ *   Accelerated stretch_blit, stretch_sprite, stretch_masked_blit</span></td></tr><tr><td class="number">27</td><td><span class="c">+ */</span></td></tr><tr><td class="number">28</td><td><span class="k3">+</span><span class="k1">static</span> <span class="k1">void</span> ddraw_do_stretch_blit<span class="k2">(</span><span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source, <span class="k1">struct</span> <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest, <span class="k1">int</span> source_x, <span class="k1">int</span> source_y, <span class="k1">int</span> source_width, <span class="k1">int</span> source_height, <span class="k1">int</span> dest_x, <span class="k1">int</span> dest_y, <span class="k1">int</span> dest_width, <span class="k1">int</span> dest_height, <span class="k1">int</span> masked<span class="k2">)</span></td></tr><tr><td class="number">29</td><td><span class="k3">+</span><span class="k2">{</span></td></tr><tr><td class="number">30</td><td><span class="k3">+</span>   RECT dest_rect, source_rect<span class="k2">;</span></td></tr><tr><td class="number">31</td><td><span class="k3">+</span>   DDCOLORKEY src_key<span class="k2">;</span></td></tr><tr><td class="number">32</td><td><span class="k3">+</span>   HRESULT hr<span class="k2">;</span></td></tr><tr><td class="number">33</td><td><span class="k3">+</span>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>dest_parent<span class="k2">;</span></td></tr><tr><td class="number">34</td><td><span class="k3">+</span>   <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>source_parent<span class="k2">;</span></td></tr><tr><td class="number">35</td><td><span class="k3">+</span></td></tr><tr><td class="number">36</td><td><span class="k3">+</span>   dest_rect.left <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">37</td><td><span class="k3">+</span>   dest_rect.top <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">38</td><td><span class="k3">+</span>   dest_rect.right <span class="k3">=</span> dest_x <span class="k3">+</span> dest-&gt;x_ofs <span class="k3">+</span> dest_width<span class="k2">;</span></td></tr><tr><td class="number">39</td><td><span class="k3">+</span>   dest_rect.bottom <span class="k3">=</span> dest_y <span class="k3">+</span> dest-&gt;y_ofs <span class="k3">+</span> dest_height<span class="k2">;</span></td></tr><tr><td class="number">40</td><td><span class="k3">+</span></td></tr><tr><td class="number">41</td><td><span class="k3">+</span>   source_rect.left <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs<span class="k2">;</span></td></tr><tr><td class="number">42</td><td><span class="k3">+</span>   source_rect.top <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs<span class="k2">;</span></td></tr><tr><td class="number">43</td><td><span class="k3">+</span>   source_rect.right <span class="k3">=</span> source_x <span class="k3">+</span> source-&gt;x_ofs <span class="k3">+</span> source_width<span class="k2">;</span></td></tr><tr><td class="number">44</td><td><span class="k3">+</span>   source_rect.bottom <span class="k3">=</span> source_y <span class="k3">+</span> source-&gt;y_ofs <span class="k3">+</span> source_height<span class="k2">;</span></td></tr><tr><td class="number">45</td><td><span class="k3">+</span></td></tr><tr><td class="number">46</td><td><span class="k3">+</span>   src_key.dwColorSpaceLowValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">47</td><td><span class="k3">+</span>   src_key.dwColorSpaceHighValue <span class="k3">=</span> source-&gt;vtable-&gt;mask_color<span class="k2">;</span></td></tr><tr><td class="number">48</td><td><span class="k3">+</span></td></tr><tr><td class="number">49</td><td><span class="k3">+</span>   <span class="k1">if</span> <span class="k2">(</span> <span class="k2">(</span> <span class="k2">(</span>masked <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_STRETCH_BLIT_MASKED<span class="k2">)</span><span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span></td></tr><tr><td class="number">50</td><td><span class="k3">+</span>          <span class="k2">(</span><span class="k3">!</span>masked <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_STRETCH_BLIT<span class="k2">)</span><span class="k2">)</span> </td></tr><tr><td class="number">51</td><td><span class="k3">+</span>        <span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span> <a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k2">)</span> <span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">52</td><td><span class="k3">+</span></td></tr><tr><td class="number">53</td><td><span class="k3">+</span>      <span class="c">/* find parents */</span></td></tr><tr><td class="number">54</td><td><span class="k3">+</span>      dest_parent <span class="k3">=</span> dest<span class="k2">;</span></td></tr><tr><td class="number">55</td><td><span class="k3">+</span>      <span class="k1">while</span> <span class="k2">(</span>dest_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">56</td><td><span class="k3">+</span>         dest_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>dest_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">57</td><td><span class="k3">+</span></td></tr><tr><td class="number">58</td><td><span class="k3">+</span>      source_parent <span class="k3">=</span> source<span class="k2">;</span></td></tr><tr><td class="number">59</td><td><span class="k3">+</span>      <span class="k1">while</span> <span class="k2">(</span>source_parent-&gt;id <span class="k3">&amp;</span> BMP_ID_SUB<span class="k2">)</span></td></tr><tr><td class="number">60</td><td><span class="k3">+</span>         source_parent <span class="k3">=</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span><span class="k2">)</span>source_parent-&gt;extra<span class="k2">;</span></td></tr><tr><td class="number">61</td><td><span class="k3">+</span></td></tr><tr><td class="number">62</td><td><span class="k3">+</span>      _enter_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">63</td><td><span class="k3">+</span>      gfx_directx_release_lock<span class="k2">(</span>dest<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">64</td><td><span class="k3">+</span>      gfx_directx_release_lock<span class="k2">(</span>source<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">65</td><td><span class="k3">+</span></td></tr><tr><td class="number">66</td><td><span class="k3">+</span>      IDirectDrawSurface2_SetColorKey<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id,</td></tr><tr><td class="number">67</td><td><span class="k3">+</span>                                      DDCKEY_SRCBLT, <span class="k3">&amp;</span>src_key<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">68</td><td><span class="k3">+</span></td></tr><tr><td class="number">69</td><td><span class="k3">+</span>      hr <span class="k3">=</span> IDirectDrawSurface2_Blt<span class="k2">(</span>DDRAW_SURFACE_OF<span class="k2">(</span>dest_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>dest_rect,</td></tr><tr><td class="number">70</td><td><span class="k3">+</span>                                   DDRAW_SURFACE_OF<span class="k2">(</span>source_parent<span class="k2">)</span><span class="k3">-</span><span class="k3">&gt;</span>id, <span class="k3">&amp;</span>source_rect,</td></tr><tr><td class="number">71</td><td><span class="k3">+</span>                                   <span class="k2">(</span>masked ? DDBLT_KEYSRC <span class="k2">:</span> <span class="n">0</span><span class="k2">)</span> <span class="k3">|</span> DDBLT_WAIT, NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">72</td><td><span class="k3">+</span>      _exit_gfx_critical<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">73</td><td><span class="k3">+</span></td></tr><tr><td class="number">74</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span>FAILED<span class="k2">(</span>hr<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">75</td><td><span class="k3">+</span>   _TRACE<span class="k2">(</span>PREFIX_E <span class="s">"Blt failed (%x)\n"</span>, hr<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">76</td><td><span class="k3">+</span></td></tr><tr><td class="number">77</td><td><span class="k3">+</span>      <span class="c">/* only for windowed mode */</span></td></tr><tr><td class="number">78</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span>gfx_driver-&gt;id <span class="k3">=</span><span class="k3">=</span> GFX_DIRECTX_WIN<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span>dest_parent <span class="k3">=</span><span class="k3">=</span> gfx_directx_forefront_bitmap<span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">79</td><td><span class="k3">+</span>         win_gfx_driver-&gt;paint<span class="k2">(</span><span class="k3">&amp;</span>dest_rect<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">80</td><td><span class="k3">+</span>   <span class="k2">}</span></td></tr><tr><td class="number">81</td><td><span class="k3">+</span>   <span class="k1">else</span> <span class="k2">{</span></td></tr><tr><td class="number">82</td><td><span class="k3">+</span>      <span class="c">/* have to use the original software version */</span></td></tr><tr><td class="number">83</td><td><span class="k3">+</span>      _orig_stretch_blit<span class="k2">(</span>source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height, masked<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">84</td><td><span class="k3">+</span>   <span class="k2">}</span></td></tr><tr><td class="number">85</td><td><span class="k3">+</span><span class="k2">}</span></td></tr><tr><td class="number">86</td><td><span class="k3">+</span></td></tr><tr><td class="number">87</td><td><span class="k3">+</span></td></tr><tr><td class="number">88</td><td><span class="k3">+</span></td></tr><tr><td class="number">89</td><td> <span class="c">/* ddraw_clear_to_color:</span></td></tr><tr><td class="number">90</td><td><span class="c">  *  Accelerated screen clear routine.</span></td></tr><tr><td class="number">91</td><td><span class="c">  */</span></td></tr><tr><td class="number">92</td><td>@@ <span class="k3">-</span><span class="n">458</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">524</span>,<span class="n">7</span> @@</td></tr><tr><td class="number">93</td><td>    _orig_rectfill <span class="k3">=</span> _screen_vtable.rectfill<span class="k2">;</span></td></tr><tr><td class="number">94</td><td>    _orig_draw_sprite <span class="k3">=</span> _screen_vtable.draw_sprite<span class="k2">;</span></td></tr><tr><td class="number">95</td><td>    _orig_masked_blit <span class="k3">=</span> _screen_vtable.masked_blit<span class="k2">;</span></td></tr><tr><td class="number">96</td><td><span class="k3">+</span>   _orig_stretch_blit <span class="k3">=</span> _screen_vtable.do_stretch_blit<span class="k2">;</span></td></tr><tr><td class="number">97</td><td> </td></tr><tr><td class="number">98</td><td>    <span class="c">/* accelerated video to video blits? */</span></td></tr><tr><td class="number">99</td><td>    <span class="k1">if</span> <span class="k2">(</span>ddcaps.dwCaps <span class="k3">&amp;</span> DDCAPS_BLT<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">100</td><td>@@ <span class="k3">-</span><span class="n">467</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">534</span>,<span class="n">11</span> @@</td></tr><tr><td class="number">101</td><td>       _screen_vtable.blit_from_system <span class="k3">=</span> ddraw_blit_to_self<span class="k2">;</span></td></tr><tr><td class="number">102</td><td>       _screen_vtable.blit_to_system <span class="k3">=</span> ddraw_blit_to_self<span class="k2">;</span></td></tr><tr><td class="number">103</td><td> </td></tr><tr><td class="number">104</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span>ddcaps.dwCaps<span class="k3">&amp;</span>DDCAPS_BLTSTRETCH<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">105</td><td><span class="k3">+</span>         _screen_vtable.do_stretch_blit <span class="k3">=</span> ddraw_do_stretch_blit<span class="k2">;</span></td></tr><tr><td class="number">106</td><td><span class="k3">+</span>         <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> GFX_HW_STRETCH_BLIT<span class="k2">;</span></td></tr><tr><td class="number">107</td><td><span class="k3">+</span>      <span class="k2">}</span></td></tr><tr><td class="number">108</td><td><span class="k3">+</span></td></tr><tr><td class="number">109</td><td>       <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> <span class="k2">(</span>GFX_HW_VRAM_BLIT <span class="k3">|</span> GFX_HW_SYS_TO_VRAM_BLIT<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">110</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">111</td><td> </td></tr><tr><td class="number">112</td><td>@@ <span class="k3">-</span><span class="n">486</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">558</span>,<span class="n">11</span> @@</td></tr><tr><td class="number">113</td><td>       _screen_vtable.masked_blit <span class="k3">=</span> ddraw_masked_blit<span class="k2">;</span></td></tr><tr><td class="number">114</td><td>       _screen_vtable.draw_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span></td></tr><tr><td class="number">115</td><td> </td></tr><tr><td class="number">116</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span>ddcaps.dwCaps<span class="k3">&amp;</span>DDCAPS_BLTSTRETCH<span class="k2">)</span> <span class="k2">{</span></td></tr><tr><td class="number">117</td><td><span class="k3">+</span>         _screen_vtable.do_stretch_blit <span class="k3">=</span> ddraw_do_stretch_blit<span class="k2">;</span></td></tr><tr><td class="number">118</td><td><span class="k3">+</span>         <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">|</span><span class="k3">=</span> GFX_HW_STRETCH_BLIT_MASKED<span class="k2">;</span></td></tr><tr><td class="number">119</td><td><span class="k3">+</span>      <span class="k2">}</span></td></tr><tr><td class="number">120</td><td><span class="k3">+</span></td></tr><tr><td class="number">121</td><td>       <span class="k1">if</span> <span class="k2">(</span>_screen_vtable.color_depth <span class="k3">=</span><span class="k3">=</span> <span class="n">8</span><span class="k2">)</span></td></tr><tr><td class="number">122</td><td>    _screen_vtable.draw_256_sprite <span class="k3">=</span> ddraw_draw_sprite<span class="k2">;</span></td></tr><tr><td class="number">123</td><td> </td></tr><tr><td class="number">124</td><td>Index: tests<span class="k3">/</span>test.c</td></tr><tr><td class="number">125</td><td><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span></td></tr><tr><td class="number">126</td><td><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span> tests<span class="k3">/</span>test.c  <span class="k2">(</span>revision <span class="n">5662</span><span class="k2">)</span></td></tr><tr><td class="number">127</td><td><span class="k3">+</span><span class="k3">+</span><span class="k3">+</span> tests<span class="k3">/</span>test.c  <span class="k2">(</span>working copy<span class="k2">)</span></td></tr><tr><td class="number">128</td><td>@@ <span class="k3">-</span><span class="n">1748</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">1748</span>,<span class="n">9</span> @@</td></tr><tr><td class="number">129</td><td>       <span class="s">"masked mem-&gt;screen blit:"</span>,</td></tr><tr><td class="number">130</td><td>       <span class="s">"system-&gt;screen blit:"</span>,</td></tr><tr><td class="number">131</td><td>       <span class="s">"masked system-&gt;screen blit:"</span>,</td></tr><tr><td class="number">132</td><td><span class="k3">+</span>      <span class="s">"Mouse pointer:"</span>,</td></tr><tr><td class="number">133</td><td><span class="k3">+</span>      <span class="s">"stretch vram-&gt;vram blit:"</span>,</td></tr><tr><td class="number">134</td><td><span class="k3">+</span>      <span class="s">"masked stretch vram-&gt;vram blit:"</span>,</td></tr><tr><td class="number">135</td><td>       NULL</td></tr><tr><td class="number">136</td><td>    <span class="k2">}</span><span class="k2">;</span></td></tr><tr><td class="number">137</td><td> </td></tr><tr><td class="number">138</td><td>@@ <span class="k3">-</span><span class="n">3385</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">3388</span>,<span class="n">8</span> @@</td></tr><tr><td class="number">139</td><td>       <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_MEM_BLIT_MASKED<span class="k2">)</span>           <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>f, <span class="s">"    masked mem-&gt;vram blits\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">140</td><td>       <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_SYS_TO_VRAM_BLIT<span class="k2">)</span>          <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>f, <span class="s">"    system-&gt;vram blits\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">141</td><td>       <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_SYS_TO_VRAM_BLIT_MASKED<span class="k2">)</span>   <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>f, <span class="s">"    masked system-&gt;vram blits\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">142</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_STRETCH_BLIT<span class="k2">)</span>              <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>f, <span class="s">"    stretch blits\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">143</td><td><span class="k3">+</span>      <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_STRETCH_BLIT_MASKED<span class="k2">)</span>       <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>f, <span class="s">"    masked stretch blits\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">144</td><td> </td></tr><tr><td class="number">145</td><td>       <span class="k1">if</span> <span class="k2">(</span><span class="k3">!</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> ~<span class="k2">(</span>GFX_CAN_SCROLL <span class="k3">|</span> GFX_CAN_TRIPLE_BUFFER <span class="k3">|</span> GFX_HW_CURSOR<span class="k2">)</span><span class="k2">)</span><span class="k2">)</span></td></tr><tr><td class="number">146</td><td>          <a href="http://www.delorie.com/djgpp/doc/libc/libc_345.html" target="_blank">fprintf</a><span class="k2">(</span>f, <span class="s">"    &lt;none&gt;\n"</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">147</td><td>Index: include<span class="k3">/</span>allegro<span class="k3">/</span>gfx.h</td></tr><tr><td class="number">148</td><td><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span><span class="k3">=</span></td></tr><tr><td class="number">149</td><td><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span> include<span class="k3">/</span>allegro<span class="k3">/</span>gfx.h  <span class="k2">(</span>revision <span class="n">5662</span><span class="k2">)</span></td></tr><tr><td class="number">150</td><td><span class="k3">+</span><span class="k3">+</span><span class="k3">+</span> include<span class="k3">/</span>allegro<span class="k3">/</span>gfx.h  <span class="k2">(</span>working copy<span class="k2">)</span></td></tr><tr><td class="number">151</td><td>@@ <span class="k3">-</span><span class="n">142</span>,<span class="n">6</span> <span class="k3">+</span><span class="n">142</span>,<span class="n">8</span> @@</td></tr><tr><td class="number">152</td><td> <span class="p">#define GFX_HW_SYS_TO_VRAM_BLIT           0x00100000</span></td></tr><tr><td class="number">153</td><td> <span class="p">#define GFX_HW_SYS_TO_VRAM_BLIT_MASKED    0x00200000</span></td></tr><tr><td class="number">154</td><td> <span class="p">#define GFX_SYSTEM_CURSOR                 0x00400000</span></td></tr><tr><td class="number">155</td><td><span class="k3">+</span>#define GFX_HW_STRETCH_BLIT               <span class="n">0x00800000</span></td></tr><tr><td class="number">156</td><td><span class="k3">+</span>#define GFX_HW_STRETCH_BLIT_MASKED        <span class="n">0x01000000</span></td></tr><tr><td class="number">157</td><td> </td></tr><tr><td class="number">158</td><td> </td></tr><tr><td class="number">159</td><td> AL_VAR<span class="k2">(</span><span class="k1">int</span>, <a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a><span class="k2">)</span><span class="k2">;</span>   <span class="c">/* current driver capabilities */</span></td></tr></tbody></table></div></div><p>
With it, the test programme correctly reports all stretch_blit related operations as being hardware accelerated. Modifying exscale to use a video bitmap (be sure to allocate a dummy one the size of the screen first) also seems to work fine.<br />Curiously enough, it appears to be slower on my system than if I do a mem-&gt;vram blit, except if I remove the vsync() call. Perhaps that&#39;s normal, but it&#39;s not what I was expecting. <b>shrugs</b><br />\begin[off-topic]{rant}<br />How <i>do</i> you Windows people manage, though? I can&#39;t believe how unresponsive and klunky the interface feels and how badly the terminal works. That and not being able to trace with printf() is a real pain too. Man, am I glad I never have to use <i>that system</i> for anything serious...<br />\end{rant} <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 15 Jan 2006 16:51:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Can anyone confirm or deny that ddraw_do_stretch_blit obeys set_clip_rect? I can&#39;t think how it does and I&#39;m particularly concerned that if DDCAPS_CANCLIPSTRETCHED is not set then some sort of memory overflow may occur. I have no idea what that would do in global terms but I&#39;d imagine at least graphics corruption.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How do you Windows people manage, though? I can&#39;t believe how unresponsive and klunky the interface feels and how badly the terminal works. That and not being able to trace with printf() is a real pain too. Man, am I glad I never have to use that system for anything serious...
</p></div></div><p>
Yes, I&#39;m having a few issues with it. I&#39;d definitely either GNUstep or ROX Desktop/Zero Install if I left the Mac world. Anyway can anyone recommend a Windows/GCC setup that includes a graphical debugger that could be used to trace into a (suitably built) version of the Allegro DLL?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Sun, 15 Jan 2006 23:29:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve recompiled and done a few tests (not exhaustive, I&#39;ll do the grid later), however here are my findings with the new code posted above:</p><p>Things that work:<br />1. test.exe now works and shows the correct hardware acceleration flags<br />2. stretching of video/system bitmaps now shows the correct image rather than either nothing (for standard bitmaps) or simply resizing the bitmap (for sub-bitmaps)</p><p>So that&#39;s good.</p><p>However, the things that don&#39;t work:</p><p>1. When you are drawing stretched video/system bitmaps onto a memory buffer it still crashes<br />2. When you are drawing stretched single bitmaps (rather than sub-bitmaps) AND both your buffer and graphic are video (any other combination is ok, including system) it leaves a 1 pixel magenta (i.e. the mask colour) around the outline of the graphic (i.e. around the outermost pixels, not the rectangular border).</p><p>My only thought on (2) is it might be a bug in the dd function, e.g. stretching first and anti-aliasing the magenta edge? but then sub-bitmaps work ok.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 18 Jan 2006 20:57:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
1. When you are drawing stretched video/system bitmaps onto a memory buffer it still crashes
</p></div></div><p>
I figured the other day that it might. I don&#39;t think there&#39;s a special check for that in the code. The fix is probably to only call the HW-accelerated version if the target is a video/system bitmap.<br />I&#39;m curious now: does a normal blit from video-&gt;mem work if vid-&gt;vid is hardware accelerated or does that also crash?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 18 Jan 2006 23:32:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I figured the other day that it might.
</p></div></div><p>Maybe if you know the area of fault this might fix the problem of it crashing when destroying system bitmaps?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
does a normal blit from video-&gt;mem work if vid-&gt;vid is hardware accelerated or does that also crash
</p></div></div><p>From memory all other permutations work, only vid-&gt;vid failed, but I&#39;ll check when I start up my laptop tonight as that&#39;s got the code on it, and do another grid.</p><p>I checked google for bugs on directdraw functions and blitting (for the magenta halo on stretching) but the only thing returned was Allegro.cc forum entries! I guess we must be the only people in the world still using DX3 <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 18 Jan 2006 23:43:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
My only thought on (2) is it might be a bug in the dd function, e.g. stretching first and anti-aliasing the magenta edge? but then sub-bitmaps work ok.
</p></div></div><p>
Without really being able to explain the sub-bitmap thing, I guess a relevant question is whether you see a &quot;colour 0&quot; border in 8bpp mode? Does generating a sub-bitmap that is actually exactly the same proportions as a parent bitmap fix the problem?</p><p>EDIT: Hmmm, it seems <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=94968">others</a> have had the same problem and not found a solution. Do you see the main body of your sprite being filtered? I guess we need to play about with a <a href="http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddref_2oqf.asp">DDBLTFX structure</a> - in particular it seems to have stuff like dwAlphaEdgeBlend, although not particularly clear from a brief reading. It also allows flipped and mirrored blits, so things like draw_sprite_v_flip (or whatever Allegro calls it) could be accelerated if they aren&#39;t already (?)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Thu, 19 Jan 2006 00:59:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Maybe if you know the area of fault this might fix the problem of it crashing when destroying system bitmaps?
</p></div></div><p>
Eh? I don&#39;t see what the one has to do with the other, to be honest!<br />The reason I thought it might crash is this: the stretch_blit (et al) code checks if the source bitmap says it can be hardware accelerated and if it can be it calls the function, from allegro/src/c/cstretch.c:
</p><div class="source-code snippet"><div class="inner"><pre>   <span class="c">/* vtable hook */</span>   
   <span class="k1">if</span> <span class="k2">(</span>src-&gt;vtable-&gt;do_stretch_blit<span class="k2">)</span> <span class="k2">{</span>
      src-&gt;vtable-&gt;do_stretch_blit<span class="k2">(</span>src, dst, sx, sy, sw, sh, dx, dy, dw, dh, masked<span class="k2">)</span><span class="k2">;</span>
      <span class="k1">return</span><span class="k2">;</span>
   <span class="k2">}</span>
</pre></div></div><p>
while ddraw_do_stretch_blit does not check what sort of bitmap the destination is. Which I figured might be a problem if it&#39;s not a video or system bitmap, since that&#39;s what it&#39;s supposed to work with.</p><p>So the questions I&#39;d like to know the answer to (just yes or no) are:<br />1) Does normal blit frim vid-&gt;mem work, even if vid-&gt;vid is accelared? (Asking because the code should be similar)<br />2) Does the old non-accelerated stretch_blit work properly if you go from vid-&gt;mem? (Asking because it immediately highlights the problem and suggests a way to fix it)</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It also allows flipped and mirrored blits, so things like draw_sprite_v_flip (or whatever Allegro calls it) could be accelerated if they aren&#39;t already (?)
</p></div></div><p>
I don&#39;t think they are. If there&#39;s no function that does that in src/win/wddaccel.c then it isn&#39;t. If you need the vtable function name and prototype and haven&#39;t found where they&#39;re declared yet, they&#39;re in allegro/include/allegro/gfx.h in the GFX_VTABLE struct. If you want to take a shot at doing this, let me know. The plan is to release 4.2.1 soonish but I think we can puch it back a little for something like this.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 19 Jan 2006 04:44:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Gamasutra has this to say about this about stretching/mirroring/shrinking, &#39;These features, however, are often driver-dependent and are supported to different extents on different video hardware, providing inconsistent results if used.&#39;</p><p>Perhaps to make it consistent in the case of vid-&gt;vid then do a fallback to the _orig_stretch_blit(...), e.g. in ddraw_do_stretch_blit():</p><div class="source-code snippet"><div class="inner"><pre>   <span class="k1">if</span> <span class="k2">(</span> <span class="k2">(</span> <span class="k2">(</span>masked <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_STRETCH_BLIT_MASKED<span class="k2">)</span><span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span>
  <span class="k2">(</span><span class="k3">!</span>masked <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/gfx_capabilities" target="_blank"><span class="a">gfx_capabilities</span></a> <span class="k3">&amp;</span> GFX_HW_STRETCH_BLIT<span class="k2">)</span><span class="k2">)</span> 
<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k2">(</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <span class="k3">!</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>dest<span class="k2">)</span><span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>source<span class="k2">)</span> <span class="k2">)</span> 
<span class="highlight">                                  <span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span></span>
</pre></div></div><p>

If you look at the attached image you&#39;ll see it doing what we thought. It seems to be stretching then removing the mask, leaving an anti-aliased artifact.</p><p>Back to the tests, I&#39;ve tested all the things as above and updated the table.</p><p>A. draw buffer is memory. graphics are memory (normal, not sub-bitmap)<br />B. draw buffer is memory. graphics are system (normal, not sub-bitmap)<br />C. draw buffer is memory. graphics are video (normal, not sub-bitmap)<br />D. draw buffer is system. graphics are memory (normal, not sub-bitmap)<br />E. draw buffer is system. graphics are system (normal, not sub-bitmap)<br />F. draw buffer is system. graphics are video (normal, not sub-bitmap)<br />G. draw buffer is video. graphics are memory (normal, not sub-bitmap)<br />H. draw buffer is video. graphics are system (normal, not sub-bitmap)<br />I. draw buffer is video. graphics are video (normal, not sub-bitmap)</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>test  stretch</td></tr><tr><td class="number">2</td><td>A    Y</td></tr><tr><td class="number">3</td><td>B    N1</td></tr><tr><td class="number">4</td><td>C    N1</td></tr><tr><td class="number">5</td><td>D    Y</td></tr><tr><td class="number">6</td><td>E    Y</td></tr><tr><td class="number">7</td><td>F    Y</td></tr><tr><td class="number">8</td><td>G    Y</td></tr><tr><td class="number">9</td><td>H    Y</td></tr><tr><td class="number">10</td><td>I    N3</td></tr><tr><td class="number">11</td><td>&#160;</td></tr><tr><td class="number">12</td><td>N1: crash on calling function</td></tr><tr><td class="number">13</td><td>N2: crash on destroying bitmap<span class="k3">/</span>subbitmap</td></tr><tr><td class="number">14</td><td>N3: <span class="s">'single pixel halo'</span></td></tr><tr><td class="number">15</td><td>&#160;</td></tr><tr><td class="number">16</td><td>with subbitmaps are the same as above, except:</td></tr><tr><td class="number">17</td><td>test  stretch</td></tr><tr><td class="number">18</td><td>H    N2</td></tr></tbody></table></div></div><p>

So it looks like things are almost there with the only fault now being drawing system/video bitmaps onto memory bitmaps. The other two faults are on destroying sub-bitmaps that are system bitmaps (but that isn&#39;t a stretch fault) and the odd halo fault that might be a ddraw bug.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 19 Jan 2006 05:03:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, so vid-&gt;mem stretch blits crash with the hardware accelerated code. Does it work without (ie, did it work properly with the software stretcher)?<br />Did you test regular blits?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
!is_video_bitmap(dest)
</p></div></div><p>
Shouldn&#39;t that lose the `!&#39;?<br />You want to use that function if both source and dest are video surfaces (or possibly system bitmaps) and fall back on the original if they are not.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 19 Jan 2006 05:53:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>to answer the questions:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Shouldn&#39;t that lose the `!&#39;?
</p></div></div><p>No, that bit of code was to avoid vid-&gt;vid which is the only one which seems to be a ddraw bug and not a coding problem, so cannot be fixed, or made to work consistently in Windows. this isn&#39;t a big thing as it&#39;s currently software only anyway.</p><p>The software stretcher works fine (i.e. using the unchanged code). </p><p>Standard blits are fine, it is just any of the stretch functions.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 19 Jan 2006 06:17:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
No, that bit of code was to avoid vid-&gt;vid which is the only one which seems to be a ddraw bug and not a coding problem, so cannot be fixed, or made to work consistently in Windows. this isn&#39;t a big thing as it&#39;s currently software only anyway.
</p></div></div><p>
Well, I&#39;d prefer being able to detect it (somehow) and not report the accelerated blit as being possible, or work around it. What the code does with your change is always fall back on software stretching despite claiming that vid-&gt;vid is accelerated. This is worse than it is now.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The software stretcher works fine (i.e. using the unchanged code).
</p></div></div><p>
Ok, so we can check if the destination bitmap is a video bitmap and use the software stretcher in that case?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Standard blits are fine, it is just any of the stretch functions.
</p></div></div><p>
Ok, in that case I&#39;ll have a look at how standard blits deal with vid-&gt;mem blits. I&#39;m assuming they do something special if the accelerated vid-&gt;mem stretch_blit crashes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 19 Jan 2006 16:37:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>As far as I can see there is hardly any difference between ddraw_masked_blit() and ddraw_do_stretch_blit(), nothing worth noting anyway. In order to state the obvious I debugged the stretch_blit at the point of crash and it fails on the draw:</p><p>      hr = IDirectDrawSurface2_Blt(DDRAW_SURFACE_OF(dest_parent)-&gt;id, &amp;dest_rect,<br />                                   DDRAW_SURFACE_OF(source_parent)-&gt;id, &amp;source_rect,<br />                                   (masked ? DDBLT_KEYSRC : 0) | DDBLT_WAIT, NULL);</p><p>I can only summise that it must be a bug inside the _Blt function or perhaps my video card has a fault? If someone offers (they haven&#39;t the past few times I did) I&#39;ll post the exe for them to test.</p><p>Neil.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 19 Jan 2006 19:22:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I can only summise that it must be a bug inside the _Blt function or perhaps my video card has a fault?
</p></div></div><p>
There&#39;s the outside possibility of an issue with clipping, that I vaguely alluded to before. Did you make a note either of the values of dest_rect and source_rect or of the parameters you passed to stretch_blit to make it crash?
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
If someone offers (they haven&#39;t the past few times I did) I&#39;ll post the exe for them to test.
</p></div></div><p>
You might as well post - I might get a go on a Windows machine later.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Thu, 19 Jan 2006 19:45:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I didn&#39;t check the data in the function (I&#39;ll do it tonight and update the post when done - I don&#39;t have a JIT debugger on this build) but for my source image I tried both 24x24 and 32x32, and tried doubling the size and keeping the same size. </p><p>So thinking about it, there is no difference between the standard masked_blit call and the stretched_mask_blit when your destination size is the same as the source as they both call the same IDirectDrawSurface2_Blt with the same parameters, don&#39;t they?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 19 Jan 2006 20:01:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As far as I can see there is hardly any difference between ddraw_masked_blit() and ddraw_do_stretch_blit(), nothing worth noting anyway. In order to state the obvious I debugged the stretch_blit at the point of crash and it fails on the draw:</p><p>hr = IDirectDrawSurface2_Blt(DDRAW_SURFACE_OF(dest_parent)-&gt;id, &amp;dest_rect,<br />DDRAW_SURFACE_OF(source_parent)-&gt;id, &amp;source_rect,<br />(masked ? DDBLT_KEYSRC : 0) | DDBLT_WAIT, NULL);</p><p>I can only summise that it must be a bug inside the _Blt function or perhaps my video card has a fault?
</p></div></div><p>
Not nescessarily. To the best of my knowledge normal Allegro memory bitmaps don&#39;t have a DirectX drawing surface associated with them, so based on that idea (which I don&#39;t actually know if it&#39;s accurate or not) I would expect that code to crash if given a memory bitmap. I should have taken a little more time to explain what I was thinking when I asked if normal blits work.</p><p>The ddraw_stretch_blit and ddraw_blit functions are virtually identical, which suggests that the problem is not in there, but in blit() or stretch_blit() itself. What I was thinking is that maybe blit() checks if the destination surface is also a video bitmap before calling the hardware accelerated function. I know stretch_blit() does no such test and if that&#39;s the difference it can account for the one crashing and the other not.<br />Checking if this is really the difference is something I could do fairly quickly later on just by having a look at the source for blit().
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 19 Jan 2006 20:19:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In blit.c in the src directory blit() does this:
</p><div class="source-code snippet"><div class="inner"><pre>      <span class="c">/* drawing onto memory bitmaps */</span>
      <span class="k1">if</span> <span class="k2">(</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/is_video_bitmap" target="_blank"><span class="a">is_video_bitmap</span></a><span class="k2">(</span>src<span class="k2">)</span><span class="k2">)</span> <span class="k3">|</span><span class="k3">|</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>src<span class="k2">)</span><span class="k2">)</span><span class="k2">)</span>
         src-&gt;vtable-&gt;blit_to_memory<span class="k2">(</span>src, dest, s_x, s_y, d_x, d_y, w, h<span class="k2">)</span><span class="k2">;</span>
      <span class="k1">else</span>
         dest-&gt;vtable-&gt;blit_to_self<span class="k2">(</span>src, dest, s_x, s_y, d_x, d_y, w, h<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
This is the code for blitting video/system onto memory, which is as you say, checks what to do, which I guess is why standard blit works.</p><p>I got a bit confused as to stretch_blit as the only obvious place was cstretch.c in src\c and istretch.c in the i386 directory. I don&#39;t know which is being called.</p><p>However, in istretch.c it does say that the code is a bit dodgy, but it does no checks on bitmap type, however if source-&gt;vtable-&gt;do_stretch_blit is set then it just calls do_stretch_blit() which doesn&#39;t have any checks either on whether the source/dest are video-&gt;memory.</p><p>In cstretch.c it does:
</p><div class="source-code snippet"><div class="inner"><pre>   <span class="p">#ifdef ALLEGRO_MPW</span>
      <span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>src<span class="k2">)</span> <span class="k3">&amp;</span><span class="k3">&amp;</span> <a href="http://www.allegro.cc/manual/is_system_bitmap" target="_blank"><span class="a">is_system_bitmap</span></a><span class="k2">(</span>dst<span class="k2">)</span><span class="k2">)</span>
         system_stretch_blit<span class="k2">(</span>src, dst, sx, sy, sw, sh, dx, dy, dw, dh<span class="k2">)</span><span class="k2">;</span>
      <span class="k1">else</span>
   <span class="p">#endif</span>
         _al_stretch_blit<span class="k2">(</span>src, dst, sx, sy, sw, sh, dx, dy, dw, dh, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

I don&#39;t know what ALLEGRO_MPW is or whether either function does dst bitmap type checks.</p><p>Guessing I say it is calling the function in istretch.c because the vtable function is getting called and that does no checks?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 19 Jan 2006 23:16:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>MPW is Macintosh Programmer&#39;s Workshop - it was Apple&#39;s IDE for development on Mac OS &#39;classic&#39; i.e. version 9 and earlier. There was a partial Mac port but IIRC it was never complete. Any MPW code is obsolete now, of course.</p><p>Pete
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Fri, 20 Jan 2006 00:29:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In that case, the function in istretch.c must be the fault like Evert said. I&#39;ll give the code a tweak tonight (unless Evert beats me to it) and see if it works.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Fri, 20 Jan 2006 02:09:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I got a bit confused as to stretch_blit as the only obvious place was cstretch.c in src\c and istretch.c in the i386 directory. I don&#39;t know which is being called.
</p></div></div><p>
It depends: the code on src/c is compiled if Allegro is compiled without ASM code (it&#39;s the code that&#39;s always used when not using an i386 or compatible computer), the code in src/i386 is used when Allegro is compiled with assmebler code. The stretch_blit code is a bit of self-modifying code, which is sortof neat but also quite evil.<br />Both need to be fixed, but see below.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
however if source-&gt;vtable-&gt;do_stretch_blit is set then it just calls do_stretch_blit()
</p></div></div><p>
Yes. Actually, when I think about it this is the proper way to do it: this bitmap type (each bitmap type, memory, system and video, has its own vtable) has a dedicated special-purpose function that knows how to do stretch_blit better than the general purpose code. I feel that stretch_blit() itself should not try to guess when the vtable function should or should not be used. Instead, the vtable function should fall back on the software blitter in case it decides that it cannot use hardware acceleration. In this sense, I think blit() is at fault from an object-oriented point of view, but we&#39;ll leave it as is for 4.2.<br />So I think the proper fix would be to add
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">if</span> <span class="k2">(</span><a href="http://www.allegro.cc/manual/is_memory_bitmap" target="_blank"><span class="a">is_memory_bitmap</span></a><span class="k2">(</span>dest<span class="k2">)</span><span class="k2">)</span> <span class="k2">{</span>
   _orig_stretch_blit<span class="k2">(</span>source, dest, source_x, source_y, source_width, source_height, dest_x, dest_y, dest_width, dest_height, masked<span class="k2">)</span><span class="k2">;</span>
   <span class="k1">return</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p> to ddraw_do_stretch_blit before the first check.<br />Alternatively, only call the vtable function when dest is not a memory bitmap, but as I said, I think the check should be in the special-purpose function.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Any MPW code is obsolete now, of course.
</p></div></div><p>
Yeah, we should probably remove it as we go. I don&#39;t think it ever actually worked anyway.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 20 Jan 2006 05:26:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It still crashes. Even if I put the _orig function at the top of the do_stretch function and call it regardless. I can&#39;t really follow all the vtable stuff so I guess something is going wrong somewhere as it works with the non-accelerated code changes. I put the change in ddraw_do_stretch_blit.</p><p>btw, it isn&#39;t exactly a huge speed increase, but at the top of most of the ddraw blit functions there are about 10 lines of calculations for dest_rect and source_rect and src_key. They are only used when the acceleration check is made, so I guess it would make sense to move them into the statement to gain a teeny weeny increase in speed. I tried it and it works fine.</p><p>Is it possible to make unaccelerated calls to the blit, etc. functions when code would normally route it to the accelerated functions? is it just a matter of changing the gfx flag at runtime to disable the feature, or is this a bad thing to do?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 21 Jan 2006 04:39:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It still crashes. Even if I put the _orig function at the top of the do_stretch function and call it regardless.
</p></div></div><p>
That doesn&#39;t make sense if the original version worked. Does it also crash if you remove the vtable check and call?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I can&#39;t really follow all the vtable stuff
</p></div></div><p>
The DirectX driver sets the vtable entry for do_stretch_blit() in the video-bitmap vtable to the DirectX hardware accelerated version.<br />When stretch_blit is called, it checks if the source bitmap vtable has an entry for do_stretch_blit() and if it does it calls it and returns, otherwise it calls the general-purpose software blitter.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I put the change in ddraw_do_stretch_blit.
</p></div></div><p>
That would be correct.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
btw, it isn&#39;t exactly a huge speed increase,
</p></div></div><p>
Have you disabled vsync?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
but at the top of most of the ddraw blit functions there are about 10 lines of calculations for dest_rect and source_rect and src_key. They are only used when the acceleration check is made, so I guess it would make sense to move them into the statement to gain a teeny weeny increase in speed.
</p></div></div><p>
If you&#39;re right it does make sense, but not because of speed gain. I would be highly surprised if that were measurable.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Is it possible to make unaccelerated calls to the blit, etc. functions when code would normally route it to the accelerated functions?
</p></div></div><p>
Not cleanly, no (hackishly, you <i>can</i> change the vtable manually in user code). You can switch to a non-hardware accelerated driver (the DX soft one; it&#39;s the same as the regular DX driver except that it doesn&#39;t activate any of the accelerated features).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
is it just a matter of changing the gfx flag at runtime to disable the feature, or is this a bad thing to do?
</p></div></div><p>
You cannot change the flag. The gfx_capabilities are logically read only and should never be changed from user code.<br />In general, it wouldn&#39;t have any effect anyway (the functions should only be called if the flag is set, otherwise it&#39;s a bug in Allegro). For do_stretch_blit() I believe the flags are checked, but that is certainly not the general case.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 21 Jan 2006 04:51:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, that&#39;s what happened. I put the _orig as the first line of code in the function and it crashed. To make sure I was using the right file and the right thing was being called, I simply put in a return as the first statement and it worked (i.e. nothing was displayed). Anyway, I&#39;ll recompile with debug and see where it falls over.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I would be highly surprised if that were measurable.
</p></div></div><p>A little bit here, a little bit there <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I guess if you call the function 60 times a second for each of 300 sprites on your screen, those 10 lines of additions might add up to a tiny saving?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Sat, 21 Jan 2006 05:12:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, proposed patch attached. It&#39;s basically the same one as the previous one except that the accelerated function is never called if the destination surface is a memory bitmap.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
A little bit here, a little bit there <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> I guess if you call the function 60 times a second for each of 300 sprites on your screen, those 10 lines of additions might add up to a tiny saving?
</p></div></div><p>
I highly doubt it; moreso because the likely case is that the function <i>does</i> work properly. But if you can show some benchmarks that clearly show an improvement, then by all means share them!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 22 Jan 2006 21:49:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>sorry to appear like a complete moron, but i got somewhat lost in all the above banter, it all sounds good thou!</p><p>can you tell me:  Does this patch do Vram-&gt;Vram accelerated bliting?</p><p>as far as i can decipher, some problem occured that has left it in a &quot;depends on your grafix card&quot; answer...  which (vram-&gt; sys-&gt; mem-&gt;) acceleration is working, and which ones are &quot;depends on your gfx card&quot; ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Sun, 22 Jan 2006 23:06:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
can you tell me: Does this patch do Vram-&gt;Vram accelerated bliting?
</p></div></div><p>
No, that&#39;s been in there since... forever.<br />It does do hardware accelerated vram-&gt;vram stretch blits though.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
which (vram-&gt; sys-&gt; mem-&gt;) acceleration is working
</p></div></div><p>
All of them, in principle. Some cards may have issues with {sys,vram}&lt;-&gt;{sys,vram} blitting, but that&#39;s something someone else will need to look into to work around or fix.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 22 Jan 2006 23:10:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>sorry; thats what i meant; accelerated vram-vram strech blit... that is fantastic news, well done everyone.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Sun, 22 Jan 2006 23:20:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s done accelerated vram-vram for a while AJ, just there kept popping up new errors as I&#39;ve been testing. This last fix, was to stop it from crashing when you mix memory and system/video bitmaps.</p><p>Thanks, Evert, I&#39;ll try the code tonight, I&#39;ve been busy decorating to try much the last few days.</p><p>Once it&#39;s all working I was planning on doing some benchmarks on the various bitmap types (memory, system, video) and see how they cope under light and heavy stressing and how they work using different combinations (e.g. vram-&gt;memory, system-&gt;bitmap, etc).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Mon, 23 Jan 2006 03:11:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Neil, not sure if you&#39;ve been following my other thread<br /><a href="http://www.allegro.cc/forums/thread/560858">http://www.allegro.cc/forums/thread/560858</a><br />i have some SSE2 code that im trying out for mem-&gt;mem blit that is fast, and the rectfill stuff too.</p><p>I&#39;d be very interested in seeing your benchmark results.<br />espeacially showing different stress levels.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Mon, 23 Jan 2006 03:28:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That code change works, Evert, check the code in there are zero bugs for all permutations <br /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />:):):):):):):):):):):):):):):)</p><p>The only thing that doesn&#39;t work is the odd halo effect on vram-vram stretching. Thomas seems to think it is a bug. However, a bug is a bug is a thing that won&#39;t work for people. What to do?</p><p>Anyway, attached is a windows alleg42.dll (and updated gfx.h) if anyone wants to use the new accelerated stretching and correct destruction of system sub-bitmaps.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Mon, 23 Jan 2006 05:59:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Neil, is this vram-&gt;vram stretching halo thing look bad ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Tue, 24 Jan 2006 13:19:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes. Do you want me to attach an example program showing it? It could be a good test to see if it is on some machines only.</p><p>Either way, it sort of defeats the object of accelerated stretching when you can&#39;t stretch vram-vram!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 24 Jan 2006 15:17:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>attach the example neil, i&#39;ll have time to test.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 15:21:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Attached is almost everything you need and it will start by default with video buffer (paging) and store the bitmaps to show as video. </p><p>On running you should see the larger three ufo&#39;s and they should have a magenta edge to them. The full magenta one is fine as that is a stretch_blit. The little sprites to the right should be fine as they aren&#39;t stretched.</p><p>The top line should also state that it is in paging mode. If it doesn&#39;t and says double buffer, it means creating screen video bitmaps failed.</p><p>Also, if you do not get the effect, press ESCape and open up the produced &#39;animation.log&#39; file. You should see an entry that says how the graphics were created, i.e.</p><p>normal: Animation Frame Constructor: sheet.bmp<br />normal: sheet.bmp Image: 0xacc3c0<br />normal: Bitmap wanted to be Video<br />normal: Got video</p><p>Now, to see it working properly, edit the config.xml file and change the entry: graphicsmode=&quot;2&quot; to graphicsmode=&quot;0&quot;. This will change the buffer from video paging to memory double buffering. </p><p>If you want to see how other permutations work you can change this to 1 for system double buffering, 3 for triple buffering (though you will have to change the &#39;autodetect&#39; to &#39;fullscreen&#39;), and you can edit the animations.xml file to change teh actual bitmaps, i.e. find the global/bmp_type and change it from 3 to another value. 1 is memory, 2 is system, 3 is video.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 24 Jan 2006 18:20:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#039;t see the wrong pixel, even in fullscreen mode.</p><p>animation:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">   1</span>normal: Animation Library Constructor
<span class="number">   2</span>normal: Animation FPS set to <span class="n">60</span>
<span class="number">   3</span>normal: Maximum animation graphic will be <span class="n">3</span>
<span class="number">   4</span>normal: Animation Not <span class="k1">using</span> FBlend. 
<span class="number">   5</span>normal: <span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number">   6</span>normal: Loading Animation XML: <span class="s">'animations.xml'</span>
<span class="number">   7</span>normal: <span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number">   8</span>normal: Destroying All Animations
<span class="number">   9</span>normal: Reading Globals
<span class="number">  10</span>normal: Reading Single Graphics First
<span class="number">  11</span>normal: Adding single bitmap: sheet.bmp
<span class="number">  12</span>normal: Animation Frames Constructor: master
<span class="number">  13</span>normal: Animation Frame Constructor: sheet.bmp
<span class="number">  14</span>normal: sheet.bmp Image: <span class="n">0xbfb5a8</span>
<span class="number">  15</span>normal: Bitmap wanted to be Video
<span class="number">  16</span>normal: Got video
<span class="number">  17</span>normal: New Image after video conversion is <span class="n">0xbdc9c8</span>
<span class="number">  18</span>normal: PPCOL To Be Created
<span class="number">  19</span>normal: Creating PPCOL_MASK
<span class="number">  20</span>normal: PPCOL created.
<span class="number">  21</span>normal: Animation frame added: sheet.bmp <span class="k2">:</span> <span class="n">0xbdc9c8</span>
<span class="number">  22</span>normal: Graphic item success, adding to list
<span class="number">  23</span>normal: animation: master framewait set from ms <span class="k1">and</span> fps
<span class="number">  24</span>normal: animation master added
<span class="number">  25</span>normal: Graphic Animation item success, adding to list
<span class="number">  26</span>normal: animation master added
<span class="number">  27</span>normal: Adding single bitmap: logo.bmp
<span class="number">  28</span>normal: Animation Frames Constructor: logo
<span class="number">  29</span>normal: Animation Frame Constructor: logo.bmp
<span class="number">  30</span>normal: logo.bmp Image: <span class="n">0xbfb228</span>
<span class="number">  31</span>normal: Bitmap wanted to be Video
<span class="number">  32</span>normal: Got video
<span class="number">  33</span>normal: New Image after video conversion is <span class="n">0xbfb0d0</span>
<span class="number">  34</span>normal: PPCOL To Be Created
<span class="number">  35</span>normal: Creating PPCOL_MASK
<span class="number">  36</span>normal: PPCOL created.
<span class="number">  37</span>normal: Animation frame added: logo.bmp <span class="k2">:</span> <span class="n">0xbfb0d0</span>
<span class="number">  38</span>normal: Graphic item success, adding to list
<span class="number">  39</span>normal: animation: logo framewait set from ms <span class="k1">and</span> fps
<span class="number">  40</span>normal: animation logo added
<span class="number">  41</span>normal: Graphic Animation item success, adding to list
<span class="number">  42</span>normal: animation logo added
<span class="number">  43</span>normal: finished loading graphics OK
<span class="number">  44</span>normal: Reading Animations
<span class="number">  45</span>normal: Animation Frames Constructor: ufo
<span class="number">  46</span>normal: Animation Frame Constructor: 
<span class="number">  47</span>normal: Sub-Bitmap is tiled from a master <span class="k1">and</span> uses that bitmap type
<span class="number">  48</span>normal: Master image is <span class="n">0xbdc9c8</span>
<span class="number">  49</span>normal: tile x<span class="k3">/</span>y: <span class="n">0</span>,<span class="n">0</span> W<span class="k3">/</span>H: <span class="n">32</span>,<span class="n">32</span> Calc X<span class="k3">/</span>Y: <span class="n">0</span>,<span class="n">0</span> Image: <span class="n">0xbd5b10</span>
<span class="number">  50</span>normal: Parent image is: sheet.bmp
<span class="number">  51</span>normal: bitmap type is Video as <span class="k1">this</span> Sub-Bitmap<span class="s">'s parent is Video</span>
<span class="number">  52</span><span class="s">normal: Sub-Bitmap created</span>
<span class="number">  53</span><span class="s">normal: PPCOL To Be Created</span>
<span class="number">  54</span><span class="s">normal: Creating PPCOL_MASK</span>
<span class="number">  55</span><span class="s">normal: PPCOL created.</span>
<span class="number">  56</span><span class="s">normal: Animation frame added:  : 0xbd5b10</span>
<span class="number">  57</span><span class="s">normal: Animation item success, adding to list</span>
<span class="number">  58</span><span class="s">normal: animation: ufo framewait set from ms and fps</span>
<span class="number">  59</span><span class="s">normal: animation ufo added</span>
<span class="number">  60</span><span class="s">normal: Animation Frame Constructor: </span>
<span class="number">  61</span><span class="s">normal: Sub-Bitmap is tiled from a master and uses that bitmap type</span>
<span class="number">  62</span><span class="s">normal: Master image is 0xbdc9c8</span>
<span class="number">  63</span><span class="s">normal: tile x/y: 1,0 W/H: 32,32 Calc X/Y: 32,0 Image: 0xbd4508</span>
<span class="number">  64</span><span class="s">normal: Parent image is: sheet.bmp</span>
<span class="number">  65</span><span class="s">normal: bitmap type is Video as this Sub-Bitmap'</span>s parent is Video
<span class="number">  66</span>normal: Sub-Bitmap created
<span class="number">  67</span>normal: PPCOL To Be Created
<span class="number">  68</span>normal: Creating PPCOL_MASK
<span class="number">  69</span>normal: PPCOL created.
<span class="number">  70</span>normal: Animation frame added:  <span class="k2">:</span> <span class="n">0xbd4508</span>
<span class="number">  71</span>normal: Animation item success, adding to list
<span class="number">  72</span>normal: animation ufo added
<span class="number">  73</span>normal: Animation Frame Constructor: 
<span class="number">  74</span>normal: Sub-Bitmap is tiled from a master <span class="k1">and</span> uses that bitmap type
<span class="number">  75</span>normal: Master image is <span class="n">0xbdc9c8</span>
<span class="number">  76</span>normal: tile x<span class="k3">/</span>y: <span class="n">2</span>,<span class="n">0</span> W<span class="k3">/</span>H: <span class="n">32</span>,<span class="n">32</span> Calc X<span class="k3">/</span>Y: <span class="n">64</span>,<span class="n">0</span> Image: <span class="n">0xbfb880</span>
<span class="number">  77</span>normal: Parent image is: sheet.bmp
<span class="number">  78</span>normal: bitmap type is Video as <span class="k1">this</span> Sub-Bitmap<span class="s">'s parent is Video</span>
<span class="number">  79</span><span class="s">normal: Sub-Bitmap created</span>
<span class="number">  80</span><span class="s">normal: PPCOL To Be Created</span>
<span class="number">  81</span><span class="s">normal: Creating PPCOL_MASK</span>
<span class="number">  82</span><span class="s">normal: PPCOL created.</span>
<span class="number">  83</span><span class="s">normal: Animation frame added:  : 0xbfb880</span>
<span class="number">  84</span><span class="s">normal: Animation item success, adding to list</span>
<span class="number">  85</span><span class="s">normal: animation ufo added</span>
<span class="number">  86</span><span class="s">normal: Animation Frame Constructor: </span>
<span class="number">  87</span><span class="s">normal: Sub-Bitmap is tiled from a master and uses that bitmap type</span>
<span class="number">  88</span><span class="s">normal: Master image is 0xbdc9c8</span>
<span class="number">  89</span><span class="s">normal: tile x/y: 3,0 W/H: 32,32 Calc X/Y: 96,0 Image: 0xbfba68</span>
<span class="number">  90</span><span class="s">normal: Parent image is: sheet.bmp</span>
<span class="number">  91</span><span class="s">normal: bitmap type is Video as this Sub-Bitmap'</span>s parent is Video
<span class="number">  92</span>normal: Sub-Bitmap created
<span class="number">  93</span>normal: PPCOL To Be Created
<span class="number">  94</span>normal: Creating PPCOL_MASK
<span class="number">  95</span>normal: PPCOL created.
<span class="number">  96</span>normal: Animation frame added:  <span class="k2">:</span> <span class="n">0xbfba68</span>
<span class="number">  97</span>normal: Animation item success, adding to list
<span class="number">  98</span>normal: animation ufo added
<span class="number">  99</span>normal: Animation Frame Constructor: 
<span class="number"> 100</span>normal: Sub-Bitmap is tiled from a master <span class="k1">and</span> uses that bitmap type
<span class="number"> 101</span>normal: Master image is <span class="n">0xbdc9c8</span>
<span class="number"> 102</span>normal: tile x<span class="k3">/</span>y: <span class="n">4</span>,<span class="n">0</span> W<span class="k3">/</span>H: <span class="n">32</span>,<span class="n">32</span> Calc X<span class="k3">/</span>Y: <span class="n">128</span>,<span class="n">0</span> Image: <span class="n">0xbfbc98</span>
<span class="number"> 103</span>normal: Parent image is: sheet.bmp
<span class="number"> 104</span>normal: bitmap type is Video as <span class="k1">this</span> Sub-Bitmap<span class="s">'s parent is Video</span>
<span class="number"> 105</span><span class="s">normal: Sub-Bitmap created</span>
<span class="number"> 106</span><span class="s">normal: PPCOL To Be Created</span>
<span class="number"> 107</span><span class="s">normal: Creating PPCOL_MASK</span>
<span class="number"> 108</span><span class="s">normal: PPCOL created.</span>
<span class="number"> 109</span><span class="s">normal: Animation frame added:  : 0xbfbc98</span>
<span class="number"> 110</span><span class="s">normal: Animation item success, adding to list</span>
<span class="number"> 111</span><span class="s">normal: animation ufo added</span>
<span class="number"> 112</span><span class="s">normal: Animation Frame Constructor: </span>
<span class="number"> 113</span><span class="s">normal: Sub-Bitmap is tiled from a master and uses that bitmap type</span>
<span class="number"> 114</span><span class="s">normal: Master image is 0xbdc9c8</span>
<span class="number"> 115</span><span class="s">normal: tile x/y: 5,0 W/H: 32,32 Calc X/Y: 160,0 Image: 0xbfbef0</span>
<span class="number"> 116</span><span class="s">normal: Parent image is: sheet.bmp</span>
<span class="number"> 117</span><span class="s">normal: bitmap type is Video as this Sub-Bitmap'</span>s parent is Video
<span class="number"> 118</span>normal: Sub-Bitmap created
<span class="number"> 119</span>normal: PPCOL To Be Created
<span class="number"> 120</span>normal: Creating PPCOL_MASK
<span class="number"> 121</span>normal: PPCOL created.
<span class="number"> 122</span>normal: Animation frame added:  <span class="k2">:</span> <span class="n">0xbfbef0</span>
<span class="number"> 123</span>normal: Animation item success, adding to list
<span class="number"> 124</span>normal: animation ufo added
<span class="number"> 125</span>normal: Animation Frame Constructor: 
<span class="number"> 126</span>normal: Sub-Bitmap is tiled from a master <span class="k1">and</span> uses that bitmap type
<span class="number"> 127</span>normal: Master image is <span class="n">0xbdc9c8</span>
<span class="number"> 128</span>normal: tile x<span class="k3">/</span>y: <span class="n">6</span>,<span class="n">0</span> W<span class="k3">/</span>H: <span class="n">32</span>,<span class="n">32</span> Calc X<span class="k3">/</span>Y: <span class="n">192</span>,<span class="n">0</span> Image: <span class="n">0xbdbaf0</span>
<span class="number"> 129</span>normal: Parent image is: sheet.bmp
<span class="number"> 130</span>normal: bitmap type is Video as <span class="k1">this</span> Sub-Bitmap<span class="s">'s parent is Video</span>
<span class="number"> 131</span><span class="s">normal: Sub-Bitmap created</span>
<span class="number"> 132</span><span class="s">normal: PPCOL To Be Created</span>
<span class="number"> 133</span><span class="s">normal: Creating PPCOL_MASK</span>
<span class="number"> 134</span><span class="s">normal: PPCOL created.</span>
<span class="number"> 135</span><span class="s">normal: Animation frame added:  : 0xbdbaf0</span>
<span class="number"> 136</span><span class="s">normal: Animation item success, adding to list</span>
<span class="number"> 137</span><span class="s">normal: animation ufo added</span>
<span class="number"> 138</span><span class="s">normal: Animation Frame Constructor: </span>
<span class="number"> 139</span><span class="s">normal: Sub-Bitmap is tiled from a master and uses that bitmap type</span>
<span class="number"> 140</span><span class="s">normal: Master image is 0xbdc9c8</span>
<span class="number"> 141</span><span class="s">normal: tile x/y: 7,0 W/H: 32,32 Calc X/Y: 224,0 Image: 0xbdbd20</span>
<span class="number"> 142</span><span class="s">normal: Parent image is: sheet.bmp</span>
<span class="number"> 143</span><span class="s">normal: bitmap type is Video as this Sub-Bitmap'</span>s parent is Video
<span class="number"> 144</span>normal: Sub-Bitmap created
<span class="number"> 145</span>normal: PPCOL To Be Created
<span class="number"> 146</span>normal: Creating PPCOL_MASK
<span class="number"> 147</span>normal: PPCOL created.
<span class="number"> 148</span>normal: Animation frame added:  <span class="k2">:</span> <span class="n">0xbdbd20</span>
<span class="number"> 149</span>normal: Animation item success, adding to list
<span class="number"> 150</span>normal: animation ufo added
<span class="number"> 151</span>normal: Animation item success, adding to list
<span class="number"> 152</span>normal: animation ufo added
<span class="number"> 153</span>normal: Animation Frames Constructor: fuel
<span class="number"> 154</span>normal: Using sequence count <span class="k1">for</span> tiles
<span class="number"> 155</span>normal: Animation Frame Constructor: sheet.bmp
<span class="number"> 156</span>normal: Sub-Bitmap is tiled from a master <span class="k1">and</span> uses that bitmap type
<span class="number"> 157</span>normal: Master image is <span class="n">0xbdc9c8</span>
<span class="number"> 158</span>normal: tile x<span class="k3">/</span>y: <span class="n">0</span>,<span class="n">0</span> W<span class="k3">/</span>H: <span class="n">24</span>,<span class="n">24</span> Calc X<span class="k3">/</span>Y: <span class="n">0</span>,<span class="n">32</span> Image: <span class="n">0xbdbfb8</span>
<span class="number"> 159</span>normal: Parent image is: sheet.bmp
<span class="number"> 160</span>normal: bitmap type is Video as <span class="k1">this</span> Sub-Bitmap<span class="s">'s parent is Video</span>
<span class="number"> 161</span><span class="s">normal: Sub-Bitmap created</span>
<span class="number"> 162</span><span class="s">normal: PPCOL To Be Created</span>
<span class="number"> 163</span><span class="s">normal: Creating PPCOL_MASK</span>
<span class="number"> 164</span><span class="s">normal: PPCOL created.</span>
<span class="number"> 165</span><span class="s">normal: Animation frame added: sheet.bmp : 0xbdbfb8</span>
<span class="number"> 166</span><span class="s">normal: Animation item success, adding to list</span>
<span class="number"> 167</span><span class="s">normal: animation: fuel framewait set from ms and fps</span>
<span class="number"> 168</span><span class="s">normal: animation fuel added</span>
<span class="number"> 169</span><span class="s">normal: Animation Frame Constructor: sheet.bmp</span>
<span class="number"> 170</span><span class="s">normal: Sub-Bitmap is tiled from a master and uses that bitmap type</span>
<span class="number"> 171</span><span class="s">normal: Master image is 0xbdc9c8</span>
<span class="number"> 172</span><span class="s">normal: tile x/y: 1,0 W/H: 24,24 Calc X/Y: 24,32 Image: 0xbdc160</span>
<span class="number"> 173</span><span class="s">normal: Parent image is: sheet.bmp</span>
<span class="number"> 174</span><span class="s">normal: bitmap type is Video as this Sub-Bitmap'</span>s parent is Video
<span class="number"> 175</span>normal: Sub-Bitmap created
<span class="number"> 176</span>normal: PPCOL To Be Created
<span class="number"> 177</span>normal: Creating PPCOL_MASK
<span class="number"> 178</span>normal: PPCOL created.
<span class="number"> 179</span>normal: Animation frame added: sheet.bmp <span class="k2">:</span> <span class="n">0xbdc160</span>
<span class="number"> 180</span>normal: Animation item success, adding to list
<span class="number"> 181</span>normal: animation fuel added
<span class="number"> 182</span>normal: Animation Frame Constructor: sheet.bmp
<span class="number"> 183</span>normal: Sub-Bitmap is tiled from a master <span class="k1">and</span> uses that bitmap type
<span class="number"> 184</span>normal: Master image is <span class="n">0xbdc9c8</span>
<span class="number"> 185</span>normal: tile x<span class="k3">/</span>y: <span class="n">2</span>,<span class="n">0</span> W<span class="k3">/</span>H: <span class="n">24</span>,<span class="n">24</span> Calc X<span class="k3">/</span>Y: <span class="n">48</span>,<span class="n">32</span> Image: <span class="n">0xbdc350</span>
<span class="number"> 186</span>normal: Parent image is: sheet.bmp
<span class="number"> 187</span>normal: bitmap type is Video as <span class="k1">this</span> Sub-Bitmap<span class="s">'s parent is Video</span>
<span class="number"> 188</span><span class="s">normal: Sub-Bitmap created</span>
<span class="number"> 189</span><span class="s">normal: PPCOL To Be Created</span>
<span class="number"> 190</span><span class="s">normal: Creating PPCOL_MASK</span>
<span class="number"> 191</span><span class="s">normal: PPCOL created.</span>
<span class="number"> 192</span><span class="s">normal: Animation frame added: sheet.bmp : 0xbdc350</span>
<span class="number"> 193</span><span class="s">normal: Animation item success, adding to list</span>
<span class="number"> 194</span><span class="s">normal: animation fuel added</span>
<span class="number"> 195</span><span class="s">normal: Animation Frame Constructor: sheet.bmp</span>
<span class="number"> 196</span><span class="s">normal: Sub-Bitmap is tiled from a master and uses that bitmap type</span>
<span class="number"> 197</span><span class="s">normal: Master image is 0xbdc9c8</span>
<span class="number"> 198</span><span class="s">normal: tile x/y: 3,0 W/H: 24,24 Calc X/Y: 72,32 Image: 0xbdc540</span>
<span class="number"> 199</span><span class="s">normal: Parent image is: sheet.bmp</span>
<span class="number"> 200</span><span class="s">normal: bitmap type is Video as this Sub-Bitmap'</span>s parent is Video
<span class="number"> 201</span>normal: Sub-Bitmap created
<span class="number"> 202</span>normal: PPCOL To Be Created
<span class="number"> 203</span>normal: Creating PPCOL_MASK
<span class="number"> 204</span>normal: PPCOL created.
<span class="number"> 205</span>normal: Animation frame added: sheet.bmp <span class="k2">:</span> <span class="n">0xbdc540</span>
<span class="number"> 206</span>normal: Animation item success, adding to list
<span class="number"> 207</span>normal: animation fuel added
<span class="number"> 208</span>normal: Animation item success, adding to list
<span class="number"> 209</span>normal: animation fuel added
<span class="number"> 210</span>normal: finished loading animations
<span class="number"> 211</span>normal: Animation Library Destructor
<span class="number"> 212</span>normal: Destroying All Animations
<span class="number"> 213</span>normal: Animation Frames Destructor: fuel
<span class="number"> 214</span>normal: Animation Frame Destructor: A Sub: sheet.bmp:0xbdbfb8
<span class="number"> 215</span>normal: Mask Deleted
<span class="number"> 216</span>normal: Animation Frame Destructor: A Sub: sheet.bmp:0xbdc160
<span class="number"> 217</span>normal: Mask Deleted
<span class="number"> 218</span>normal: Animation Frame Destructor: A Sub: sheet.bmp:0xbdc350
<span class="number"> 219</span>normal: Mask Deleted
<span class="number"> 220</span>normal: Animation Frame Destructor: A Sub: sheet.bmp:0xbdc540
<span class="number"> 221</span>normal: Mask Deleted
<span class="number"> 222</span>normal: Animation Frames Destructor: logo
<span class="number"> 223</span>normal: Animation Frame Destructor <span class="k1">not</span> destroying image yet as a File <span class="k1">not</span> a subbitmap: logo.bmp:0xbfb0d0
<span class="number"> 224</span>normal: Mask Deleted
<span class="number"> 225</span>normal: Animation Frames Destructor: master
<span class="number"> 226</span>normal: Animation Frame Destructor <span class="k1">not</span> destroying image yet as a File <span class="k1">not</span> a subbitmap: sheet.bmp:0xbdc9c8
<span class="number"> 227</span>normal: Mask Deleted
<span class="number"> 228</span>normal: Animation Frames Destructor: ufo
<span class="number"> 229</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbd5b10</span>
<span class="number"> 230</span>normal: Mask Deleted
<span class="number"> 231</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbd4508</span>
<span class="number"> 232</span>normal: Mask Deleted
<span class="number"> 233</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbfb880</span>
<span class="number"> 234</span>normal: Mask Deleted
<span class="number"> 235</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbfba68</span>
<span class="number"> 236</span>normal: Mask Deleted
<span class="number"> 237</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbfbc98</span>
<span class="number"> 238</span>normal: Mask Deleted
<span class="number"> 239</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbfbef0</span>
<span class="number"> 240</span>normal: Mask Deleted
<span class="number"> 241</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbdbaf0</span>
<span class="number"> 242</span>normal: Mask Deleted
<span class="number"> 243</span>normal: Animation Frame Destructor: A Sub: <span class="k2">:</span><span class="n">0xbdbd20</span>
<span class="number"> 244</span>normal: Mask Deleted
<span class="number"> 245</span>normal: Destroying non subbitmap logo.bmp <span class="k2">:</span> <span class="n">0xbfb0d0</span>
<span class="number"> 246</span>normal: done deleting
<span class="number"> 247</span>normal: Destroying non subbitmap sheet.bmp <span class="k2">:</span> <span class="n">0xbdc9c8</span>
<span class="number"> 248</span>normal: done deleting
</div></div><p>

animationslogdebug:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span>GLOBALS <span class="k2">(</span>defaults<span class="k2">)</span>
<span class="number">  2</span>AutoMove: <span class="n">1</span>, frame wait: <span class="k3">-</span><span class="n">1</span>, millisecond wait: <span class="n">100</span>, fps: <span class="n">60</span>
<span class="number">  3</span>Loop types: LOOP_INVALID<span class="k3">=</span><span class="k3">-</span><span class="n">1</span>, LOOP_START<span class="k3">=</span><span class="n">0</span>,LOOP_REVERSEREPEAT<span class="k3">=</span><span class="n">1</span>,LOOP_REVERSEONCE<span class="k3">=</span><span class="n">2</span>, LOOP_REVERSEBACK<span class="k3">=</span><span class="n">3</span>, LOOP_ONCE<span class="k3">=</span><span class="n">4</span>
<span class="number">  4</span>Loop type: <span class="n">1</span>, depth: <span class="n">32</span>
<span class="number">  5</span>
<span class="number">  6</span>ANIMATIONS
<span class="number">  7</span>
<span class="number">  8</span>id: fuel, <span class="k1">default</span> frame wait: <span class="n">6</span>, <span class="k1">default</span> millisec wait: <span class="n">100</span>, <span class="k1">default</span> loop: <span class="n">1</span>
<span class="number">  9</span> Animation Frames
<span class="number"> 10</span>
<span class="number"> 11</span>id: logo, <span class="k1">default</span> frame wait: <span class="n">6</span>, <span class="k1">default</span> millisec wait: <span class="n">100</span>, <span class="k1">default</span> loop: <span class="k3">-</span><span class="n">1</span>
<span class="number"> 12</span> Animation Frames
<span class="number"> 13</span>
<span class="number"> 14</span>id: master, <span class="k1">default</span> frame wait: <span class="n">6</span>, <span class="k1">default</span> millisec wait: <span class="n">100</span>, <span class="k1">default</span> loop: <span class="n">1</span>
<span class="number"> 15</span> Animation Frames
<span class="number"> 16</span>
<span class="number"> 17</span>id: ufo, <span class="k1">default</span> frame wait: <span class="n">6</span>, <span class="k1">default</span> millisec wait: <span class="n">100</span>, <span class="k1">default</span> loop: <span class="n">0</span>
<span class="number"> 18</span> Animation Frames
</div></div><p>

config:
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span>Framework initialising with XML file
<span class="number">  2</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number">  3</span>Configuration object created <span class="k1">using</span> file
<span class="number">  4</span>Initialising Configuration <span class="k1">using</span> config.xml
<span class="number">  5</span>Processing config file <span class="k2">(</span>loaded <span class="k1">and</span> parsed ok<span class="k2">)</span>. Checking attribute syntax.
<span class="number">  6</span>  fps: wanted <span class="n">60</span> got <span class="n">60</span>
<span class="number">  7</span>  Match Refresh Rate: wanted <span class="n">0</span> got <span class="n">0</span>
<span class="number">  8</span>  Debug: wanted <span class="n">1</span> got <span class="n">1</span>
<span class="number">  9</span>  Mouse: wanted <span class="n">1</span> got <span class="n">1</span>
<span class="number"> 10</span>  Keyboard: wanted <span class="n">1</span> got <span class="n">1</span>
<span class="number"> 11</span>  Joystick: wanted <span class="n">0</span> got <span class="n">0</span>
<span class="number"> 12</span>  Sound: wanted <span class="n">1</span> got <span class="n">1</span>
<span class="number"> 13</span>  Midi: wanted <span class="n">1</span> got <span class="n">1</span>
<span class="number"> 14</span>  AutoWriteMain: wanted <span class="n">0</span> got <span class="n">0</span>
<span class="number"> 15</span>  AutoWriteCustom: wanted <span class="n">0</span> got <span class="n">0</span>
<span class="number"> 16</span>  Width: wanted <span class="n">640</span> got <span class="n">640</span>
<span class="number"> 17</span>  Height: wanted <span class="n">480</span> got <span class="n">480</span>
<span class="number"> 18</span>  Vsync: wanted <span class="n">0</span> got <span class="n">0</span>
<span class="number"> 19</span>  Depth: wanted <span class="n">32</span> got <span class="n">32</span>
<span class="number"> 20</span>  DepthFallback: wanted <span class="n">16</span> got <span class="n">16</span>
<span class="number"> 21</span>  WindowMode: wanted windowed got windowed
<span class="number"> 22</span>  WindowFallback: wanted <span class="k3">-</span><span class="n">1</span> got <span class="k3">-</span><span class="n">1</span>
<span class="number"> 23</span>  GraphicsMode: wanted <span class="n">2</span> got <span class="n">2</span>
<span class="number"> 24</span>  MaxSamples: wanted <span class="n">32</span> got <span class="n">32</span>
<span class="number"> 25</span>  SoundVolume: wanted <span class="n">150</span> got <span class="n">150</span>
<span class="number"> 26</span>  MusicVolume: wanted <span class="n">128</span> got <span class="n">128</span>
<span class="number"> 27</span>
<span class="number"> 28</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 29</span>Custom Strings
<span class="number"> 30</span>message has the value <span class="k1">this</span> <a href="http://www.allegro.cc/manual/line" target="_blank"><span class="a">line</span></a> is taken from the config.xml file
<span class="number"> 31</span>
<span class="number"> 32</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 33</span>Custom Ints
<span class="number"> 34</span>
<span class="number"> 35</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 36</span>Custom Floats
<span class="number"> 37</span>
<span class="number"> 38</span>END OF CONFIGURATION INITIALISATION
<span class="number"> 39</span>
<span class="number"> 40</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 41</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 42</span>Allegro <a href="http://www.delorie.com/djgpp/doc/libc/libc_802.html" target="_blank">system</a> starting
<span class="number"> 43</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 44</span>initialise keyboard
<span class="number"> 45</span>joystick skipped
<span class="number"> 46</span>initialise mouse
<span class="number"> 47</span>Sound samples available <span class="k3">-</span> detect_digi success
<span class="number"> 48</span>Sound <a href="http://www.allegro.cc/manual/MIDI" target="_blank"><span class="a">MIDI</span></a> available <span class="k3">-</span> detect_midi success
<span class="number"> 49</span>Sound installed correctly
<span class="number"> 50</span>Actual UseSound is true. Fully Successful
<span class="number"> 51</span>Actual UseMidi is true. Fully Successful
<span class="number"> 52</span>Graphics will <span class="k1">not</span> be capped, e.g. slow VRAM-&gt;MEMORY will be honoured
<span class="number"> 53</span>depth set to <span class="n">32</span>
<span class="number"> 54</span>Graphic selected as windowed. w<span class="k3">/</span>h set as <span class="n">640</span><span class="k3">/</span><span class="n">480</span>
<span class="number"> 55</span><span class="k1">auto</span> mode first tried
<span class="number"> 56</span>windowed mode selected
<span class="number"> 57</span>Newer Allegro <a href="http://www.delorie.com/djgpp/doc/libc/libc_802.html" target="_blank">system</a> that does text transparency <span class="k1">inline</span> found.
<span class="number"> 58</span>No change required, however <a href="http://www.delorie.com/djgpp/doc/libc/libc_802.html" target="_blank">system</a> returned the refresh rate as <span class="n">59</span>
<span class="number"> 59</span>Switch mode set to PAUSE
<span class="number"> 60</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 61</span>Allegro <a href="http://www.delorie.com/djgpp/doc/libc/libc_802.html" target="_blank">system</a> startup successful
<span class="number"> 62</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 63</span>framework initialised <span class="k1">and</span> in graphics mode
<span class="number"> 64</span>Got Paged Buffering
<span class="number"> 65</span>Sub System Finished initialising
<span class="number"> 66</span>The graphics mode the <a href="http://www.delorie.com/djgpp/doc/libc/libc_802.html" target="_blank">system</a> got was the one the configuration wanted
<span class="number"> 67</span>Loading animations
<span class="number"> 68</span>Maximum graphics type <span class="k1">for</span> loaded graphics<span class="k3">/</span>animations will be VIDEO as no capping is active
<span class="number"> 69</span>WARNING: Unless patched <span class="k2">(</span><span class="k1">or</span> version <span class="k3">&gt;</span><span class="n">4</span>.<span class="n">2</span><span class="k2">)</span> <span class="k1">and</span> sheet graphics are used, they will fail to display properly
<span class="number"> 70</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 71</span>Framework initialisation success
<span class="number"> 72</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 73</span>FPS timer created
<span class="number"> 74</span>game timer created
<span class="number"> 75</span>digi purge timer created
<span class="number"> 76</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 77</span>Framework sub-system success. Calling game loop
<span class="number"> 78</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 79</span>ESCape will <a href="http://www.delorie.com/djgpp/doc/libc/libc_37.html" target="_blank">abort</a> immediately
<span class="number"> 80</span>Game Loop Ended
<span class="number"> 81</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 82</span>Gameloop ended. Returning back to calling program
<span class="number"> 83</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span><span class="k3">-</span>
<span class="number"> 84</span>Destroying Framework From Destructor
<span class="number"> 85</span>Configuration object being deleted
<span class="number"> 86</span>Auto Flush main off so <span class="k1">not</span> writing back main values. Assumes manual Flush
<span class="number"> 87</span>Auto Flush custom off so <span class="k1">not</span> writing back main values. Assumes manual Flush
<span class="number"> 88</span>allegro destructor called.
<span class="number"> 89</span>Animation object being deleted
<span class="number"> 90</span>freeing graphic buffer
<span class="number"> 91</span>freeing graphic buffer
<span class="number"> 92</span><span class="k1">not</span> freeing graphic buffer as null. This is normal.
</div></div><p>

Test log only says started and finished :p</p><p>Do you see something anormal ? do you wanna me make some test with special graficmode || bitmap value ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 19:04:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
On running you should see the larger three ufo&#39;s and they should have a magenta edge to them.
</p></div></div><p>
It&#39;s my understanding that the purple outline is a DX bug that may or may not show up on your system.<br />Maybe there&#39;s something like anti-aliasing or smoothing that can be switched off to get it to work properly?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Tue, 24 Jan 2006 19:29:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It seems then that the &#39;this feature is card specific and may or may not work as expected&#39; property of the stretch function is active, i.e. it may or may not work on all computers. Maybe more people testing would help? Either way, do we (i.e. the Allegro coders) need to address this? maybe a flag in the stretch function to say whether to use accelerated stretching? This fault was found by Thomas Harte in a DX forum so I can&#39;t be alone.</p><p>I can&#39;t seem to find any old DX reference guides to look for any disable anti-alias type flags.</p><p>I&#39;ve got a GeForce 5200.</p><p>As an aside, this line seems odd though (its a call to get refresh rate): </p><p>system returned the refresh rate as 59</p><p>I thought all monitors/displays would return the usual 60, 70, 72, 75, 85, etc.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 24 Jan 2006 19:37:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I got a laptop. It&#39;s the refresh of the LCD screen, i can force it to 60 if you want.</p><p>I got a GeForce FX 5700 go. (maybe it can help to know where is the problem)</p><p>Can it be a driver issue ?</p><p>Have you test rolling back your drivers ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 19:40:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It seems then that the &#39;this feature is card specific and may or may not work as expected&#39; property of the stretch function is active, i.e. it may or may not work on all computers.
</p></div></div><p>
You mean, DX may or may not support it properly despite claiming that it does? <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Maybe more people testing would help?
</p></div></div><p>
Maybe.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Either way, do we (i.e. the Allegro coders) need to address this?
</p></div></div><p>
I say we (as in the developers) should do `something&#39; with this. Either we need a reliable way to detect if the bug will show up or not, or we need a way to work around it. There might be some settings you can pass to DX (having to do with things like anti-aliasing or smoothing) to make it behave sanely. That, however, is something that someone who is using Windows will need to investigate and look into (as in, I&#39;m not going to do it any time soon).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
maybe a flag in the stretch function to say whether to use accelerated stretching?
</p></div></div><p>
Right now, I think the code is such that you actually <i>can</i> disable it by masking it from gfx_capabilities. This is a hack though and if it works at all it&#39;s more by accident than a feature. There is no way in Allegro for the user to specify that he wants to use acceleration for some functions but not for others.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;ve got a GeForce 5200.
</p></div></div><p>
Windows and DX versions are probably relevant too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Tue, 24 Jan 2006 19:44:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK so, </p><p>It is working under my WindowsXpPro SP2,DirectX 9.0C</p><p>Grafic Card: GeForce Fx 5700 GO with 6.14.10.6212 drivers from nvidia.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 19:52:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve got dual boot XP, one with SP1 and one with SP2, one with DX8 and one with DX9 and they both fail. Sadly I can&#39;t try a different GeForce driver as I&#39;m limited to what Toshiba supply.</p><p>It would be nice, however, if Allegro let you choose displays (will this ever be a feature?) as I have two outputs but allegro always forces itself to the primary display, I could then try it with a different video driver as each display has it&#39;s own driver installed (though fair enough the same card).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I got a laptop. It&#39;s the refresh of the LCD screen, i can force it to 60 if you want.
</p></div></div><p>Nah, it got nothing to do with the test, it just seemed odd that your laptop is saying 59 and not 60.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 24 Jan 2006 19:54:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Working nice on my WindowsXpPro SP1 Directx9c , Intel 8215G Express
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 20:01:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;ve had it tested on:<br />Integrated Intel 82852 Graphics Controller<br />GeForce 7800 GTX <br />ATI Radeon X800XL</p><p>and they all work too.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 24 Jan 2006 20:39:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hmmm perhaps more a driver issue than a specific card or other.<br />Can you give me a link where i can download your non-working card drivers ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 20:42:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Firstly, someone tried it and it failed (hurrah, I&#39;m not alone!). It was a NVIDIA Quatro NVS.</p><p>I changed the Windows display property/&#39;Troubleshoot&#39; option to disable all DirectDraw accelerations and it worked fine. It still created and used video bitmaps though. Sounds like a bug in something or other to me <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>Anyway, It is a GeForce FX go5200 (i.e. the mobile version of 5200 series). The problem is I&#39;ve tried downloading the latest from nvidia but it crashes my computer so I don&#39;t know whether it is a modified driver for the Toshiba M2 I&#39;ve got or they&#39;ve kept using an older driver because of bugs. Anyway the version I use is:</p><p><a href="http://support.toshiba-tro.de/tools/Tecra/tm2/display-tm2-4644.zip">http://support.toshiba-tro.de/tools/Tecra/tm2/display-tm2-4644.zip</a></p><p>According to the property page, it is version 6.14 of the driver.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Tue, 24 Jan 2006 21:30:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Humpf. Have you tried to use one laptopvideo2go.com drivers ?</p><p>Try download one of them , you can found them <a href="http://www.laptopvideo2go.com">there</a></p><p>And this <a href="http://www.laptopvideo2go.com/forum/index.php?showtopic=8608">topic</a><br />seems to be helpfull for your grafic driver.</p><p>Searching in the forum gave me this <a href="http://www.laptopvideo2go.com/forum/index.php?showtopic=5688&amp;hl=go+5200">link</a> where i found latest modded GeForce FX 5200 drivers
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Tue, 24 Jan 2006 21:36:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i just tested in on  a  Nvidia Geforce4 MX 440 AGPx8 desktop. AMD64<br />DX9.0c  and it looks fine.</p><p>i also then tried it on my laptop:<br />Nvidia Geforce4 4200 Go (Dell Mobile)  AGP x4 64MB<br />on a Pentium M.</p><p>and it looks fine, no halo, no purple crap anyway; looks good !</p><p>also tested an  Geforce2 MX 100/200    and it was fine.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Tue, 24 Jan 2006 22:12:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
I think this effect is visible in OpenGL with alpha channel rotated quads (at least it&#39;s visible in OpenLayer). I think Flad is going to add a function to preprocess the image to expand the edges so the edge blends to the normal colour rather than purple.</p><p>Would it not be possible to use something like this as a fallback option?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Tue, 24 Jan 2006 23:54:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Would it not be possible to use something like this as a fallback option?
</p></div></div><p>
No, the problem with DirectDraw is that it doesn&#39;t seem to support an alpha channel, so the same fix doesn&#39;t work. If pixel colours are changed then they simply cease to be transparent. DirectDraw allows an arbitrary range of numerically contiguous colours to be transparent but unless the sprite has a fairly consistent edge colour I can&#39;t see how that can necessarily be much use. If the comparison allows for non visible parts of pixels, I guess we could use the unused space in 15 and 32bpp modes to produce an on/off alpha channel and recolour neighbouring pixels for an OpenLayer type effect.</p><p>In terms of figuring out when there are potential problems, presumably nobody sees any &quot;purple crap&quot; in 8bpp mode?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Wed, 25 Jan 2006 00:18:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="cuss"><span>FUCK</span></span> ME WITH A LARGE BARGE POLE!</p><p>Thanks gulladriel, I downloaded the nvidia update with the special &#39;modded inf&#39; file to get the standard drivers to work with laptops, and it works <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>So this thread can now be closed and we can lead happy allegro lives again.</p><p>The only odd thing, and hopefully someone can explain, is now when I use paging or triple buffering instead of the usual immediate start I get a black screen for maybe 3 seconds before anything starts?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 25 Jan 2006 03:00:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, so we can just tell people who get a purple outline when using the accelerated stretch_blit() to upgrade their drivers?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 25 Jan 2006 03:54:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yep. Hurrah <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> </p><p>Any thoughts on the long pause? I&#39;ll try a few of the settings, maybe it has some crazy DX settings for optimising the display, or maybe it died of shock finding something that still used DX3 <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 25 Jan 2006 03:58:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The only think i know is that with some modded drivers, i experienced problems using opengl. I try other ones, and it was OK. I sometimes got those black-screen too.</p><p>If someone have some test to make for solving or finding what can cause this, i think this is the right thread.</p><p>EDIT: Evert ++ , I&#39;m OK to say that with or without a black screen, when there is the pink border, they should try to upgrade their drivers. If it don&#39;t work, try downgrade them. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />  I&#39;m ok it seems to be silly. But drivers have sometimes these &#39;MagicPowaYouDontKnowWhatTheDriverDeveloperHasSmokeBeforeWork.&#39;</p><p>Fiou.</p><p>Gull ;-D
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Wed, 25 Jan 2006 18:57:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m glad most (all?) of the remaining issues with this code seem to be clearing up. Now it surely is time to get accelerated rotations and flipped sprites in there! Any chance of at least getting flags for these things in 4.2.1? How far advanced is 4.2.1 anyway? There seem to have been at least a couple of genuine bug fixes since 4.2.0 so presumably the plan is a new code lockdown and release sooner rather than later?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Thu, 26 Jan 2006 01:35:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well count me out for testing, I&#39;ve done my national service and want my life back <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><p>I can see the point for accelerated rotation, but not flipping. Care to give some useful examples?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 26 Jan 2006 04:33:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I can see the point for accelerated rotation, but not flipping. Care to give some useful examples?
</p></div></div><p>
I&#39;ve probably not been clear - I mean acceleration draw_sprite_v_flip and so on. So a benefit is keeping your sprites in VRAM and having the ability to make them face the other way without hugely expensive VRAM reads and writes. And more hardware acceleration generally.</p><p>If I&#39;m not mistaken, support for rotation and flips would mean that the entire Allegro sprite/bitmap functionality can be farmed out to hardware on Windows if the hardware is present - for the first time ever.</p><p>I also want to at least investigate Core Image in OS X v10.4 onwards as it looks, without any in depth investigation, as though it could do the same on that OS without the work of an OpenGL implementation which, for example, requires a lot of effort if you want to blit from one video bitmap to another where the latter isn&#39;t the screen and/or the former is.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Thu, 26 Jan 2006 05:03:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>id like to see 421 out sooner than later; if its going to contain this new accelerated stretchblit code.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Thu, 26 Jan 2006 05:07:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
How far advanced is 4.2.1 anyway? There seem to have been at least a couple of genuine bug fixes since 4.2.0 so presumably the plan is a new code lockdown and release sooner rather than later?
</p></div></div><p>
I think I was supposed to pack it up for internal beta testing last week, but I was more or less waiting for this to settle down.<br />I&#39;m planning to wrap up this weekend and get some people to stress-test it before public release (adding acceleration doesn&#39;t count as a bugfix, so we&#39;re bending the rules a bit by including it in 4.2.1, but since 4.3 is a very different beast anyway and it&#39;s such a useful thing to have, it&#39;ll be in there).<br />I&#39;ll also have to see if the release system works properly with the new SVN-based repository; that&#39;s something I haven&#39;t really looked into yet.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Thu, 26 Jan 2006 05:55:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>That&#39;s what I meant Thomas, I just can&#39;t think of many examples where I&#39;d want to flip images.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Thu, 26 Jan 2006 06:01:38 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
That&#39;s what I meant Thomas, I just can&#39;t think of many examples where I&#39;d want to flip images.
</p></div></div><p>
I can&#39;t think of many individual examples but if you take just the example of a character in a 2d platform game and multiply it by the number of Allegro users who attempt or produce a work featuring that example it becomes a quite significant use.</p><p>Anyway, it&#39;s easy enough to add where supported - certainly easier than rotation because it can just be an extra flag to the existing stretched and non-stretched blitters, as all it is to DirectDraw is an extra flag - so I think it&#39;s worth writing the code for. Almost certainly not in time for 4.2.1 though!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Thu, 26 Jan 2006 07:14:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i think alpha blitting, or anti-alising would be a better next feature
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Fri, 27 Jan 2006 01:54:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
i think alpha blitting, or anti-alising would be a better next feature
</p></div></div><p>
But DirectDraw can&#39;t achieve either of these, whereas flipping/rotating is quite easy to add.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Fri, 27 Jan 2006 06:40:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
i think alpha blitting, or anti-alising would be a better next feature
</p></div></div><p>
<b>cough*AllegroGL*cough</b></p><p>I&#39;m sure the OpenGL driver would appreciate having that ability, then it can be benefitted by all platforms.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Kitty Cat)</author>
		<pubDate>Fri, 27 Jan 2006 11:01:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
But DirectDraw can&#39;t achieve either of these
</p></div></div><p>

Is that a limitation of DX3?     I think DX7 can do it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Fri, 27 Jan 2006 22:51:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>After I read yesterday in the MSDN, I felt to be able to add the accelerated sprite flipping to allegro.<br />The result is a new version of wddaccel.c with accelerated draw_sprite_v_flip, draw_sprite_h_flip and draw_sprite_vh_flip (see attachment for the .diff file).<br />It seems to do, what it have to do, but after I tested the sprites per second, it seems to be not much more faster than before (ca. 11.000.000 sprites/s MEM-&gt;VRAM, 17.000.000 sprites/s VRAM-&gt;VRAM), but it is faster.<br />After I made a draw_sprite_*_flip from a VRAM sprite to the screen, it was extremly slow (only 500 sprites/s!!), but flipped sprite drawing on offscreen VRAM-&gt;VRAM is fast (17.000.000 sprites/s). Has anyone an explanation for this ?<br />I don&#39;t know, if the code is really bugless, so can somebody test it?</p><p>@ A J:<br />DX7 doesn&#39;t support alpha blitting, there are entries in the DDBLTFX struct, but they are not implemented in the Blt function.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Sat, 28 Jan 2006 19:02:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Looks good!</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
After I made a draw_sprite_*_flip from a VRAM sprite to the screen, it was extremly slow (only 500 sprites/s!!)
</p></div></div><p>
Could this be a vsync() issue? Try to run without using vsync if you haven&#39;t already tried that and see if that helps.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 28 Jan 2006 19:23:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Whats the minimum DirectX for the new allegro graphics API ?<br />Will it be DX7 ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Sun, 29 Jan 2006 04:40:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ohh, forget what I have said about the speed of my sprite flip routines. There was an error in my test program.<br />The new results disappoint me, here is a list I made during the test:</p><pre>
old v_flip      from -&gt; to        new v_flip    accelerated blit
(sprites/s)                       (sprites/s)
13400           RAM -&gt; VRAM       13400         no
24000           SYS -&gt; VRAM       7400          yes
370             VRAM -&gt; VRAM      370           yes
60000           RAM -&gt; SYS        60000         no
60000           SYS -&gt; SYS        36000         yes
350             VRAM -&gt; SYS       350           yes
70000           RAM -&gt; RAM        70000         no
70000           SYS -&gt; RAM        70000         no
360             VRAM -&gt; RAM       360           no
</pre><p>

this results were made with a 64x64 sprite on a 640x480x32 screen using the debug version of the stable allegro 4.2.0 (with my changes).<br />With some trace statements (in MSVC7 it works) I got a message, when the sprite flip entered my function and when it did the directx or the original blitting.<br />&quot;yes&quot; under &quot;accelerated blit&quot; means, that the function uses the directdraw Blt function. If the Blt function crashes, there will be no sprite blitted. But it blits a sprite with the right effects (v-flipped), so the Blt function works correctly.</p><p>So it seems I have made a &quot;decelerating&quot; routine for the sprite flip <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>What could be wrong???</p><p>I can&#39;t imagine, that the VRAM-&gt;VRAM flipped blitting is in directdraw as fast as the software functions from allegro.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Sun, 29 Jan 2006 05:27:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>How are you testing things (post your testing programme)? You&#39;re not acquiring the screen before blitting to it, are you?<br />EDIT: Also, make sure that your function is called, eg by having it print some output.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 29 Jan 2006 05:53:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Why not post your test code then we can all test it?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Whats the minimum DirectX for the new allegro graphics API? Will it be DX7 ?
</p></div></div><p>
Apparently you can dump DX3 and move straight to DX9 with the current version <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /><br /><a href="http://www.gamedev.net/reference/articles/article2283.asp">http://www.gamedev.net/reference/articles/article2283.asp</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Mon, 30 Jan 2006 03:45:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK, I wrote a new more clearly test program, where you can test the v-flip (for the function timeGetTime() you need the winmm.lib):
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#pragma warning( disable : 4312)   //ignore the warnings in alconfig.h and draw.inl </span></td></tr><tr><td class="number">2</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">3</td><td><span class="p">#include &lt;winalleg.h&gt;</span></td></tr><tr><td class="number">4</td><td><span class="p">#include &lt;mmsystem.h&gt;         //for timeGetTime() routine</span></td></tr><tr><td class="number">5</td><td>&#160;</td></tr><tr><td class="number">6</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span> <span class="k3">*</span>argv<span class="k2">[</span><span class="k2">]</span><span class="k2">)</span></td></tr><tr><td class="number">7</td><td><span class="k2">{</span></td></tr><tr><td class="number">8</td><td>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>sourcemem, <span class="k3">*</span>destmem<span class="k2">;</span>   <span class="c">//memory testing bitmaps</span></td></tr><tr><td class="number">9</td><td>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>sourcesys, <span class="k3">*</span>destsys<span class="k2">;</span>   <span class="c">//system testing bitmaps</span></td></tr><tr><td class="number">10</td><td>  <a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a> <span class="k3">*</span>sourcevram, <span class="k3">*</span>destvram<span class="k2">;</span> <span class="c">//video ram testing bitmaps</span></td></tr><tr><td class="number">11</td><td>  DWORD startTime, endTime<span class="k2">;</span>     <span class="c">//time before blitting and time after blitting</span></td></tr><tr><td class="number">12</td><td>  <span class="k1">unsigned</span> spritesDone <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>     <span class="c">//the sprite blit counter</span></td></tr><tr><td class="number">13</td><td>  <span class="c">// init allegro</span></td></tr><tr><td class="number">14</td><td>  <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td>  <span class="c">// switch to 640x480x32</span></td></tr><tr><td class="number">17</td><td>  <a href="http://www.allegro.cc/manual/set_color_depth" target="_blank"><span class="a">set_color_depth</span></a><span class="k2">(</span><span class="n">32</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">18</td><td>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT_WINDOWED, <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">19</td><td>  <span class="c">// create bitmaps</span></td></tr><tr><td class="number">20</td><td>  destmem <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_bitmap" target="_blank"><span class="a">create_bitmap</span></a><span class="k2">(</span><span class="n">64</span>,<span class="n">64</span><span class="k2">)</span><span class="k2">;</span>          <span class="c">//memory bitmap</span></td></tr><tr><td class="number">21</td><td>  sourcesys <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_system_bitmap" target="_blank"><span class="a">create_system_bitmap</span></a><span class="k2">(</span><span class="n">64</span>,<span class="n">64</span><span class="k2">)</span><span class="k2">;</span> <span class="c">//system bitmap</span></td></tr><tr><td class="number">22</td><td>  destsys <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_system_bitmap" target="_blank"><span class="a">create_system_bitmap</span></a><span class="k2">(</span><span class="n">64</span>,<span class="n">64</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">23</td><td>  sourcevram <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_video_bitmap" target="_blank"><span class="a">create_video_bitmap</span></a><span class="k2">(</span><span class="n">64</span>,<span class="n">64</span><span class="k2">)</span><span class="k2">;</span>  <span class="c">//video bitmap</span></td></tr><tr><td class="number">24</td><td>  destvram <span class="k3">=</span> <a href="http://www.allegro.cc/manual/create_video_bitmap" target="_blank"><span class="a">create_video_bitmap</span></a><span class="k2">(</span><span class="n">64</span>,<span class="n">64</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">25</td><td>  <span class="c">// load test image</span></td></tr><tr><td class="number">26</td><td>  sourcemem <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_bitmap" target="_blank"><span class="a">load_bitmap</span></a><span class="k2">(</span><span class="s">"fliptest.tga"</span>,NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">27</td><td>  <span class="c">// and copy it to the other sources</span></td></tr><tr><td class="number">28</td><td>  <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>sourcemem, sourcesys, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">64</span>, <span class="n">64</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">29</td><td>  <a href="http://www.allegro.cc/manual/blit" target="_blank"><span class="a">blit</span></a><span class="k2">(</span>sourcemem, sourcevram, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">64</span>, <span class="n">64</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">30</td><td>  <span class="c">// get time before blitting</span></td></tr><tr><td class="number">31</td><td>  startTime <span class="k3">=</span> timeGetTime<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">32</td><td>  <span class="c">// start blitting</span></td></tr><tr><td class="number">33</td><td>  <span class="k1">do</span></td></tr><tr><td class="number">34</td><td>  <span class="k2">{</span></td></tr><tr><td class="number">35</td><td>    <span class="c">// here is the test loop. Uncomment the function you want to check and comment the other draw_sprite_v_flip functions</span></td></tr><tr><td class="number">36</td><td>&#160;</td></tr><tr><td class="number">37</td><td>    <a href="http://www.allegro.cc/manual/draw_sprite_v_flip" target="_blank"><span class="a">draw_sprite_v_flip</span></a><span class="k2">(</span>destvram, sourcemem, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span> <span class="c">// RAM -&gt; VRAM</span></td></tr><tr><td class="number">38</td><td>    <span class="c">//draw_sprite_v_flip(destvram, sourcesys, 0, 0); // SYS -&gt; VRAM</span></td></tr><tr><td class="number">39</td><td>    <span class="c">//draw_sprite_v_flip(destvram, sourcevram, 0, 0); // VRAM -&gt; VRAM</span></td></tr><tr><td class="number">40</td><td>    <span class="c">//draw_sprite_v_flip(destsys, sourcemem, 0, 0); // RAM -&gt; SYS</span></td></tr><tr><td class="number">41</td><td>    <span class="c">//draw_sprite_v_flip(destsys, sourcesys, 0, 0); // SYS -&gt; SYS</span></td></tr><tr><td class="number">42</td><td>    <span class="c">//draw_sprite_v_flip(destsys, sourcevram, 0, 0); // VRAM -&gt; SYS</span></td></tr><tr><td class="number">43</td><td>    <span class="c">//draw_sprite_v_flip(destmem, sourcemem, 0, 0); // RAM -&gt; RAM</span></td></tr><tr><td class="number">44</td><td>    <span class="c">//draw_sprite_v_flip(destmem, sourcesys, 0, 0); // SYS -&gt; RAM</span></td></tr><tr><td class="number">45</td><td>    <span class="c">//draw_sprite_v_flip(destmem, sourcevram, 0, 0); // VRAM -&gt; RAM</span></td></tr><tr><td class="number">46</td><td>&#160;</td></tr><tr><td class="number">47</td><td>    spritesDone<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span>    <span class="c">// count the blits</span></td></tr><tr><td class="number">48</td><td>  <span class="k2">}</span></td></tr><tr><td class="number">49</td><td>  <span class="k1">while</span> <span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/keypressed" target="_blank"><span class="a">keypressed</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">50</td><td>  <a href="http://www.allegro.cc/manual/readkey" target="_blank"><span class="a">readkey</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">51</td><td>  <span class="c">// get time after blitting</span></td></tr><tr><td class="number">52</td><td>  endTime <span class="k3">=</span> timeGetTime<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">53</td><td>  <span class="c">// print the result on screen</span></td></tr><tr><td class="number">54</td><td>  textprintf<span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, <a href="http://www.allegro.cc/manual/font" target="_blank"><span class="a">font</span></a>, <span class="n">0</span>, <span class="n">0</span>, <a href="http://www.allegro.cc/manual/makecol" target="_blank"><span class="a">makecol</span></a><span class="k2">(</span><span class="n">255</span>,<span class="n">255</span>,<span class="n">255</span><span class="k2">)</span>, <span class="s">"%d sprites in %d milliseconds: %f sprites/s"</span>, spritesDone, endTime <span class="k3">-</span> startTime, <span class="k2">(</span><span class="k1">float</span><span class="k2">(</span>spritesDone<span class="k2">)</span><span class="k3">/</span><span class="k1">float</span><span class="k2">(</span>endTime <span class="k3">-</span> startTime<span class="k2">)</span><span class="k2">)</span><span class="k3">*</span><span class="n">1000</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">55</td><td>  <span class="c">// wait for a pressed key</span></td></tr><tr><td class="number">56</td><td>  <span class="k1">do</span> <span class="k2">{</span><span class="k2">}</span></td></tr><tr><td class="number">57</td><td>  <span class="k1">while</span> <span class="k2">(</span><span class="k3">!</span><a href="http://www.allegro.cc/manual/keypressed" target="_blank"><span class="a">keypressed</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">58</td><td>  <span class="c">// destroy bitmaps</span></td></tr><tr><td class="number">59</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>sourcemem<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">60</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>destmem<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">61</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>sourcesys<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">62</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>destsys<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">63</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>sourcevram<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">64</td><td>  <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>destvram<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">65</td><td>  <span class="c">// shut down allegro</span></td></tr><tr><td class="number">66</td><td>  <a href="http://www.allegro.cc/manual/allegro_exit" target="_blank"><span class="a">allegro_exit</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">67</td><td>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">68</td><td><span class="k2">}</span></td></tr><tr><td class="number">69</td><td><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr></tbody></table></div></div><p>

</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
You&#39;re not acquiring the screen before blitting to it, are you?
</p></div></div><p>
no, I don&#39;t, I never used this function acquire_bitmap before. If I use this in my test code, there aren&#39;t any speed changes, but it is possible, that I used it on the wrong bitmap (the target vram bitmap, I think) or at the wrong time (every time I blit?)
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Also, make sure that your function is called, eg by having it print some output.
</p></div></div><p>
After the line, where the DirectDraw blitting is executed, I print out the result of the Blt function with a trace statement. The SYS-&gt;VRAM, VRAM-&gt;VRAM, SYS-&gt;SYS and VRAM-&gt;SYS are blitted by the DirectDraw Blt function.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Mon, 30 Jan 2006 05:21:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
no, I don&#39;t, I never used this function acquire_bitmap before.
</p></div></div><p>
Good. You shouldn&#39;t acquier anything if you&#39;re using hardware acceleration.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Mon, 30 Jan 2006 05:34:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I know it&#39;s all relative and such, but that code isn&#39;t representative of real blitting or a real program as you are just chucking out tiny sprites between each other and not onwards to the screen or another buffer.</p><p>Perhaps a better test would be to blit a large number to a proper buffer and time it there, for example if you&#39;re using VRAM for your sprites you&#39;re more likely using paging/triple buffering whereas with a memory buffer you&#39;re going memory all the way.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Mon, 30 Jan 2006 14:55:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I know it&#39;s all relative and such, but that code isn&#39;t representative of real blitting or a real program as you are just chucking out tiny sprites between each other and not onwards to the screen or another buffer.
</p></div></div><p>
You&#39;re right, I tested the MEM, SYS and VRAM blitting to the screen and the SYS and VRAM blitting is now much faster.:)<br />I tested it on another PC and especially the VRAM to VRAM blit is very fast related to the old software routine (more than 5x faster than memory blitting to the screen and 32x faster than the old VRAM-&gt;VRAM blitting). The source sprite is the same 64 x 64 pixel bitmap.<br />I don&#39;t know, why my computer was so slow in VRAM-&gt;VRAM blitting, perhaps because I have installed the DirectX SDK and had configured DirectX as a debug or software (without hardware acceleration) version.???</p><p>EDIT: I tested this at home again, but there it runs as slowly as in the allegro software functions (and slower). I think my DirectDraw acceleration is broken (perhaps a bug in the nvidia drivers or a wrong option in the DirectX SDK).:(
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Mon, 30 Jan 2006 21:16:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>which DirectX SDK have you got ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Tue, 31 Jan 2006 17:09:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>DirectX 9.0 SDK February 2005.<br />But the settings for DirectDraw are right, I think, because the hardware acceleration is enabled. In the &quot;DirectX Caps Viewer&quot; under &quot;BLT Caps&quot; the FX &quot;DDFXCAPS_BLTMIRRORLEFTRIGHT&quot; and &quot;DDFXCAPS_BLTMIRRORUPDOWN&quot;, which are nessecary for vertical and horizontal flipped sprites, are hardware accelerated for System -&gt; Video, Video -&gt; Video, System -&gt; System and Video -&gt; System.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Tue, 31 Jan 2006 18:50:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>does this &quot;DirectX Caps Viewer&quot; under &quot;BLT Caps&quot;  mention Alpha blitting ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Wed, 01 Feb 2006 12:39:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I didn&#39;t find anything about that.<br />But I think it is not implemented in DirectDraw and will never be, because the last version is from DirectX7.<br />In the MSDN library there is a documentation to the IDirectDrawSurface7::Blt function. That is the newest and last version of DirectDraw Blt:
</p><div class="quote_container"><div class="title">MSDN said:</div><div class="quote"><p>

Obsolete and unsupported flags <br />All DDBLT_ALPHA flag values. <br />     Not currently implemented.
</p></div></div><p>
you can find it under <a href="http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddref_4b7b.asp">http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddref_4b7b.asp</a><br />If we want hardware accelerated alpha blending (and many more accelerations), we have to update the DirectX driver of Allegro to DirectX9 (from DirectDraw -&gt; DirectGraphics). Then we have a simulated 2d screen on a Direct3d-Interface, which supports hardware accelerated alpha blending and I think, also hardware accelerated primitives (circle, line etc.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Wed, 01 Feb 2006 14:17:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Do you see any issues with allegro using DX9 ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Wed, 01 Feb 2006 15:37:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t see any. Evert might, no idea.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 01 Feb 2006 16:30:40 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>What&#39;s the point in going down the DX9 route, I thought by the time this would become a reality, allegro will be OpenGL. Or is this a bad thing now Vista is looming?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Neil Walker)</author>
		<pubDate>Wed, 01 Feb 2006 18:23:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m sure to have rode somewhere that Vista will &#39;pipe&#39; OGL to his own grafic handler, so we&#39;ll loose some speed.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (GullRaDriel)</author>
		<pubDate>Wed, 01 Feb 2006 18:33:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The whole GL/Vista issue is MS&#39;s idea of &quot;fair play&quot;. I recall hearing from a reputable source that NVidia had a working composite driver for Vista that worked allong side GL, and didn&#39;t hurt either&#39;s speed, then MS locked them out, and forced everyone to &quot;do it thier way&quot;.</p><p>There is no valid reason why GL on Vista should be slower than DX.</p><p>With this roadblock in place for GL, allegro will need a DirectGraphics and/or Direct3d driver.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 01 Feb 2006 18:56:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
With this roadblock in place for GL, allegro will need a DirectGraphics and/or Direct3d driver.
</p></div></div><p>
I don&#39;t see why. There&#39;s about a million other things Allegro does in software that could be done in hardware if there were an API change and everybody has seemed &quot;happy&quot; so far. Here on OS X <i>everything</i> is done in software despite a flawlessly supported OpenGL driver.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Wed, 01 Feb 2006 19:18:50 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I don&#39;t see why.
</p></div></div><p>

Of course, nothing is <i>needed</i>. Still, as much performance as possible should be one of the design goals - so we may <i>wish</i> for such a driver at least - if it gives better performance than a software or OpenGL one.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Elias)</author>
		<pubDate>Wed, 01 Feb 2006 19:36:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
With this roadblock in place for GL, allegro will need a DirectGraphics and/or Direct3d driver.
</p></div></div><p>
Actually, what I think Allegro needs is good platform-independent code (for the same reason that the assembler code should go). Something that the people who actually work on Allegro can work on and debug and which will actually work in Windows.</p><p>I&#39;m not saying that it&#39;d be pointless to have a DX 9 or D3D driver, but unless someone is interested in writing one, it&#39;s just not going to happen.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 01 Feb 2006 20:13:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is there any tutorial for writing a gfx driver (how the driver have to be connected to allegro)? At present I&#39;m learning, who to use Direct3d for 2d games and I&#39;m interested in writing the driver, if I am ever practiced enough.<br />I had a look at the current DirectDraw driver and tried to understand the driver management of allegro. I think, I have understood the most, but I&#39;m not sure, if I understood all, e.g. how to add the driver to the global driverlist.</p><p>But back to my hardware accelerated draw_sprite_*_flip().<br />After I updated my test program to make a &quot;real&quot; test (blitting to screen or a screensized system and memory bitmap), in comparison to the old software function my hardware accelerated function was much faster in SYS-&gt;VRAM and about 32x faster in VRAM-&gt;VRAM blitting (see my last posts).<br />So the code works, but this is my first patch for Allegro, so what have I to do now, that this code will be taken up in future Allegro releases?<br />I read the ahack.htm and found this:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
The best you can do is to send your patch to the Allegro Developers mailing list. Read the readme.txt file for information on how to subscribe to this list. Alternatively, updated subscription instructions should always be available at <a href="http://alleg.sourceforge.net/maillist.html">http://alleg.sourceforge.net/maillist.html</a>.
</p></div></div><p>
I have already published the code in this thread (and it has not changed since the post). Must I send a copy- or diff-file to the allegro developers mailing list, too?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Wed, 01 Feb 2006 21:32:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I have already published the code in this thread (and it has not changed since the post). Must I send a copy- or diff-file to the allegro developers mailing list, too?
</p></div></div><p>
Just posting here should have been enough - Evert is definitely a developer and I believe Elias is too, so your patches should make their way into the main release code. Whenever I&#39;ve had a bug or patch to suggest, posting here seems to have accomplished the right effect.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Wed, 01 Feb 2006 23:27:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think most of us also have an e-mail subscription to the Allegro Development forum (whence my frequent requests for moving threads that are off-topic here to another forum). All the same, I will post and send the patch on the mailinglist before applying it. I&#39;m not sure if everyone on the mailinglist reads the forums (it certainly wasn&#39;t so in the past) and besides, the mailinglist is a bit easier to keep track off: threads don&#39;t get distracted so much and if they do someone will usually change the topic description.<br />This second patch, for instance, should really be posted and discussed in a separate thread. The reason is that this makes it easier to keep track of where the patch is posted and which version supersedes which. This is a bit more cumbersome with the forums, even in the e-mail form.</p><p>Long message short: if you feel like posting the diff on the mailinglist, please do (be sure to hang around for questions and comments). If you don&#39;t, that&#39;s ok too, but it&#39;ll take a bit longer for the message to get posted there and applied.</p><p>As for applying it - I&#39;ll have to be sure all things were properly tested. Have you tried things like VRAM-&gt;MEM blitting with this patch applied? Does that work as expected?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Wed, 01 Feb 2006 23:52:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thats good to hear we have someone intested in writing a DX9 driver.</p><p>As for the asm code in allegro, which routines need re-writing?</p><p>I&#39;ve made several attempts at writing stretch_blit and blit in C, and now also blit in SSE2.</p><p>i noticed in iblit32.s there is a #ifdef ALLEGRO_SSE<br />so perhaps adding #ifdef ALLEGRO_SSE2 can also be done
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Thu, 02 Feb 2006 02:10:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As for the asm code in allegro, which routines need re-writing?
</p></div></div><p>
There is a big difference between DirectDraw and DirectGraphics (Direct3D), so I have to write a new driver and all routines, which are implemented in the directDraw driver need to be re-written.
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Have you tried things like VRAM-&gt;MEM blitting with this patch applied? Does that work as expected?
</p></div></div><p>
I testet all 9 blittings (VRAM,SYS,MEM-&gt;VRAM,SYS,MEM) and after the test I blitted the system and memory destination bitmaps to the screen to see, if they are working correctly. The routine is working correctly (it draws flipped sprites) with all variations. If no hardware acceleration is supported for one variation, the routine calls the original routine (like the other ddraw_* routines). If the destination bitmap is MEM, then draw_sprite_*_flip does not call the ddraw_draw_sprite_*_flip routine anyway.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jens-Michael Kuhn)</author>
		<pubDate>Thu, 02 Feb 2006 14:00:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As for the asm code in allegro, which routines need re-writing?
</p></div></div><p>AFAIK, all of them. The &quot;Plan&quot;&trade; seems to be just to dump all ASM, and use C equivelents, as your average compiler generates better code for most processors than the current asm. Its also more portable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 03 Feb 2006 02:51:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>are all ports going to drop ASM ?</p><p>does any of the mac code use ASM ?</p><p>how about the DJGPP port.. or is the DOS support going to get finally dropped ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Mon, 06 Feb 2006 05:40:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
are all ports going to drop ASM ?
</p></div></div><p>
That&#39;s the idea.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
does any of the mac code use ASM ?
</p></div></div><p>
No. Only 32 bit Intel ports use ASM code (well, there is some in the AMD64 port, for cpuid mostly).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
how about the DJGPP port.. or is the DOS support going to get finally dropped ?
</p></div></div><p>
Hasn&#39;t this been answered ten times already? If no one updates the DOS port to work with the new API, then it&#39;s effectively dropped when it stops compiling and no one can be bothered to fix it.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Mon, 06 Feb 2006 06:27:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i&#39;ve done some more stretchblit in C code, and im struggling to match the asm codes speed.  even with cache instructions, althou there is no specific instructions that really assist in stretching.</p><p>Has anyone had any luck writing stretch_blit in C ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Mon, 06 Feb 2006 19:39:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Has anyone had any luck writing stretch_blit in C ?
</p></div></div><p>
What do you mean? Allegro comes with a C version of stretch_blit (otherwise it wouldn&#39;t work at all on non-Intel machines)... obviously someone has had some luck...</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
i&#39;ve done some more stretchblit in C code, and im struggling to match the asm codes speed.
</p></div></div><p>
Allegro uses self-modifying code to stretch sprites on Intel machines (more accurately put, it assembles a piece of code in memory to do the stretching and then calls it). I can imagine that that can still be an efficient way of doing it on modern machines (even if the code generated is i386 oriented).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Mon, 06 Feb 2006 20:09:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>[quoete]althou there is no specific instructions that really assist in stretching<br />&lt;/quote&gt;<br />You could use the vector unit to calculate source positions for four pixels at a time rather than one, which would hopefully bring you closer to the inevitable memory bandwidth bottleneck.</p><p>You also probably need to invent fairer tests. I have informally found that the most obvious C implementation usually beats stretch_blit for horizontally thin outputs, outputs that are shrunk vertically and the special case of outputs that are only one row high.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Harte)</author>
		<pubDate>Mon, 06 Feb 2006 20:47:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Evert, my entire post is one statement, i wasn&#39;t expecting to have individually sentences picked apart, reading the post backwards takes it out of context.</p><p>Thomas, the tests i&#39;ve done, were i build the stretcher first and then apply it to the image, building the stretcher is a trivial amount of time, its the only place i can see the possibly use for vectors to calcuate the positions, and im not so sure it would be worth the swizzling overhead for such a trivial part of the equation.</p><p>Im keen to have the asm code removed, but i&#39;d also like to replace it with something as fast or better.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Tue, 07 Feb 2006 07:36:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Evert, my entire post is one statement, i wasn&#39;t expecting to have individually sentences picked apart, reading the post backwards takes it out of context.
</p></div></div><p>
I thought I&#39;d structure my reply in such a way that I could individually comment on the things I have questions about. I also thought that I&#39;d just put the quick question in front, before the one where I would put a bit more discussion or clarification to what I was saying. But if you prefer it the other way around (and you might bother answering the question this time):</p><p>Allegro uses self-modifying code to stretch sprites on Intel machines (more accurately put, it assembles a piece of code in memory to do the stretching and then calls it). I can imagine that that can still be an efficient way of doing it on modern machines (even if the code generated is i386 oriented). And what do you mean be `luck making a stretch_blit in C&#39;? Allegro already has one; have you looked at that?</p><p>By the way, as this has nothing to do with the original topic (VRAM-&gt;VRAM accelerated stretch blits), I&#39;d prefer the discussion be moved to its own thread to make it easier to track.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Tue, 07 Feb 2006 14:36:08 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
what do you mean be `luck making a stretch_blit in C&#39;?
</p></div></div><p>
I mean, has anyone made a stretch_blit in C, not asm, that can compile on all the supported compilers, and is as fast or faster than the current asm stretch_blit code ?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Allegro already has one; have you looked at that?
</p></div></div><p>
It has?  where?<br />Im confused, as when i asked <i>&quot;As for the asm code in allegro, which routines need re-writing?&quot;</i>  i didn&#39;t get a specific answer, but i did get a hint <i>&quot;Only 32 bit Intel ports use ASM code&quot;</i></p><p>Getting a straight answer seems to be really difficult, so all i can do is ask lots of questions; and pick apart a few answers to try to establish what is going on, and at the moment, it seems that there is consensus about droping the asm code ASAP, in favour of C equivalents. I can&#39;t establish the current state of that work, for direct and specific questions like <i>&quot;As for the asm code in allegro, which routines need re-writing?&quot;</i>, the answer i got was <i>&quot;all of them&quot;</i>.</p><p>As i have already written a fast SSE2 blit, and we all seem to be in agreement about memcpy() being a suffecient blit replacement; i thought i might try asking about the status of stretch_blit and wether anyone had written a C equivalant of it.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
and you might bother answering the question this time
</p></div></div><p>
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
.. obviously someone has had some luck...
</p></div></div><p>

i&#39;ll <b>obviously</b> answer when i could be <b>bothered</b>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (A J)</author>
		<pubDate>Tue, 07 Feb 2006 17:17:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>A J, Evert is trying to say that Allegro already has a C version of stretch_blit, which is used in all platforms except for the x86 CPUs. You can use that as a base trying to develop a possibly faster version.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fiddler)</author>
		<pubDate>Tue, 07 Feb 2006 19:58:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It has? where?
</p></div></div><p>
allegro/src/c/cstretch.c</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Im confused, as when i asked &quot;As for the asm code in allegro, which routines need re-writing?&quot; i didn&#39;t get a specific answer, but i did get a hint &quot;Only 32 bit Intel ports use ASM code&quot;
</p></div></div><p>
Well, what are you asking? <i>What routines need to be rewritten in C because there&#39;s only an ASM version of the code?</i> or <i>If I want to make more efficient ASM code routines, which routines should I rewrite?</i><br />The answer to the first question is none, or else Allegro would not work at all on non-i386 machines. The answer to the second question is probably `all of them&#39;.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
it seems that there is consensus about droping the asm code ASAP, in favour of C equivalents.
</p></div></div><p>
Yes. The main reason being, if and when things are changed in the API, we don&#39;t want to simultaneously be developing an ASM and a C version of the code. We need the C version anyway, so let&#39;s stick with that, at least for now.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
As i have already written a fast SSE2 blit,
</p></div></div><p>
Did you submit a patch for that?</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
i thought i might try asking about the status of stretch_blit and wether anyone had written a C equivalant of it.
</p></div></div><p>
Yes, of course someone has - or Allegro would not work on non-i386 machines.<br />Now if you can optimise it more than it is now, that would be great. Personally, I can&#39;t even test it against the ASM code, so I have no idea how much slower it is (if at all).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Quote:<br />and you might bother answering the question this time</p><p>Quote:<br />.. obviously someone has had some luck...</p><p>i&#39;ll obviously answer when i could be bothered
</p></div></div><p>
Well, I assumed you were aware that Allegro works on non-Intel machines (G4/G5 Mac&#39;s, say), so I assumed you were aware of the Allegro C-only port. If you weren&#39;t, fair enough. If you were, I still don&#39;t understand your question.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Tue, 07 Feb 2006 20:35:31 +0000</pubDate>
	</item>
</rss>
