Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 8:50 am

All times are UTC




Post new topic Reply to topic  [ 1153 posts ]  Go to page 1, 2, 3, 4, 5 ... 47  Next
Author Message
PostPosted: Wed Jan 03, 2007 8:16 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:45 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 7:30 pm 
Offline
Knowledgeable

Joined: Sun May 28, 2006 9:06 pm
Posts: 147
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?

_________________
There are only 10 types of people in the world. Those who understand binary and those who don't.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:21 pm 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:48 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
Get in contact with me... maybe if we mix some of what we both have we can get it...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:53 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
what are you going to do?

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:57 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:07 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
What are you going to use it for? rain effect?

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:22 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:23 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
okay didn't check the code. just thought the pic was cool :P

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:32 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:34 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Screenshot please :)

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:40 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 10:54 pm 
Offline
Knowledgeable

Joined: Sun May 28, 2006 9:06 pm
Posts: 147
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

_________________
There are only 10 types of people in the world. Those who understand binary and those who don't.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 10:57 pm 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 1:36 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 3:20 am 
Offline
Pro

Joined: Sat Jun 03, 2006 8:32 pm
Posts: 415
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


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 12:22 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоsemiasphalticflux.ruинфоинфоинфо
инфоинфоинфоинфоинфоинфосайтинфоинфоинфоtemperateclimateинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:42 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
Samp


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:43 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
167


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:44 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
Bett


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:45 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
Bett


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:46 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
Daiw


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:48 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
Wind


Top
 Profile  
 
PostPosted: Mon Jan 24, 2022 10:49 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 456111
Zara


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1153 posts ]  Go to page 1, 2, 3, 4, 5 ... 47  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group