2 CLASS(AnimHost) EXTENDS(Object)
3 METHOD(AnimHost, addAnim, void(entity, entity))
4 METHOD(AnimHost, removeAnim, void(entity, entity))
5 METHOD(AnimHost, removeAllAnim, void(entity))
6 METHOD(AnimHost, removeObjAnim, void(entity, entity))
7 METHOD(AnimHost, stopAllAnim, void(entity))
8 METHOD(AnimHost, stopObjAnim, void(entity, entity))
9 METHOD(AnimHost, resumeAllAnim, void(entity))
10 METHOD(AnimHost, resumeObjAnim, void(entity, entity))
11 METHOD(AnimHost, finishAllAnim, void(entity))
12 METHOD(AnimHost, finishObjAnim, void(entity, entity))
13 METHOD(AnimHost, tickAll, void(entity))
14 ATTRIB(AnimHost, firstChild, entity, NULL)
15 ATTRIB(AnimHost, lastChild, entity, NULL)
22 void AnimHost_addAnim(entity me, entity other)
25 error("Can't add already added anim!");
27 if(other.isFinished(other))
28 error("Can't add finished anim!");
36 l.nextSibling = other;
38 me.firstChild = other;
40 other.prevSibling = l;
41 other.nextSibling = NULL;
45 void AnimHost_removeAnim(entity me, entity other)
47 if(other.parent != me)
48 error("Can't remove from wrong AnimHost!");
53 n = other.nextSibling;
54 p = other.prevSibling;
68 void AnimHost_removeAllAnim(entity me)
71 for(e = me.firstChild; e; e = e.nextSibling)
75 me.removeAnim(me, tmp);
79 void AnimHost_removeObjAnim(entity me, entity obj)
82 for(e = me.firstChild; e; e = e.nextSibling)
88 me.removeAnim(me, tmp);
93 void AnimHost_stopAllAnim(entity me)
96 for(e = me.firstChild; e; e = e.nextSibling)
102 void AnimHost_stopObjAnim(entity me, entity obj)
105 for(e = me.firstChild; e; e = e.nextSibling)
114 void AnimHost_resumeAllAnim(entity me)
117 for(e = me.firstChild; e; e = e.nextSibling)
123 void AnimHost_resumeObjAnim(entity me, entity obj)
126 for(e = me.firstChild; e; e = e.nextSibling)
135 void AnimHost_finishAllAnim(entity me)
138 for(e = me.firstChild; e; e = e.nextSibling)
146 void AnimHost_finishObjAnim(entity me, entity obj)
149 for(e = me.firstChild; e; e = e.nextSibling)
160 void AnimHost_tickAll(entity me)
163 for(e = me.firstChild; e; e = e.nextSibling)
170 me.removeAnim(me, tmp);