Drawing and moving a Character Transparently (Not a Sprite)

Drewpeu

Member
Licensed User
Hi,

In all the Libraries that come with Basic4ppc and the large ammount that
users have contributed can the following be implemented from VB6!

Public Sub drawHero()
BitBlt frmBitBlt.hDC, 50, 50, 30, 30, frmBitBlt.Hero.hDC, 0, 0, vbSrcPaint
End Sub

Public Sub drawMask()
BitBlt frmBitBlt.hDC, 50, 50, 30, 30, frmBitBlt.HeroMask.hDC, 0, 0, vbSrcAnd
End Sub

Public Sub drawBground()
BitBlt frmBitBlt.hDC, 50, 50, 300, 300, frmBitBlt.Land.hDC, 0, 0, vbSrcCopy
End Sub


This can be used to Draw and move a character Transparently on a
complex background.


Thanks in advance.
 

Drewpeu

Member
Licensed User
Thanks Erel,

I already downloaded and tried the Smiley example and found it
very flickery, also as I added other images the flickering got worse!

I also think the ammount of code/math required adds to this flickering.

rectSrc.New1(0,0,bmp.Width,bmp.Height) 'The source rectangle.
rectDest.New1(120,120,30,30) 'The target rectangle.
rectDest2.New1(120,120,40,40)
drawer.DrawImage1(bmp.Value,rectSrc.Value,rectDest.Value,true)
drawer.DrawImage1(bmp.Value,rectSrc.Value,rectDest2.Value,true)

All this for one image!
This is what slows everything up I think.

I require 36 images on the screen at any one time!

What would be involved in creating a BitBlt library for Basic4ppc
based on the VB.NET.Auto Function BitBlt Lib "GDI32.DLL"

Thanks once again for all your help...
 
Top