From: cs19 AT cityscape DOT co DOT uk (BDC Client Team) Newsgroups: comp.os.msdos.djgpp Subject: Help with bit-masking Allegro sprites Date: Thu, 17 Jul 1997 12:20:33 GMT Organization: IP-GOLD User Message-ID: <869142033.25228.0.nnrp-5.9e9829a4@news.demon.co.uk> NNTP-Posting-Host: itsb.demon.co.uk Lines: 21 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi all, I have been working on a routine for a pixel-perfect collision detection for Allegro sprites. The basic idea is that you create a bit-mask for each Allegro sprite, do general bounding-box detection until this flags a collision and then use the bit-masks to see if a *true* collision has occured (i.e. actual pixels overlap). I'm fairly sure that I am creating the bit-masks correctly, but when I come to (logically) 'and' two bit-masks together I get false returns all the time. I have gone through my code time and again, and just can't spot where I am going wrong. Would anyone out there be prepare to look at the code (it's only 300 lines long) and point me in the right direction? Thanks in advance Neil Chinnery http://www.geocities.com/SiliconValley/Park/1077