Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: iPodFoo on August 25, 2006, 07:12:55 AM

Title: Animated graphics
Post by: iPodFoo on August 25, 2006, 07:12:55 AM
Hi.

Im trying to get the virtual hard drive on the Nano to show an animated graphic when in use, but for the life of me, I just cannot get it to work. I would have thought the following would work:

%?lh<%t0.1%xdp;%t0.1%xdq;%t0.1%xdr;%t0.1%xds;%t0.1%xdt;%t0.1%xdu|%xdv>

(%xdv being a blank). I want the image to flash up for 0.1 second then show the next one else show nothing.

But the above just stays on the image ID t for some reason.

If I do:

%?lh<%t0.1 %xdp;%t0.1 %xdq;%t0.1 %xdr;%t0.1 %xds;%t0.1 %xdt;%t0.1 %xdu|%xdv>

with spaces after the %t numbers it displays the animation fine, but its always on, and displays the blank in sequence as well.

Any ideas whats going on? Do I need to nest it somehow?

Ive had a look around for more info but couldnt find much. Cheers for any help.
Title: Re: Animated graphics
Post by: madcow on August 25, 2006, 07:25:07 AM
Having the same problem.
Tried the same things you did returning the same errors. (X5)

Very frustrating.
Title: Re: Animated graphics
Post by: iPodFoo on August 25, 2006, 05:42:14 PM
 >:(

Still no luck, but thought Id post what else Ive tried:

%t0.1 %?hl<%xdp|%xdv>;%t0.1 %?hl<%xdq|%xdv>;%t0.1 %?hl<%xdr|%xdv>;%t0.1 %?hl<%xds|%xdv>;%t0.1 %?hl<%xdt|%xdv>;%t0.1 %?hl<%xdu|%xdv>

Still no go.  :(

Any help on this would be appreciated. Thanks.
Title: Re: Animated graphics
Post by: Yotto on August 25, 2006, 10:29:58 PM
I like this idea, though I wonder how much battery it will eat if you can get it working

I am sadly very busy right now on non-rockbox stuff (I'm terribly late with my podcast) but when I DO have time, assuming you don't get this licked, I will definately give this a look.  Sadly, it could be as late as Monday night or Tuesday before that happens :(
Title: Re: Animated graphics
Post by: iPodFoo on August 26, 2006, 06:03:55 AM
There is a skin included with rockbox called iCatcher which might be of use.

It uses an animated icon which runs continually except when u set the volume. Dont think theres any mention of a drain in battery even tho it runs pretty much continuosly.

I still cant seem to adapt it to the virtual led.  >:(

Somebody must know how to get this working.

Cheers.

ps. Best of luck Yotto!
Title: Re: Animated graphics
Post by: scorche on August 26, 2006, 07:07:13 AM
Correct me if I am wrong (I just might be), but have a look at this and tell me if this is what you are trying to do or not.

http://www.rockbox.org/twiki/bin/view/Main/WpsIpodMini#Dancing_Megaman
Title: Re: Animated graphics
Post by: madcow on August 26, 2006, 08:07:16 AM
Interesting scorche!

That one is using: %?lh<%t0.2%xdtz|%t0.2%xsdz>;%?lh<%t0.2%xduz|%t0.2%xdsz>

I'm gonna give this a try, but what is the z?
%?lh<%t0.2%xdtz
Title: Re: Animated graphics
Post by: iPodFoo on August 26, 2006, 08:36:49 AM
Currently trying it out. megaman one seems to work on the nano. but not with my images. i suspect there may be a filesize limit or something preventing it from getting displayed.

I also wonder what the z is for as theres no reference to it in the preload images list. It seems to diplay the letter z just out of sight from the screen.  :-\
Title: Re: Animated graphics
Post by: madcow on August 26, 2006, 08:48:13 AM
Not working.
Came out the same as I was trying before: messed up by transparency and when not transparent it will only display the last image.
Title: Re: Animated graphics
Post by: drippydonut on August 26, 2006, 02:13:19 PM
Methinks I've come across this problem before in some Misticriver thread; let me just have a dig around...


EDIT: Ah yeah- it was discovered that for some reason %al tags had to be added before each %t...

Quote from: Yngwiejo
Hurray!!! :)

Eventually this worked like a charm for me:
Code: [Select]
%xl|A|bat0.bmp|194|9|
%xl|B|bat1.bmp|194|9|
%xl|C|bat2.bmp|194|9|
%xl|D|bat3.bmp|194|9|
%xl|E|bat4.bmp|194|9|
%al%t0.5%?bp<%xdA|%?bl<%al%xdA|%xdB|%xdC|%xdD|%xdE>>;%al%t0.5%?bp<%xdB|%?bl<%al%xdA|%xdB|%xdC|%xdD|%xdE>>;%al%t0.5%?bp<%xdC|%?bl<%al%xdA|%xdB|%xdC|%xdD|%xdE>>;%al%t0.5%?bp<%xdD|%?bl<%al%xdA|%xdB|%xdC|%xdD|%xdE>>;%al%t0.5%?bp<%xdE|%?bl<%al%xdA|%xdB|%xdC|%xdD|%xdE>>
I don't understand why I have to put "%al" (left aligned text) before "%t" but it doesn't work without it! BTW, flash62, you forgot to load bat4.bmp in your code.
Title: Re: Animated graphics
Post by: madcow on August 27, 2006, 07:15:07 AM
Doesn't work with the %al...
Must be something with the virtual led...

Right now I have:

%xl|w|hdd1.bmp|73|0|
%xl|x|hdd2.bmp|73|0|
%xl|y|hdd3.bmp|73|0|
%xl|z|hdd4.bmp|73|0|
%t0.5 %?lh<%xdw|>; %t0.5 %?lh<%xdx|>; %t0.5 %?lh<%xdy|>; %t0.5 %?lh<%xdz|>;

They're transparent hourglasses, situation now: turns correct but the last image is always shown even after hdd has stopped.
Help!
Title: Re: Animated graphics
Post by: Genre9mp3 on August 27, 2006, 07:32:48 AM
The "%al" thing is not necessary. The code in the 3rd post should normaly work. So either the virtual led in the wps code has some type of bug or the bmps for some reason aren't preloaded correctly.
Title: Re: Animated graphics
Post by: Farpenoodle on August 27, 2006, 09:52:14 AM
It's been a long time since I made that WPS so I really can't for the life of me remember why I put a z after each %xd*. But I just tried taking away the z and it stopped working. So I'm going to have to assume that I was just playing around trying to get it working when all of a sudden I decided to put letters at the end of all my image display tags. Sorry if that's not particularly helpful. :p
Title: Re: Animated graphics
Post by: iPodFoo on August 31, 2006, 05:28:03 AM
Anybody have any luck with this? Im still stuck on it. Closest Ive got is it does its thing, but when the hd has finished it just loops thru all the frames of the animation. :(

Code im using (trying out the z thang):

%?lh<%al%t0.2%xdpz|%al%t0.2%xdvz>;%?lh<%al%t0.2%xdqz|%al%t0.2%xdvz>;%?lh<%al%t0.2%xdrz|%al%t0.2%xdvz>;%?lh<%al%t0.2%xdsz|%al%t0.2%xdvz>;%?lh<%al%t0.2%xdtz|%al%t0.2%xdvz>;%?lh<%al%t0.2%xduz|%al%t0.2%xdvz>
Title: Re: Animated graphics
Post by: MrMEC on September 05, 2006, 10:57:39 AM
No idea if this will work (I've never gotten animation to work, but I also haven't tried in ages), and can't test it.  But did you try this?

%?lh<%t0.2%xdp|>;%?lh<%t0.2%xdq|>;%?lh<%t0.2%xdr|>;%?lh<%t0.2%xds|>;%?lh<%t0.2%xdt|>;%?lh<%t0.2%xdu|>

or this?

%?lh<%t0.2 %xdp|>;%?lh<%t0.2 %xdq|>;%?lh<%t0.2 %xdr|>;%?lh<%t0.2 %xds|>;%?lh<%t0.2 %xdt|>;%?lh<%t0.2 %xdu|>

or this?

%t0.2 %?lh<%xdp|>;%t0.2 %?lh<%xdq|>;%t0.2 %?lh<%xdr|>;%t0.2 %?lh<%xds|>;%t0.2 %?lh<%xdt|>;%t0.2 %?lh<%xdu|>

Seems like one of these would have to work, or else I really don't know.    :-\
Title: Re: Animated graphics
Post by: Hweb21 on September 05, 2006, 08:33:09 PM
Try combining lines together. That’s how I got an animated background with text on top of it. Like these. (these are a year old so it might not work)

this = animation plus time
%t0.2%xdb%ac%pc/%pt;%t0.2%xdc%ac%pc/%pt;%t0.2%xdd%ac%pc/%pt;%t0.2%xde%ac%pc/%pt;

or

this = info plus animation
%?it<%t1.5%s%ac%it|%t1.5%ac Title Unknown>;%t1.5%xdc;%?it<%t1.5%s%ac%it|%t1.5%ac Title Unknown>
%?ia<%t1%s%ac%ia|%t1%ac Artist Unknown>;%t1%xdd;%?ia<%t1%s%ac%ia|%t1%ac Artist Unknown>
%t.5%ac%pc;%t.5%xde;%t.5%ac%pt;%t1%xde
%xdf
Title: Re: Animated graphics
Post by: iPodFoo on September 06, 2006, 10:58:52 AM
To MrMEC:

Cheers for those. The last two lines works!

Quote
%?lh<%t0.2 %xdp|>;%?lh<%t0.2 %xdq|>;%?lh<%t0.2 %xdr|>;%?lh<%t0.2 %xds|>;%?lh<%t0.2 %xdt|>;%?lh<%t0.2 %xdu|>

or this?

%t0.2 %?lh<%xdp|>;%t0.2 %?lh<%xdq|>;%t0.2 %?lh<%xdr|>;%t0.2 %?lh<%xds|>;%t0.2 %?lh<%xdt|>;%t0.2 %?lh<%xdu|>

Huzzah!

To HWEB21:

I didnt get a chance to try your ideas out but they look interesting. So might try em on a new wps.

Thanks everyone.  ;D
Title: Re: Animated graphics
Post by: MrMEC on September 06, 2006, 12:17:59 PM
Awesome!  Maybe I should try some animation out myself sometime.   ;)
Title: Re: Animated graphics
Post by: Hweb21 on September 06, 2006, 08:24:10 PM
thxs, yeah i created a wps that looks like this but with text over it for h120 long ago

top was song info
(http://img.photobucket.com/albums/v282/gregken/thHeadbangers.gif)
bottom was status

but i never could get the wps upload to work

i love playing around with animation but its limited when u have a screen size 160 by 128
Title: Re: Animated graphics
Post by: Yotto on September 06, 2006, 09:01:54 PM
Wow, that's cool.  I've been considering something a bit similar, but everything going at different speeds (Individual bitmaps).  I can't imagine, though, that it's very good on battery life.  How much worse is your WPS on the battery than a static one?
Title: Re: Animated graphics
Post by: Hweb21 on September 06, 2006, 09:52:47 PM
hm, yeah, they were always off a bit. It didn't affect battery life much because i limited the info a lot. Now people make them with every bit of detail, come on, year? Why we need that lol. though its ns for some people and sometimes.

since they were never insyc i used random lines like this with each had different info, it was kool at first but got kinda dizy
(http://img.photobucket.com/albums/v282/gregken/cool.gif)
well this one, the info moved up and changed