Blitting Sprites in VB6

Started by
0 comments, last by GameDev.net 24 years, 3 months ago
I am making a game for computer class but their is one major bug.In the program you selectan arena to play in and the characters to use from one form with thumbnails of themthen 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

Advertisement
You had it half right. What you need to do is a SRCAND followed by a SRCINVERT. This assumes that your picture has black as the background. Try this link after 5:00 p.m. EST for a sample:

members.home.net/machaira/bitblt.zip

------------------
Breakaway Games

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

This topic is closed to new replies.

Advertisement