Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with Alpha Blending
#1
Ok I tried the tutorial on vbgamer website.

Code:
Dim rEmptyRect As RECT, dArray() As Byte, sArray() As Byte

MainMenu.Lock rEmptyRect, DDSDMainMenu, DDLOCK_WAIT, 0
DD_PrimarySurf.Lock rEmptyRect, DDSD_Primary, DDLOCK_WAIT, 0

MainMenu.GetLockedArray dArray()
DD_PrimarySurf.GetLockedArray sArray()

Call vbDABLalphablend16(555, 0, sArray(0 + 0, 0), dArray(0 + 0, 0), 200, 64, 32, DDSD_Primary.lPitch, DDSDMainMenu.lPitch, 0)

DD_PrimarySurf.Unlock rEmptyRect
MainMenu.Unlock rEmptyRect

I put that in Form Load of frmMirage.

I also have the DLL file called too.

in modDirectX I have...

Code:
Public DX As New DirectX7
Public DD As DirectDraw7
Public DD_PrimarySurf As DirectDrawSurface7
Public DD_SpriteSurf As DirectDrawSurface7
Public DD_TileSurf As DirectDrawSurface7
Public DD_ItemSurf As DirectDrawSurface7
Public DD_BackBuffer As DirectDrawSurface7
Public DD_Clip As DirectDrawClipper
Public MainMenu As DirectDrawSurface7

Public DDSD_Primary As DDSURFACEDESC2
Public DDSD_Sprite As DDSURFACEDESC2
Public DDSD_Tile As DDSURFACEDESC2
Public DDSD_Item As DDSURFACEDESC2
Public DDSD_BackBuffer As DDSURFACEDESC2
Public DDSDMainMenu As DDSURFACEDESC2

It will compile but gets an error with... MainMenu.Lock rEmptyRect, DDSDMainMenu, DDLOCK_WAIT, 0

If someone could help me out here... or if someone could even do 1 for me so I can learn how it works and do the rest. I dont understand these guides or anything much. I could repay you back in some way im sure.

Reply or get at me on AIM or MSN.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)