Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Win32API

This topic is 6572 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It looks like you need to save the original background somewhere. You're grabbing the background that already has a sprite drawn on it, if I'm following the code, you're just...

Getting background
blitting sprite

when you should...

paste old background
get background
copy background to old background
blit sprite

[This message has been edited by logistix (edited December 15, 1999).]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I have almost gotten it to work but their is still a major bug. In the program you select an arena to play in and the characters to use from one form with thumbnails of them then when the maximized Game form comes up it is supposed to Blit in the background with the sprites of the characters. I am only currently blitting one character as I try and get it to work. One problem though: It blits the screen and then instead of blitting the mask and picture, it blits a semi transparent image of the form from which you select the wanted arena and characters.
What I am doing is this:

Place the background in a non visible picture box

Place the mask and picture in seperate non visible picture boxes

SRCCOPY the background to the visible picture box

SRCAND the mask to the visible picture box over the background

SRCPAINT the picture over the mask.

Please Help

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I am trying to blit a part of the background to a picture box and then blit a mask and sprite over this picture box and then copy it all back to its original spot in the background. But whenever I do it, it copies a picture of a part of the previous form.
Here is the code:
If Player1 = "Ugly1" Then
ReturnValue = BitBlt(picWorkArea.hDC, 0, 0, picWorkArea.Width, picWorkArea.Height, picArena.hDC, 0, 0, SRCCOPY)
ReturnValue = BitBlt(picWorkArea.hDC, 0, 0, picWorkArea.Width, picWorkArea.Height, picUglyMask.hDC, 0, 0, SRCAND) ' SRCAND the sprite mask on top of the display section we copied
ReturnValue = BitBlt(picWorkArea.hDC, 0, 0, picWorkArea.Width, picWorkArea.Height, picUglyBlack.hDC, 0, 0, SRCPAINT) ' SRCPAINT the sprite on top of the mask and the display section
ReturnValue = BitBlt(picArena.hDC, 0, 0, picWorkArea.Width, picWorkArea.Height, picWorkArea.hDC, 0, 0, SRCCOPY) ' SRCCOPY the completed display section with transparent sprite back into the display picturebox
End If
Please help me

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I forgot to say but if you want give me your e-mail address and I will send you the project, although you need vb6 for it to work!
Any help appreciated
CoolGuy

Share this post


Link to post
Share on other sites