forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GIF library

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Gefa



Joined: 13 Aug 2008
Posts: 12
Location: Italy

PostPosted: Fri Aug 22, 2008 11:17 pm    Post subject: GIF library Reply with quote

I need to use some animated GIF in my HB game written with OSLib, but I don't know how to do.
My question is: exist a library that allows me to implement animated GIF in my project?

tnx, and sorry for my bad english
_________________
For my PSP project, visit my web site: www.gefa.altervista.org

PaintMIXER v2.6.0 released: http://www.neoflash.com/forum/index.php/topic,5253.0.html
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Sat Aug 23, 2008 12:14 am    Post subject: Reply with quote

you can simply display the frames of the gif one after the other with a time gap between ofcourse. use any libraryable to display pictures
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Aug 23, 2008 2:35 am    Post subject: Reply with quote

http://forums.ps2dev.org/viewtopic.php?t=10005

Toward the bottom I post giflib and a version of the cursortest program showing how to load and display an anigif.
Back to top
View user's profile Send private message AIM Address
PosX100



Joined: 15 Aug 2007
Posts: 98

PostPosted: Sat Aug 23, 2008 4:33 am    Post subject: Reply with quote

There's no reason to use gif library.

There are 2 ways to create animations:

    a)Create a large texture with all frames.
    All textures must have the same width & height.

    b)Just use simple image files(jpeg/png/tga/tga rle/anything), code a custom animation structure that will hold each texture.


Animating:
    Increase frame time counter while its less than max frame time

    Go to next texture if time counter reached max frame time

    Render active texture


Calculating frame time :
    time - last time + frame time counter.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group