|
-
Oct 31st, 2001, 09:22 PM
#1
Thread Starter
PowerPoster
BitBlt - I'll get this bastard solved one day...
I am having a **** of a time trying to use BitBlt.
I understadn all the concepts of masking etc. but I am repeatedly having a problem where I put a new 'tile' over the old picture, the colours of the picture layers combine, where all I want is one to write over the other.
I have a front picture box (white bg), a buffer picbox (black bg)
The tiles I have tried drawing with black bg and white, and with a mask with black and white in alternating areas.
First I paint the mask onto the back picbox, using vbSrcPaint
Then I paint the sprite tile onto the back picbox with vbSrcAnd
And finally, I vbSrcCopy the whole thing to the front picBox.
No matter what combo I try, I can't seem to get this right...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Nov 1st, 2001, 08:34 AM
#2
Good Ol' Platypus
Black Foreground White Background masks use SrcAnd, black background sprites use SrcPaint.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Nov 1st, 2001, 05:23 PM
#3
Thread Starter
PowerPoster
I've discovered the source of my problem finally. It had nothing to do with the b/w order. I have it reversed - white background on sprites, black on masks, and that works now.
The problem I had was arising from the fact that I split my sprite and mask into 2 separate .bmps. When I combined them again, it seemed to work.
Why would that be happening? I thought BitBlt just did a pixel/bit transfer from one place to another, either as a direct copy or as a transformation, depending on the RasterOp.
It works though, and that's what counts.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Nov 1st, 2001, 05:30 PM
#4
Good Ol' Platypus
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Nov 1st, 2001, 05:51 PM
#5
Thread Starter
PowerPoster
I am a fool.
SOLVED!!!
Just call me a ****in idiot.
I had my BitBlt calls set slightly wrong. The mask wasn't getting painted, as I still had the SourceX set to Tile.Width or some such stupidity.
God damn.
I hate silly **** like that, but it feels good to finally have this ***** working...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Nov 2nd, 2001, 08:21 AM
#6
PowerPoster
I normally find then when I can't get something to work - it isn't cos I don't understand the problem or the solution, just that I've made an INCREDIBLY stupid error - like blitting to the wrong place, or with the wrong image, or some such rubbish.
Glad you solved it!
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|