48 int32_t
type = Data[0].getInt();
55 int32_t end = Data[3].getInt(), len = Data[4].getInt();
59 if (pos_for_animation)
62 if (end < 0 || end > max_end)
68 if (!pForObj)
return nullptr;
69 if (Data[4].getInt() == 0)
74 if (!pForObj)
return nullptr;
75 if (Data[4].getInt() == 0)
81 pForObj = Data[3].getObj();
82 if (!pForObj)
return nullptr;
85 if (!pForObj)
return nullptr;
86 if (Data[4].getInt() == 0)
90 if (!pForObj)
return nullptr;
91 if (Data[4].getInt() == 0)
95 if (!pForObj)
return nullptr;
96 if (Data[4].getInt() == 0)
100 if (!pForObj)
return nullptr;
101 if (Data[3].getInt() == 0)
105 if (!pForObj)
return nullptr;
106 if (Data[3].getInt() == 0)
110 if (!pForObj)
return nullptr;
111 if (Data[4].getInt() - Data[3].getInt() == 0)
116 if (!pForObj)
return nullptr;
117 if (Data[4].getInt() - Data[3].getInt() == 0)
121 if (!pForObj)
return nullptr;
124 if (!pForObj)
return nullptr;
127 if (!pForObj)
return nullptr;
130 if (!pForObj)
return nullptr;
133 if (!pForObj)
return nullptr;
152 Begin(begin), End(end), Length(length), Ending(ending), LastTick(
Game.FrameCounter)
162 assert( (End >= Begin &&
Value >= Begin) || (End <= Begin &&
Value <= Begin));
163 while ( (End > Begin &&
Value > End) || (End < Begin &&
Value < End))
168 Value -= (End - Begin);
199 pComp->
Value(Length);
201 pComp->
Value(mkEnumAdaptT<uint8_t>(Ending, Endings));
203 pComp->
Value(LastTick);
217 Object(object), Begin(begin), End(end), Length(length)
225 if(!Object)
return false;
227 Value += (End - Begin) * (Object->
xdir) / Length;
232 Value -= (End - Begin);
233 while (
Value < Begin)
234 Value += (End - Begin);
238 while (
Value > Begin)
239 Value -= (Begin - End);
241 Value += (Begin - End);
251 pComp->
Value(Object);
257 pComp->
Value(Length);
261 Object(object), Begin(begin), End(end), Length(length)
269 if(!Object)
return false;
271 Value += (End - Begin) * (Object->
ydir) / Length;
276 Value -= (End - Begin);
277 while (
Value < Begin)
278 Value += (End - Begin);
282 while (
Value > Begin)
283 Value -= (Begin - End);
285 Value += (Begin - End);
295 pComp->
Value(Object);
301 pComp->
Value(Length);
305 Object(object), Begin(begin), End(end)
313 if(!Object)
return false;
318 Value = Begin + (End - Begin) * r / 360;
326 pComp->
Value(Object);
334 Object(object), Begin(begin), End(end), Length(length)
342 if(!Object)
return false;
354 assert( (End >= Begin &&
Value >= Begin) || (End <= Begin &&
Value <= Begin));
355 while ( (End > Begin &&
Value > End) || (End < Begin &&
Value < End))
356 Value -= (End - Begin);
365 pComp->
Value(Object);
371 pComp->
Value(Length);
375 Object(object), Begin(begin), End(end), Length(length)
383 if(!Object)
return false;
387 assert( (End >= Begin &&
Value >= Begin) || (End <= Begin &&
Value <= Begin));
388 while ( (End > Begin &&
Value > End) || (End < Begin &&
Value < End))
389 Value -= (End - Begin);
398 pComp->
Value(Object);
404 pComp->
Value(Length);
408 Object(object), Begin(begin), End(end), Length(length)
416 if(!Object)
return false;
429 Value += (End - Begin) * dist / Length;
431 assert( (End >= Begin &&
Value >= Begin) || (End <= Begin &&
Value <= Begin));
432 while ( (End > Begin &&
Value > End) || (End < Begin &&
Value < End))
433 Value -= (End - Begin);
442 pComp->
Value(Object);
448 pComp->
Value(Length);
452 Object(object), Begin(begin), End(end), MaxXDir(max_xdir)
460 if(!Object)
return false;
462 Value = Begin + (End - Begin) * std::min<C4Real>(
Abs(Object->
xdir/MaxXDir),
itofix(1));
470 pComp->
Value(Object);
476 pComp->
Value(MaxXDir);
480 Object(object), Begin(begin), End(end), MaxYDir(max_ydir)
488 if(!Object)
return false;
490 Value = Begin + (End - Begin) * std::min<C4Real>(
Abs(Object->
ydir/MaxYDir),
itofix(1));
498 pComp->
Value(Object);
504 pComp->
Value(MaxYDir);
508 Object(object), Begin(begin), End(end), MinRDir(min_rdir), MaxRDir(max_rdir)
516 if(!Object)
return false;
518 C4Real val = (Object->
rdir - MinRDir) / (MaxRDir - MinRDir);
528 pComp->
Value(Object);
534 pComp->
Value(MaxRDir);
538 Object(object), Begin(begin), End(end), MinRDir(min_rdir), MaxRDir(max_rdir)
546 if(!Object)
return false;
548 C4Real val = (
Abs(Object->
rdir) - MinRDir) / (MaxRDir - MinRDir);
558 pComp->
Value(Object);
564 pComp->
Value(MaxRDir);
568 Object(object), Begin(begin), End(end), Offset(offset)
576 if(!Object)
return false;
586 pComp->
Value(Object);
592 pComp->
Value(Offset);
596 Object(object), Begin(begin), End(end), Offset(offset)
604 if(!Object)
return false;
614 pComp->
Value(Object);
620 pComp->
Value(Offset);
624 Object(object), Begin(begin), End(end), Offset(offset)
632 if(!Object)
return false;
646 pComp->
Value(Object);
652 pComp->
Value(Offset);
656 Object(object), Begin(begin), End(end), Offset(offset)
664 if(!Object)
return false;
678 pComp->
Value(Object);
684 pComp->
Value(Offset);
695 if(!Object)
return false;
717 pComp->
Value(Object);
C4Object * Object(C4PropList *_this)
StdMeshInstance::ValueProvider * CreateValueProviderFromArray(C4Object *pForObj, C4ValueArray &Data, const StdMeshAnimation *pos_for_animation)
void CompileFunc(C4Real &rValue, StdCompiler *pComp)
C4Fixed itofix(int32_t x)
C4Real Cos(const C4Real &fAngle)
int fixtoi(const C4Fixed &x)
C4Real Sin(const C4Real &fAngle)
int32_t Angle(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2, int32_t iPrec)
int32_t Distance(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2)
StdStrBuf FormatString(const char *szFmt,...)
StdMeshInstanceAnimationNode * Animation
C4PropList * GetAction() const
int32_t GetPropertyInt(C4PropertyName k, int32_t default_val=0) const
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
C4ValueProviderConst()=default
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
void CompileFunc(StdCompiler *pComp) override
virtual bool Separator(Sep eSep=SEP_SEP)
void Value(const T &rStruct)
virtual bool isDeserializer()
const StdMeshAnimation * GetAnimation() const
const char * getData() const