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

picScreen or map question
http://www.miragesource.net/forums/viewtopic.php?f=201&t=1040
Page 1 of 47

Author:  halla [ Wed Jan 03, 2007 8:16 am ]
Post subject:  picScreen or map question

Ok I pretty much got alpha blending working.. I got 2 pixboxes that will blend together. I want to now have it do it with the picScreen... or the map.

Code:
Private Sub hsAlphaBlend_Change()
'    picTest.Picture = picChat.Picture
   
    With BF
        .BlendOp = AC_SRC_OVER
        .BlendFlags = 0
        .SourceConstantAlpha = 155
        .AlphaFormat = 0
    End With

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

 '   picTest.Refresh
End Sub


Thats what I have. Some reason with this .. say if I have a browser up when I start the game.. my main menu is blended with the browser... I dont get why.

What do I use to mix it with the screen.... is using picScreen wrong?

Author:  Tony [ Wed Jan 03, 2007 8:45 am ]
Post subject: 

Grr dunno 0.0.. My alpha blending is almost working. It blends but it shows for only 1 millisecond. Waiting for someones help T.T

SAVE ME

Glimpse of the blending
Image

:: Pando

Author:  Gilgamesch [ Wed Jan 03, 2007 7:30 pm ]
Post subject: 

Pando wrote:
Grr dunno 0.0.. My alpha blending is almost working. It blends but it shows for only 1 millisecond. Waiting for someones help T.T

SAVE ME

Glimpse of the blending
Image

:: Pando



did you put the code in the gameloop?

Author:  Tony [ Wed Jan 03, 2007 8:21 pm ]
Post subject: 

Gilgamesch wrote:
Pando wrote:
Grr dunno 0.0.. My alpha blending is almost working. It blends but it shows for only 1 millisecond. Waiting for someones help T.T

SAVE ME

Glimpse of the blending
Image

:: Pando



did you put the code in the gameloop?


Tried but it flickers.

Author:  halla [ Wed Jan 03, 2007 8:48 pm ]
Post subject: 

Get in contact with me... maybe if we mix some of what we both have we can get it...

Author:  William [ Wed Jan 03, 2007 8:53 pm ]
Post subject: 

what are you going to do?

Author:  halla [ Wed Jan 03, 2007 8:57 pm ]
Post subject: 

William wrote:
what are you going to do?


What do you mean?

Heres a picture of my problem guys. It seems its copying from the computer screen not the picScreen lol...

Image

Author:  William [ Wed Jan 03, 2007 9:07 pm ]
Post subject: 

What are you going to use it for? rain effect?

Author:  halla [ Wed Jan 03, 2007 9:22 pm ]
Post subject: 

No its for semi transparent menus. Like big time games have. Its so they can be on the screen but not completely cover it.

I just tried something else and almost got it... I might be close :) lol

Author:  William [ Wed Jan 03, 2007 9:23 pm ]
Post subject: 

okay didn't check the code. just thought the pic was cool :P

Author:  halla [ Wed Jan 03, 2007 9:32 pm ]
Post subject: 

I got it working now. I just have to have it update when I move it... it still shows the background of wher eit was.

Author:  William [ Wed Jan 03, 2007 9:34 pm ]
Post subject: 

Screenshot please :)

Author:  halla [ Wed Jan 03, 2007 9:40 pm ]
Post subject: 

Ok now I got it when you move it it shows something different but its still not what your right over.. I dont see why its not...

Code:
Private Sub hsAlphaBlend_Change()
    picMainMenu.Picture = picMainMenu.Picture
   
    With BF
        .BlendOp = AC_SRC_OVER
        .BlendFlags = 0
        .SourceConstantAlpha = 75
        .AlphaFormat = 0
    End With

    RtlMoveMemory lBF, BF, 4
   
    AlphaBlend picMainMenu.hdc, 0, 0, picMainMenu.ScaleWidth, picMainMenu.ScaleHeight, picScreen.hdc, picMainMenu.top, picMainMenu.Left, picMainMenu.ScaleWidth, picMainMenu.ScaleHeight, lBF

    picMainMenu.Refresh
End Sub


I updated the picture above. Its how I have it now.

Author:  Gilgamesch [ Wed Jan 03, 2007 10:54 pm ]
Post subject: 

put something in the gameloop so its being refreshed all the time

it somehow safes whats behin dit the first time its being shown, so it needs to be refreshed

Author:  halla [ Wed Jan 03, 2007 10:57 pm ]
Post subject: 

Well I changed 0 and 0 which determine where to start to take the picture from...

to the Top and Left values of the Menu. I figured then it would start on picScreen there and take whats right below it. It does make it so when I move it changes but its not whats right below it.

Author:  halla [ Thu Jan 04, 2007 1:36 am ]
Post subject: 

Ok my problem is just with this.

Code:
AlphaBlend frmMirage.picMainMenu.hdc, 0, 0, frmMirage.picMainMenu.ScaleWidth, frmMirage.picMainMenu.ScaleHeight, frmMirage.picScreen.hdc, frmMirage.picMainMenu.top, frmMirage.picMainMenu.Left, frmMirage.picMainMenu.ScaleWidth, frmMirage.picMainMenu.ScaleHeight, lBF


Dont I want to use Top and Left here? That gets where the start of the menu is so it can get that part of the picScreen right? Well its all off. When I move the menu up it moves over and vice versa. I figured ok then I got Top and Left mixed up. Well when I change them it doesnt alpha blend at all.

Is there something I should use instead of Top and Left? Also When the menu is near the character it does something weird. It shows the menu inside it not blended and that menu is where it should be by the character.. how the other should be. If you want a picture that explains it better.

Anyways I have it working if I can just get the positioning right.

Author:  halla [ Fri Jan 05, 2007 3:20 am ]
Post subject: 

Ok I just about got it. I tried a 3rd surface to blt them too and it works fine... but of course I dont want an extra one.

The way I have it with 2 works but the thing is... some reason it shows the menu on the picscreen also so when it moves it stays solid cause its the alphablended over top of the solid one always.

THe thing I need to do is some how have it so the menu isnt on the picscreen... then it will just show the alphablended one. Anyone know how to go about this?

Code:
Private Sub hsAlphaBlend_Change()
    picMainMenu.Picture = picMainMenu.Picture
   
    With BF
        .BlendOp = AC_SRC_OVER
        .BlendFlags = 0
        .SourceConstantAlpha = 75
        .AlphaFormat = 0
    End With

    RtlMoveMemory lBF, BF, 4
   
    AlphaBlend picMainMenu.hdc, 0, 0, picMainMenu.ScaleWidth, picMainMenu.ScaleHeight, picScreen.hdc, picMainMenu.Left, picMainMenu.top, picMainMenu.ScaleWidth, picMainMenu.ScaleHeight, lBF
   
    picMainMenu.Refresh
End Sub

Author:  wanai [ Wed Dec 01, 2021 12:22 pm ]
Post subject:  Re: picScreen or map question

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

Author:  wanai [ Mon Jan 24, 2022 10:42 am ]
Post subject:  Re: picScreen or map question

Samp

Author:  wanai [ Mon Jan 24, 2022 10:43 am ]
Post subject:  Re: picScreen or map question

167

Author:  wanai [ Mon Jan 24, 2022 10:44 am ]
Post subject:  Re: picScreen or map question

Bett

Author:  wanai [ Mon Jan 24, 2022 10:45 am ]
Post subject:  Re: picScreen or map question

Bett

Author:  wanai [ Mon Jan 24, 2022 10:46 am ]
Post subject:  Re: picScreen or map question

Daiw

Author:  wanai [ Mon Jan 24, 2022 10:48 am ]
Post subject:  Re: picScreen or map question

Wind

Author:  wanai [ Mon Jan 24, 2022 10:49 am ]
Post subject:  Re: picScreen or map question

Zara

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