[AD] Bug in _linear_masked_blit8

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Damian Yerrick pointed out this bug on the Allegro mailing list
-- here's a copy of my patch, which I've also posted there.

Specifically, when the four pixels read consist of two solid
then one masked, the old code assumes the fourth pixel is solid.
This patch simply adds a test for it.

Looking through the code for that function, I've seen some minor
optimisations that could be made -- if I get time, I'll try them
out and see if there's a significant speed difference.

George

-- 
Random project update:
31/03/2000: AllegroGL is now being hosted by SourceForge:
        http://AllegroGL.sourceforge.net/

--- src/i386/iblit8.s.old	Wed Apr  5 05:23:59 2000
+++ src/i386/iblit8.s	Wed Apr  5 05:26:17 2000
@@ -586,7 +586,9 @@
       _align_
    masked16_put12_skip3:
       movw %ax, %es:(%edi)       /* write the pixel */
-      jmp masked16_blit_skip3
+      orb %dh, %dh
+      jnz masked16_blit_skip3
+      jmp masked16_blit_skip4
       _align_
    masked16_put123_skip4:
       movw %ax, %es:(%edi)       /* write the pixel */


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/