playing an animation in a frame

For code related discussions and questions
Post Reply
hani_l
New user
Posts: 4
Joined: 21 Oct 2012, 01:10

playing an animation in a frame

Post by hani_l »

Hi there
I am trying to play an animation or a sequence as the bdrops in the menu , does any one has an idea how is this possible ?!
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: playing an animation in a frame

Post by aubergine »

You'd probably have to change the C++ code to make that happen. Currently backdrops are just static images.

That being said, depending on which library is used to display images, it might support animated gifs if renamed to .png (I assume any decent image library will look at file headers to correctly determine what type of image format it is)?

All the info I have on the backdrops is in the wiki: https://warzone.atlassian.net/wiki/disp ... kdrop+Mods
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: playing an animation in a frame

Post by NoQ »

I wish wz supported APNGs as textures ... oh, sorry, it's not the corrupt-a-wish thread.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: playing an animation in a frame

Post by aubergine »

That would indeed be a dream. Although is there much software yet for creating APNGs? Last time I looked, a few years back, APNG was still a very obscure thing with almost no support in graphics apps, etc.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: playing an animation in a frame

Post by Emdek »

aubergine, support would be more wide if it would be official extension for PNG specification... I've looked in their specification (for APNG) long time ago and AFAIR it wasn't very complex, AFAIK basically file consisted of standard PNG data (for backwards compatibility) followed by by some chunks defining behavior of next frame and frame data.
Well, exact definitions and list of software that supports it is available on WIkipedia:
http://en.wikipedia.org/wiki/APNG
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
hani_l
New user
Posts: 4
Joined: 21 Oct 2012, 01:10

Re: playing an animation in a frame

Post by hani_l »

thanx all for your replies , yes I know i have to change the code but i want to change as little as possible and the animation i want to play is not a long one , it can be as short as 60 frames! but i want to play it in a loop (a background and a burning flame and a waving flag!) i was thinking about refreshing the bdrops on intervals!! but to be honest i am new at this and i am not sure if this is gonna work or if it works if it is the best way to do it
Post Reply