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!");
37 l.nextSibling = other;
39 me.firstChild = other;
41 other.prevSibling = l;
42 other.nextSibling = NULL;
46 void AnimHost_removeAnim(entity me, entity other)
48 if(other.parent != me)
49 error("Can't remove from wrong AnimHost!");
56 n = other.nextSibling;
57 p = other.prevSibling;
70 void AnimHost_removeAllAnim(entity me)
73 for(e = me.firstChild; e; e = e.nextSibling)
77 me.removeAnim(me, tmp);
81 void AnimHost_removeObjAnim(entity me, entity obj)
84 for(e = me.firstChild; e; e = e.nextSibling)
90 me.removeAnim(me, tmp);
95 void AnimHost_stopAllAnim(entity me)
98 for(e = me.firstChild; e; e = e.nextSibling)
104 void AnimHost_stopObjAnim(entity me, entity obj)
107 for(e = me.firstChild; e; e = e.nextSibling)
116 void AnimHost_resumeAllAnim(entity me)
119 for(e = me.firstChild; e; e = e.nextSibling)
125 void AnimHost_resumeObjAnim(entity me, entity obj)
128 for(e = me.firstChild; e; e = e.nextSibling)
137 void AnimHost_finishAllAnim(entity me)
140 for(e = me.firstChild; e; e = e.nextSibling)
144 me.removeAnim(me, tmp);
149 void AnimHost_finishObjAnim(entity me, entity obj)
152 for(e = me.firstChild; e; e = e.nextSibling)
158 me.removeAnim(me, tmp);
164 void AnimHost_tickAll(entity me)
167 for(e = me.firstChild; e; e = e.nextSibling)
171 for(e = me.firstChild; e; e = e.nextSibling)
177 me.removeAnim(me, tmp);