News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Animate region Project

Started by hfheatherfox07, March 28, 2012, 12:44:26 AM

Previous topic - Next topic

hfheatherfox07

Hi... Since I can create a region with out a .rgn file and I can animate bitmap to look like  .GIF ....
It should not be that hard to create an Animate region .....


----====EDIT====----

Sorry I removed the attachments...they seem to be crashing computers.... I will try to rework the entire code ...maybe using ticket count instead ...

hfheatherfox07

Hey I got It working so I re uploaded the attachment.....  ( that previous attachment was not the copy I intended to upload...that was just a messing around copy ...Sorry)

I have 2 little problems ....
1. there is a split second just at the start up were the window shows ...WHY?
2. also I can not seem to modify the speed of the animation ...any better way to set the timer?

So far I have seen this done only in VB ....now we have a MASM version working with a few bugs

any help will be appropriated ....

enjoy the animation   :bg

jj2007

Quote from: hfheatherfox07 on March 29, 2012, 01:48:29 AM
I have 2 little problems ....
1. there is a split second just at the start up were the window shows ...WHY?
2. also I can not seem to modify the speed of the animation ...any better way to set the timer?

Looks great, although a decent soundtrack should be added :green
That looks not so helpful:
invoke GetWindowLong,hWnd,GWL_EXSTYLE
invoke SetWindowLong,hWnd,GWL_EXSTYLE,eax


Speed depends on timer setting:
   invoke SetTimer,hWnd,ID_TIMER,500,0
You can see that background erase causes the split second. Suppress the appropriate message.

    .elseif  uMsg == WM_ERASEBKGND
    xor eax, eax
    inc eax
    ret

hfheatherfox07

I  know I have extra code in there ....but I was so happy to get it going .. Only the VB guys had animated regions as far as I know .....
every time I removed something it crashed .....


thanks I will try it tonight .....

Funny you should mention sound track .... I tried to convert "M83 - Midnight City"   http://www.youtube.com/watch?v=9aZFcosBTaQ   To .XM ( got to convert to .wav first)
I tried .XM shrink and all but I could not get it small enough

hfheatherfox07

#4
Quote from: jj2007 on March 29, 2012, 02:32:27 AM



You can see that background erase causes the split second. Suppress the appropriate message.

    .elseif  uMsg == WM_ERASEBKGND
    xor eax, eax
    inc eax
    ret


Yap that did it ... enjoy some animations  :U

qWord

that is really nice  :bg  :thumbu
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

#6
Quote from: jj2007 on March 29, 2012, 02:32:27 AM

Looks great, although a decent soundtrack should be added :green
That looks not so helpful:

Speed depends on timer setting:
   invoke SetTimer,hWnd,ID_TIMER,500,0
You can see that background erase causes the split second. Suppress the appropriate message.


If any body can figure this one out ..... I tried even invoke SetTimer,hWnd,ID_TIMER,1,0

But it is too slow with bigger .GIFS ...that is what I meant if there is another way to set the timer ...I tried a few ways today with the same result..... :(
Here is a bigger animation that I want to speed up but I do not know how.....????? :(

With music for you jj2007  ....
this is the Dubmood bouncing logo ...with track  "Cybernostra Weekend" from the album "Dubmood - The Mighty Pirate Sessions Volume 1"

I also included FSG compressor ...it makes the finished app 200+ KB from over 3.5 MG ( Better than UPX I think) ....
Maybe some one can figure this out..... :(
and yes there is still some extra code that needs to be cleaned up in the "animate proc"

hfheatherfox07

#7
the source+FSG

hfheatherfox07

#8
ARRGGGG
It seems that there is nothing wrong with the way I set the timer ......
my programming is wrong ...can anybody see why ? when I get the timer working properly I lose the regions....why ????
I stayed up till 530AM last night and a better part of the day today   :'(

that stuipd head .....bouncy,bouncy,bouncy,bouncy,

:'(

hfheatherfox07

#9
compiled version  :dazzled:

dedndave

seems to work ok, here
what is it supposed to do that it isn't doing ?

hfheatherfox07

Quote from: dedndave on March 31, 2012, 02:06:42 AM
seems to work ok, here
what is it supposed to do that it isn't doing ?

It lost the region there is a window behind it ......Look over a darker background


Were is your Avatar ...?  I liked it

hfheatherfox07

If you look at the previous one....... in the previous post there is no background ...all region but timer not working ....
I am not releasing something but I can figure out what

dedndave

mov esi,himage
lodsd
invoke AnimateProc,hWnd,eax
add himage,71


ok - i don't get the 71 thing
but - you use ESI without preserving it
you could use EDX
mov edx,himage
invoke AnimateProc,hWnd,[edx]
add himage,71


hfheatherfox07

#14
That made no change .... the 71 gets the next image like a loop ...there are 71 images ....
I think my approach is wrong ..... instead of "AnimateProc" ....
I think there I will use something like :

mov esi,himage
lodsd
jmp Animate_paint
add himage,71

Animate_paint:

.elseif uMsg == WM_PAINT

invoke BeginPaint,hWnd,addr ps
invoke GetWindowDC,hWnd
mov hdc,eax
invoke CreateCompatibleDC,hdc
mov hMemDC,eax



ETC..........



I just dunno if I should use jump or call and what order to have it all   ::)