View Single Post
Old 31 January 2020, 23:55   #1
mcgeezer
Registered User

 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 1,772
Bitplane Calculations

I'm struggling here with a particularly (for me) bitplane scenario, I think there's a few problems it could be but I suspect it's to do with my math or logic of what is going on.

Here's a screen shot.



I'm trying to copy the bitmap stored in the IFF file within PPaint there, and make a copy of the sprite but manipulate the bitplanes so that the hooded mask appears orange without affecting the rest of the guys colours.

I'm using a cookie cut with $CA minterm.

In the Red square the code is taking a source and destination bitplane, a 1 in d6 aligned to a 3 in d7 would copy bitplane 1 to bitplane 3 from source to destination respectively. However the output is not what I'm seeing because the guys trousers are all screwed up... almost as if the bitmap data is being lost in the 5th bitplane..

I have a feeling the minterm is wrong and I need to or'ing the data from source to destination, but it should be taking the destination bitplane anyway and copying the data based on the mask which is set (and I know this is right).

A second pair of eyes on this would really be usefui, happy to post source if needed.

Graeme
mcgeezer is offline  
 
Page generated in 0.04205 seconds with 11 queries