Mirage Source
http://web.miragesource.net/forums/

Need help with Alpha Blending
http://web.miragesource.net/forums/viewtopic.php?f=201&t=1026
Page 1 of 37

Author:  halla [ Tue Jan 02, 2007 5:48 am ]
Post subject:  Need help with Alpha Blending

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.

Author:  Tony [ Tue Jan 02, 2007 6:28 am ]
Post subject: 

Ooo I want to try this. Link me plx. :]

:: Pando

Author:  Spodi [ Tue Jan 02, 2007 6:48 am ]
Post subject: 

You can try the people at http://www.gpwiki.org - though they do a good job arguing about tiny things instead of answering questions. :wink:

Author:  halla [ Tue Jan 02, 2007 9:23 pm ]
Post subject: 

Ok im getting close. Went to pscode and found this source.

Heres what I got in form load

Code:
    picTest.Picture = picMainMenu.Picture
   
    With BF
        .BlendOp = AC_SRC_OVER
        .BlendFlags = 0
        .SourceConstantAlpha = 50
        .AlphaFormat = 0
    End With

    RtlMoveMemory lBF, BF, 4
   
    AlphaBlend picTest.hdc, 0, 0, picTest.ScaleWidth, picTest.ScaleHeight, picScreen.hdc, 0, 0, picScreen.ScaleWidth, picScreen.ScaleHeight, lBF

    picMainMenu.Refresh
    picTest.Refresh
    picScreen.Refresh


I want MainMenu to alphablend with the screen... should I use picScreen or something else to get that?

Right now it just shows the mainmenu but no effects... it compiles fine and all. I also have the calls that are needed on mod Constants. If you want to see them let me know.

Author:  wanai [ Wed Dec 01, 2021 12:15 pm ]
Post subject:  Re: Need help with Alpha Blending

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо

Author:  wanai [ Sun Jan 23, 2022 1:50 pm ]
Post subject:  Re: Need help with Alpha Blending

Kbit

Author:  wanai [ Sun Jan 23, 2022 1:51 pm ]
Post subject:  Re: Need help with Alpha Blending

163.4

Author:  wanai [ Sun Jan 23, 2022 1:53 pm ]
Post subject:  Re: Need help with Alpha Blending

Bett

Author:  wanai [ Sun Jan 23, 2022 1:54 pm ]
Post subject:  Re: Need help with Alpha Blending

Bett

Author:  wanai [ Sun Jan 23, 2022 1:55 pm ]
Post subject:  Re: Need help with Alpha Blending

Cudd

Author:  wanai [ Sun Jan 23, 2022 1:56 pm ]
Post subject:  Re: Need help with Alpha Blending

Pict

Author:  wanai [ Sun Jan 23, 2022 1:57 pm ]
Post subject:  Re: Need help with Alpha Blending

Noth

Author:  wanai [ Sun Jan 23, 2022 1:58 pm ]
Post subject:  Re: Need help with Alpha Blending

Wend

Author:  wanai [ Sun Jan 23, 2022 1:59 pm ]
Post subject:  Re: Need help with Alpha Blending

Jere

Author:  wanai [ Sun Jan 23, 2022 2:00 pm ]
Post subject:  Re: Need help with Alpha Blending

John

Author:  wanai [ Sun Jan 23, 2022 2:02 pm ]
Post subject:  Re: Need help with Alpha Blending

Hits

Author:  wanai [ Sun Jan 23, 2022 2:03 pm ]
Post subject:  Re: Need help with Alpha Blending

Atom

Author:  wanai [ Sun Jan 23, 2022 2:04 pm ]
Post subject:  Re: Need help with Alpha Blending

Atla

Author:  wanai [ Sun Jan 23, 2022 2:05 pm ]
Post subject:  Re: Need help with Alpha Blending

Atla

Author:  wanai [ Sun Jan 23, 2022 2:06 pm ]
Post subject:  Re: Need help with Alpha Blending

Mark

Author:  wanai [ Sun Jan 23, 2022 2:07 pm ]
Post subject:  Re: Need help with Alpha Blending

Quat

Author:  wanai [ Sun Jan 23, 2022 2:08 pm ]
Post subject:  Re: Need help with Alpha Blending

XVII

Author:  wanai [ Sun Jan 23, 2022 2:09 pm ]
Post subject:  Re: Need help with Alpha Blending

Deko

Author:  wanai [ Sun Jan 23, 2022 2:11 pm ]
Post subject:  Re: Need help with Alpha Blending

Miss

Author:  wanai [ Sun Jan 23, 2022 2:12 pm ]
Post subject:  Re: Need help with Alpha Blending

Malg

Page 1 of 37 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/