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!");
54 n = other.nextSibling;
55 p = other.prevSibling;
69 void AnimHost_removeAllAnim(entity me)
72 for(e = me.firstChild; e; e = e.nextSibling)
76 me.removeAnim(me, tmp);
80 void AnimHost_removeObjAnim(entity me, entity obj)
83 for(e = me.firstChild; e; e = e.nextSibling)
89 me.removeAnim(me, tmp);
94 void AnimHost_stopAllAnim(entity me)
97 for(e = me.firstChild; e; e = e.nextSibling)
103 void AnimHost_stopObjAnim(entity me, entity obj)
106 for(e = me.firstChild; e; e = e.nextSibling)
115 void AnimHost_resumeAllAnim(entity me)
118 for(e = me.firstChild; e; e = e.nextSibling)
124 void AnimHost_resumeObjAnim(entity me, entity obj)
127 for(e = me.firstChild; e; e = e.nextSibling)
136 void AnimHost_finishAllAnim(entity me)
139 for(e = me.firstChild; e; e = e.nextSibling)
147 void AnimHost_finishObjAnim(entity me, entity obj)
150 for(e = me.firstChild; e; e = e.nextSibling)
161 void AnimHost_tickAll(entity me)
164 for(e = me.firstChild; e; e = e.nextSibling)
171 me.removeAnim(me, tmp);