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 ...
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
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
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
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
that is really nice :bg :thumbu
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"
the source+FSG
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,
:'(
compiled version :dazzled:
seems to work ok, here
what is it supposed to do that it isn't doing ?
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
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
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
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 ::)
Seems like there are several bugs, or at least obscurities in your code: e.g.
himages db 71*71 dup(?) ,
add himage,71, ... :dazzled:
Also, this one works, but is a unacceptable performance killer:
Quoteloop construct
invoke GetPixel,var_hDC,var_X,var_Y
loop construct end
Quote from: qWord on April 01, 2012, 02:08:16 AM
Seems like there are several bugs, or at least obscurities in your code: e.g. himages db 71*71 dup(?) , add himage,71, ... :dazzled:
Also, this one works, but is a unacceptable performance killer:
Quoteloop construct
invoke GetPixel,var_hDC,var_X,var_Y
loop construct end
I am sorry ...at the risk of sounding stuipd ...I don't get that " invoke GetPixel,var_hDC,var_X,var_Y"
I should probably upload the example of animate bitmaps so you can see the source were
I am getting the 71 thing ....there are 71 images .....
I posting a reply but I t edited my second post I tried it this way too...
ARRGGG back to the drawing board I just dot see it ..... am I doing the above right ?
Quote from: qWord on April 01, 2012, 02:08:16 AM
Seems like there are several bugs, or at least obscurities in your code: e.g. himages db 71*71 dup(?) , add himage,71, ... :dazzled:
Also, this one works, but is a unacceptable performance killer:
Quoteloop construct
invoke GetPixel,var_hDC,var_X,var_Y
loop construct end
OK you are right about the "images db 71*71 dup(?)" there was no need for that ..... I took every body's advise and I am still stuck .....
what am I doing wrong now? I went back to the smaller animation .... if you comment out "call MakeRegion" in "animate BMP with region" you will see the speed that it should be ...also an example with out region that will show the speed that it should be ... :'(
..... I also included a bitbit image example from an old MASM version.... how can I bitbit the image there without # values in the center of the screen .....
I have been using :
push rect.bottom
push rect.right
invoke BitBlt,hDC,0,0,rect.right,rect.bottom,hMemDC,0,0,SRCCOPY
how else can I do it ??
:(