Jump to content
Tuts 4 You

PNG NEED HELP


wunder

Recommended Posts

Hi there I have down loaded this example here but I do not remember were ....does any body know how to do the buttons in masm like the person did here ...

I have looked at all of Ufo-Pu55y's sources but I can not get any to work with this button...not sure of the logic behind the spacing in the images there

Win uPPP.zip

Link to comment

Thank you for the reply....

my apologizes All I did was take the exit.png from the above example and tried to sub it in your keygen template (tried it with the PNG #1 template too)

In theory it should work ...but the spacing between the button images on the strip are different than on the exit.png and I have no idea how to control that.... also I can not seem to move the button around .....program crashes

I did not see a reason to copy your code and post a failing source ...it would be the same thing so.....

If you sub the exit button with the exit.png from the above you will see what I am talking about

I have a different way I do buttons ( I use three images) ...but I wanted to try a strip like in the above example ....So I can get that "glow" around the button when it is clicked

I wish the author of the above example included a source

Thank you

Link to comment
author of the above example included a source
I feel I like that way talking about a 3rd person.. here we go:

The author asked you to attach your source.

That way he can help you much faster.

Btw, there's no such extra space in the images.

Every single bit gets displayed in the end.

Link to comment

I am confused by your answer a bit

LOL I meant the author of the Win uPPP.zip attachment that I uploaded as the example .....I wished they had the source with it ...

I used res hacker to look at the rsrc inside that example ...and I think that he used a patch maker engine to make that ....but PeID shows MASM/TASM ????

do you want me to make a source and post it ? see were it went wrong ... like I said all I did was sub the image into your keygen and it shows half an image ....

I can make a source and upload it ...i am going to be indisposed for a while so it will be in 7 -8 days

Link to comment

I'm the author of both and I was just kidding.

You say you simply placed the image into the source for another template.

I'm sure you adjusted the hardcoded image sizes in the source?

Link to comment

yes I did ...that is what fails ....it shows half images with a space in between

but I apologize I usually do Include a source with all my posts ... I am stretching my self to thin with all my MASM projects .... I find that I favor coding to cracking so I tend to lean more towards coding ..... I just got lazy and did a substitute and an edit with your template....

Got hell for posting others work :(

Edited by wunder
Link to comment

yes I did ...that is what fails ....it shows half images with a space in between

But you didn't correct it everywhere, that's why.

It's not enough changing the values for the AlphaBlend calls.

For real hardcore effects coding check out stuff from the god of maths & effects coding:

ftp://ftp.scene.org/pub/parties/2007/numerica07/intro/eqx_-_frameskool_-_bp2007_64k_invit.zip

Nevertheless qWord does a better job since he's sharing interesting

code and helping others out thumbs.gif

Edited by Ufo-Pu55y
Link to comment

I am going to defiantly try to correct it all ...and try again ....if there are nay key places to correct that you want to remind me about that would be great ...I will have a go at it .....

you know C so this might be of use to you .... in the key gen about ( left arrow right arrow ...Ctrl to fire ) I wish this was in MAMS ..... although there is an open MASM pacman game so I might to to convert same day

forumcrack-spaceship-template.zip

Link to comment

iirc only in the few instructions right before the

AlphaBlend calls you have to do the right thing.

Yep, I knew that keygen about box. It's my fav.. jB rulez!

Link to comment
  • 2 weeks later...

I am back....

Well I had some time to look at it and I still can not get this to work ...all I want is to be able to do the buttons ...

it seems that your source uses ws_ex_layered dialog ...and the patcher is dialog based ....

I want to use the buttons on a dialog based window .....

anyways I decompiled your keygen source and used that ..... and I can not get the buttons to work .....

Also seems that the patcher resources are not upside down I want to do it like that

can you help?

ButtonTest.zip

Link to comment
Ufo-Pu55y
and I can not get the buttons to work ....

1) For instance if the size of your exit button is 46 x 69, then the size

constants should be 46 x 69/3 ==> 46 x 23.. why do you use 42 x 22 ???

2) You didn't correct the size constants in the WM_MOUSEMOVE handler

Also seems that the patcher resources are not upside down I want to do it like that
Simply flip them vertically in memory after loading them.

You should be able to do that.

It's not just like inverting the byte array.

It's more like this:

-line1 to bottom-0

-line2 to bottom-1

-...

Edited by Ufo-Pu55y
Link to comment

46x23 crashes for me ...I can not seem to use odd numbers ... ???

and I thought I did correct the size constants in the WM_MOUSEMOVE handler.....

that is why I use Button1_Left, 2, 3 so Button1_Left,Button2_Left,Button3_Left......

maybe I do not understand how to correct ......how do you correct .....?

Also I am going to try to use a dialog base rect ...I have the algo at home that I have used on couple starfields which get the system metrics of the user rect ...so

Frame_Size_X equ 403

Frame_Size_Y equ 287

can be

Frame_Size_X dd ?

Frame_Size_Y dd ?

can you please show me a snip it of the corrected constants in the WM_MOUSEMOVE handler......?

Thank you for your time

Link to comment

1) For instance if the size of your exit button is 46 x 69, then the size

constants should be 46 x 69/3 ==> 46 x 23.. why do you use 42 x 22 ???

2) You didn't correct the size constants in the WM_MOUSEMOVE handler

Simply flip them vertically in memory after loading them.

You should be able to do that.

It's not just like inverting the byte array.

It's more like this:

-line1 to bottom-0

-line2 to bottom-1

-...

That did not work well it all ..after flipping the image in memory the button order is reversed .....the over is now the up ... the pressed is the up and the up is the pressed ......

you have no idea how many things and times I tried to do that opaque effect in the center while the rest of the window is transparent .... can you PLEASE tell me how to do that ?

I have tried every thing I can think off

Thank you

Link to comment
  • 3 weeks later...

This has been driving me nuts ...all I want to know is how to make the opaque region and the rest transparent using masm

I have been still at this ...is it 2 windows ? a static? regions? what ?

aaaaaahhhhhhhh smiley-bangheadonwall-yellow.gif

Link to comment

There's no use of "regions" - the used technique is called "alpha blending",

and it is done via a very speedy routine written by bitRake. I'm using it in all

the posted PNG template sources on this board.

It requires 32 bit PNGs: 8 bit red, 8 bit green, 8 bit blue and 8 bit alpha.

It's the alpha value for each pixel which decides whether you see the pixel

in the end or not. You have to read about it if you want to stop it driving you nuts.

Background (desktop), frame, buttons, etc. - they all got mixed (blended) together.

No such cutting there as if using scissors.

EDIT/

And maybe take a look at this one:

http://www.madwizard...projects/pnglib

The most important one was a "pngstuff.zip" package by "Qweerdy".

You could still find it on Masm32 forum, but the board got ****ed

up some days ago (server moved + reset), and I had no luck

accessing stuff on the old board.

Edited by Ufo-Pu55y
Link to comment

Hutch has change the server and all forum attached zip files

backup to a server

Apache directory listing for 2005 archive
/>http://www.masmforum.com/archive2005

Apache directory listing for 2012 archive
/>http://www.masmforum.com/archive2012/

Png Skin from Qweerdy can you download here

ppa.zip

http://forum.sources...563&attach_id=0

pngskin.zip

http://forum.sources...564&attach_id=0

pngskin3.zip

http://forum.sources...567&attach_id=0

pngskin4.zip

http://forum.sources...568&attach_id=0

scrollblend.zip

http://forum.sources...569&attach_id=0

PngStuff.zip
/>http://www.masmforum.com/archive2012/396_PNGStuff.zip

Greets,

Edited by ragdog
  • Like 1
Link to comment

There's no use of "regions" - the used technique is called "alpha blending",

and it is done via a very speedy routine written by bitRake. I'm using it in all

the posted PNG template sources on this board.

It requires 32 bit PNGs: 8 bit red, 8 bit green, 8 bit blue and 8 bit alpha.

It's the alpha value for each pixel which decides whether you see the pixel

in the end or not. You have to read about it if you want to stop it driving you nuts.

Background (desktop), frame, buttons, etc. - they all got mixed (blended) together.

No such cutting there as if using scissors.

EDIT/

And maybe take a look at this one:

http://www.madwizard...projects/pnglib

The most important one was a "pngstuff.zip" package by "Qweerdy".

You could still find it on Masm32 forum, but the board got ****ed

up some days ago (server moved + reset), and I had no luck

accessing stuff on the old board.

Thank you !!! Ufo-Pu55y

All I am trying to do is achieve the same look as the Winupp patcher .... every time I end up with a region that is see through like a glass hole not transparent .... but I will give it another go ragdog posted this example that might help

http://forum.sources...568&attach_id=0

On the Masm forum this was suggested to me http://www.mvps.org/...tutorial.html

GDI Tutorial 4 - DIBs

that is the last tut ...looks like that would do it but it is in C

by the way did you not get a bulk email from the masm forum with the new web site ?

here it is http://masm32.com/bo...rd/index.php?��

that should get you in no problem

Link to comment

Hutch has change the server and all forum attached zip files

backup to a server

Apache directory listing for 2005 archive

http://www.masmforum.com/archive2005

Apache directory listing for 2012 archive

http://www.masmforum.com/archive2012/

Png Skin from Qweerdy can you download here

ppa.zip

http://forum.sources...563&attach_id=0

pngskin.zip

http://forum.sources...564&attach_id=0

pngskin3.zip

http://forum.sources...567&attach_id=0

pngskin4.zip

http://forum.sources...568&attach_id=0

scrollblend.zip

http://forum.sources...569&attach_id=0

PngStuff.zip

http://www.masmforum...96_PNGStuff.zip

Greets,

thanks ragdog I think pngskin4.zip does what I want ...I will look at it tonight when I get home

thank you again !!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...