comparison engine/core/video/animation.cpp @ 205:54bfd1015b35

* PyChan event handling rework (part I) ** Unified listeners ** ...hopefully more robust attach/detach code. * Added compat, layout and also the new autopsition feature. * Documentation * Minor style fixes in core.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 14 Mar 2009 12:13:29 +0000
parents 6e7d228def30
children 3804348fe3fb
comparison
equal deleted inserted replaced
204:5816ab527da8 205:54bfd1015b35
44 m_animation_endtime(-1), 44 m_animation_endtime(-1),
45 m_direction(0) { 45 m_direction(0) {
46 } 46 }
47 47
48 Animation::~Animation() { 48 Animation::~Animation() {
49 // std::vector<FrameInfo>::const_iterator i(m_frames.begin()); 49 // note: we don't need to free the images, as they are handled via
50 // while (i != m_frames.end()) { 50 // smart references.
51 // i->img->decRef();
52 // i++;
53 // }
54 } 51 }
55
56 // void Animation::addFrame(Image* image, unsigned int duration) {
57 // addFrame(ResourcePtr(image),duration);
58 // }
59 52
60 void Animation::addFrame(ResourcePtr image, unsigned int duration) { 53 void Animation::addFrame(ResourcePtr image, unsigned int duration) {
61 FrameInfo info; 54 FrameInfo info;
62 info.index = m_frames.size(); 55 info.index = m_frames.size();
63 info.duration = duration; 56 info.duration = duration;