Mirage Source http://miragesource.net/forums/ |
|
Alpha Fading http://miragesource.net/forums/viewtopic.php?f=201&t=1191 |
Page 1 of 28 |
Author: | Anthony [ Sat Jan 20, 2007 5:06 pm ] |
Post subject: | Alpha Fading |
Well, currently I am working on an alpha fading way of doing day/night. What I have basically done is download a few codes from pscode and read a lot of stuff and have sort of learned it a bit. I am using the code from MRPGE and am not sure why I cannot get it working. I have had it so it flashes on the screen but thats all. So here is the code I am using. In my GameLoop Code: ' Draw night Call SquareAlphaBlend(frmMirage.picScreen.Width, frmMirage.picScreen.Height, frmMirage.picScreen.hdc, 0, 0, frmMirage.picBlack.hdc, 0, 0, 110) The SquareAlphaBlend sub Code: Public Sub SquareAlphaBlend( _
ByVal cSrc_Widht As Integer, _ ByVal cSrc_Height As Integer, _ ByVal cSrc As Long, _ ByVal cSrc_X As Integer, _ ByVal cSrc_Y As Integer, _ ByVal cDest As Long, _ ByVal cDest_X As Integer, _ ByVal cDest_Y As Integer, _ ByVal nLevel As Byte) Dim LrProps As rBlendProps Dim LnBlendPtr As Long LrProps.tBlendAmount = nLevel CopyMemory LnBlendPtr, LrProps, 4 AlphaBlend cDest, cDest_X, cDest_Y, cSrc_Widht, cSrc_Height, cSrc, cSrc_X, cSrc_Y, cSrc_Widht, cSrc_Height, LnBlendPtr End Sub Thats it, I have a big black picture box on frmMirage which should be blended onto the picScreen. The alphablend api is the same as any. If maybe there is an easier way of doing this and more efficient that would be nice to find out, thanks a lot for any help. |
Author: | Robin [ Sat Jan 20, 2007 5:46 pm ] |
Post subject: | |
Are you putting one picture box ontop of another? If so (you didn't post the Alphablend code itself ¬_¬) then go learn to do it with DX. |
Author: | Tony [ Sat Jan 20, 2007 8:05 pm ] |
Post subject: | |
Just use fox 0___0 I think its efficient. And just alpha blend it till 255-0 |
Author: | Robin [ Sat Jan 20, 2007 8:12 pm ] |
Post subject: | |
Fox isn't efficient XD Infact, most AB methods in 7 aren't efficient. Llllaaagggyyyy |
Author: | Robin [ Sat Jan 20, 2007 8:12 pm ] |
Post subject: | |
Fox isn't efficient XD Infact, most AB methods in Mirage won't work well |
Author: | wanai [ Thu May 12, 2022 11:18 am ] |
Post subject: | Re: Alpha Fading |
amou |
Author: | wanai [ Thu May 12, 2022 11:19 am ] |
Post subject: | Re: Alpha Fading |
261.5 |
Author: | wanai [ Thu May 12, 2022 11:20 am ] |
Post subject: | Re: Alpha Fading |
palm |
Author: | wanai [ Thu May 12, 2022 11:21 am ] |
Post subject: | Re: Alpha Fading |
Repr |
Author: | wanai [ Thu May 12, 2022 11:23 am ] |
Post subject: | Re: Alpha Fading |
Seri |
Author: | wanai [ Thu May 12, 2022 11:24 am ] |
Post subject: | Re: Alpha Fading |
Tosh |
Author: | wanai [ Thu May 12, 2022 11:25 am ] |
Post subject: | Re: Alpha Fading |
Emma |
Author: | wanai [ Thu May 12, 2022 11:26 am ] |
Post subject: | Re: Alpha Fading |
Tomm |
Author: | wanai [ Thu May 12, 2022 11:27 am ] |
Post subject: | Re: Alpha Fading |
Flas |
Author: | wanai [ Thu May 12, 2022 11:28 am ] |
Post subject: | Re: Alpha Fading |
Robe |
Author: | wanai [ Thu May 12, 2022 11:29 am ] |
Post subject: | Re: Alpha Fading |
Brad |
Author: | wanai [ Thu May 12, 2022 11:31 am ] |
Post subject: | Re: Alpha Fading |
Cham |
Author: | wanai [ Thu May 12, 2022 11:32 am ] |
Post subject: | Re: Alpha Fading |
Fisk |
Author: | wanai [ Thu May 12, 2022 11:33 am ] |
Post subject: | Re: Alpha Fading |
Meta |
Author: | wanai [ Thu May 12, 2022 11:34 am ] |
Post subject: | Re: Alpha Fading |
Kiel |
Author: | wanai [ Thu May 12, 2022 11:35 am ] |
Post subject: | Re: Alpha Fading |
Tesc |
Author: | wanai [ Thu May 12, 2022 11:36 am ] |
Post subject: | Re: Alpha Fading |
Rafa |
Page 1 of 28 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |