22 #include "C4Version.h"
35 const char * cpFormat = FnStringPar(szFormatPar);
41 while (*cpFormat && (*cpFormat!=
'%'))
47 for (cpType=cpFormat+1; *cpType && (*cpType ==
'+' || *cpType ==
'-' || *cpType ==
'.' || *cpType ==
'#' || *cpType ==
' ' ||
Inside(*cpType,
'0',
'9')); cpType++) {}
49 SCopy(cpFormat,szField,std::min<unsigned int>(
sizeof szField - 1, cpType - cpFormat + 1));
54 case 'd':
case 'x':
case 'X':
56 if (cPar >= ParCount)
throw C4AulExecError(
"format placeholder without parameter");
58 cpFormat+=
SLen(szField);
64 if (cPar >= ParCount)
throw C4AulExecError(
"format placeholder without parameter");
66 cpFormat+=
SLen(szField);
74 if (cPar >= ParCount)
throw C4AulExecError(
"format placeholder without parameter");
75 StringBuf.
Append(
static_cast<const StdStrBuf&
>(Pars[cPar++].GetDataString(10)));
76 cpFormat+=
SLen(szField);
83 if (cPar >= ParCount)
throw C4AulExecError(
"format placeholder without parameter");
84 const char *szStr =
"(null)";
85 if (Pars[cPar].GetData())
88 if (!pStr)
throw C4AulExecError(
"string format placeholder without string");
93 cpFormat+=
SLen(szField);
98 cpFormat+=
SLen(szField);
112 C4AulFunc(Parent, pDef->Identifier), Def(pDef)
127 #define MAKE_AND_RETURN_ARRAY(values) do { \
128 C4ValueArray *matrix = new C4ValueArray(sizeof(values) / sizeof(*values)); \
129 for (size_t i = 0; i < sizeof(values) / sizeof(*values); ++i) \
130 (*matrix)[i] = C4VInt(values[i]); \
158 if (sy == 0 && sz == 0)
174 long sqrt_val = rx * rx + ry * ry + rz * rz;
175 long n = long(sqrt(
double(sqrt_val)));
176 if (n * n < sqrt_val) n++;
177 else if (n * n > sqrt_val) n--;
184 rx = (1000 * rx) / n;
185 ry = (1000 * ry) / n;
186 rz = (1000 * rz) / n;
190 rx*rx*(1000-c)/1000000+c, rx*ry*(1000-c)/1000000-rz*
s/1000, rx*rz*(1000-c)/1000000+ry*
s/1000, 0,
191 ry*rx*(1000-c)/1000000+rz*
s/1000, ry*ry*(1000-c)/1000000+c, ry*rz*(1000-c)/1000000-rx*
s/1000, 0,
192 rz*rx*(1000-c)/1000000-ry*
s/1000, ry*rz*(1000-c)/1000000+rx*
s/1000, rz*rz*(1000-c)/1000000+c, 0
199 const int32_t matrixSize = 12;
215 if (!factorArray || factorArray->
GetSize() != matrixSize)
continue;
221 for (int32_t c = 0; c < matrixSize; ++c)
222 values[c] = (*factorArray)[c].getInt();
227 long values_rhs[matrixSize], values_result[matrixSize];
228 for (int32_t c = 0; c < matrixSize; ++c)
229 values_rhs[c] = (*factorArray)[c].getInt();
232 values_result[ 0] = values[0]*values_rhs[0]/1000 + values[1]*values_rhs[4]/1000 + values[ 2]*values_rhs[ 8]/1000;
233 values_result[ 1] = values[0]*values_rhs[1]/1000 + values[1]*values_rhs[5]/1000 + values[ 2]*values_rhs[ 9]/1000;
234 values_result[ 2] = values[0]*values_rhs[2]/1000 + values[1]*values_rhs[6]/1000 + values[ 2]*values_rhs[10]/1000;
235 values_result[ 3] = values[0]*values_rhs[3]/1000 + values[1]*values_rhs[7]/1000 + values[ 2]*values_rhs[11]/1000 + values[3];
236 values_result[ 4] = values[4]*values_rhs[0]/1000 + values[5]*values_rhs[4]/1000 + values[ 6]*values_rhs[ 8]/1000;
237 values_result[ 5] = values[4]*values_rhs[1]/1000 + values[5]*values_rhs[5]/1000 + values[ 6]*values_rhs[ 9]/1000;
238 values_result[ 6] = values[4]*values_rhs[2]/1000 + values[5]*values_rhs[6]/1000 + values[ 6]*values_rhs[10]/1000;
239 values_result[ 7] = values[4]*values_rhs[3]/1000 + values[5]*values_rhs[7]/1000 + values[ 6]*values_rhs[11]/1000 + values[7];
240 values_result[ 8] = values[8]*values_rhs[0]/1000 + values[9]*values_rhs[4]/1000 + values[10]*values_rhs[ 8]/1000;
241 values_result[ 9] = values[8]*values_rhs[1]/1000 + values[9]*values_rhs[5]/1000 + values[10]*values_rhs[ 9]/1000;
242 values_result[10] = values[8]*values_rhs[2]/1000 + values[9]*values_rhs[6]/1000 + values[10]*values_rhs[10]/1000;
243 values_result[11] = values[8]*values_rhs[3]/1000 + values[9]*values_rhs[7]/1000 + values[10]*values_rhs[11]/1000 + values[11];
245 for (int32_t c = 0; c < matrixSize; ++c)
246 values[c] = values_result[c];
251 for (
size_t i = 0; i <
sizeof(values) /
sizeof(*values); ++i)
252 (*matrix)[i] =
C4VInt(values[i]);
256 #undef MAKE_AND_RETURN_ARRAY
267 if (!pObj) pObj = _this;
277 if (!pObj) pObj = _this;
278 if (!pObj)
return false;
279 if (!key)
return false;
288 if (!pObj) pObj = _this;
289 if (!pObj)
return false;
290 if (!key)
return false;
331 if (name) fn = _this->
GetFunc(name);
335 const char *
s = FnStringPar(name);
345 return fn->
Exec(_this, &ParSet,
true);
361 int iPrio,
int iTimerInterval,
C4PropList * pCmdTarget,
C4Def * idCmdTarget,
366 if (!szEffect || !*szEffect->
GetCStr() || !iPrio)
return C4Value();
369 if (!p) p = idCmdTarget;
372 szEffect, iPrio, iTimerInterval, p, Val1, Val2, Val3, Val4);
374 if (!pEffect)
return C4Value();
381 if (!prototype || !(prototype->
GetName()[0]))
throw C4AulExecError(
"CreateEffect needs a prototype with a name");
382 if (!iPrio)
throw C4AulExecError(
"CreateEffect needs a nonzero priority");
385 Val1, Val2, Val3, Val4);
392 const char *szEffect = FnStringPar(psEffectName);
395 if (!pEffect)
return nullptr;
397 if (szEffect && *szEffect)
398 return pEffect->
Get(szEffect, index, iMaxPriority);
405 const char *szEffect = FnStringPar(psEffectName);
413 if (!pEffect)
return false;
415 if (szEffect && *szEffect)
416 pEffect = pEffect->
Get(szEffect, 0);
420 if (!pEffect)
return false;
432 int iPrio,
int iTimerInterval,
435 const char *szEffect = FnStringPar(psEffectName);
438 if (!szEffect || !*szEffect)
return C4Value();
441 if (!pEffect)
return C4Value();
443 C4Effect * r = pEffect->
Check(szEffect, iPrio, iTimerInterval, Val1, Val2, Val3, Val4);
452 const char *szEffect = FnStringPar(psEffectName);
455 if (!pEffect)
return false;
457 if (!*szEffect) szEffect =
nullptr;
458 return pEffect->
GetCount(szEffect, iMaxPriority);
466 const char *szCallFn = FnStringPar(Pars[2].getStr());
469 if (!szCallFn || !*szCallFn)
return C4Value();
470 if (!pEffect)
return C4Value();
472 return pEffect->
DoCall(pTarget, szCallFn, Pars[3], Pars[4], Pars[5], Pars[6], Pars[7], Pars[8], Pars[9]);
478 Regex_CaseInsensitive = (1 << 0),
479 Regex_FirstOnly = (1 << 1);
481 static std::regex_constants::syntax_option_type C4IntToSyntaxOption(
long flags)
483 std::regex_constants::syntax_option_type out = std::regex::ECMAScript;
484 if (flags & Regex_CaseInsensitive)
485 out |= std::regex::icase;
489 static std::regex_constants::match_flag_type C4IntToMatchFlag(
long flags)
491 std::regex_constants::match_flag_type out = std::regex_constants::match_default;
492 if (flags & Regex_FirstOnly)
493 out |= std::regex_constants::format_first_only;
499 if (!source || !regex || !replacement)
return C4Void();
502 std::regex re(regex->
GetCStr(), C4IntToSyntaxOption(flags));
503 std::string out = std::regex_replace(source->
GetCStr(), re, replacement->
GetCStr(), C4IntToMatchFlag(flags));
506 catch (
const std::regex_error& e)
515 if (!source || !regex)
return C4Void();
518 std::regex re(regex->
GetCStr(), C4IntToSyntaxOption(flags));
520 const auto &data = source->
GetData();
525 while (pos <= data.getLength() && std::regex_search(data.getData() + pos, data.getData() + data.getLength(), m, re))
527 int char_pos =
GetCharacterCount(std::string(data.getData(), pos + m.position()).c_str());
528 (*out)[i++] =
C4VInt(char_pos);
529 if (flags & Regex_FirstOnly)
break;
530 pos += m.position() + std::max<size_t>(m.length(), 1);
534 catch (
const std::regex_error& e)
542 if (!source || !regex)
return C4Void();
545 std::regex re(regex->
GetCStr(), C4IntToSyntaxOption(flags));
547 const auto &data = source->
GetData();
551 while (pos <= data.getLength() && std::regex_search(data.getData() + pos, data.getData() + data.getLength(), m, re))
560 if (flags & Regex_FirstOnly)
break;
561 pos += m.position() + std::max<size_t>(m.length(), 1);
565 catch (
const std::regex_error& e)
573 if (!source || !regex)
return C4Void();
576 std::regex re(regex->
GetCStr(), C4IntToSyntaxOption(flags));
578 const auto &data = source->
GetData();
582 while (pos <= data.getLength() && std::regex_search(data.getData() + pos, data.getData() + data.getLength(), m, re))
586 std::string substr(data.getData() + pos, std::max<size_t>(m.position(), 1));
588 if (flags & Regex_FirstOnly)
break;
589 pos += m.position() + std::max<size_t>(m.length(), 1);
591 if (pos <= data.getLength())
593 std::string substr(data.getData() + pos, data.getLength() - pos);
598 catch (
const std::regex_error& e)
625 const char *cstr = str->
GetCStr();
626 const char *end =
nullptr;
627 int32_t result =
StrToI32(cstr, 10, &end);
628 if (end == cstr || *end !=
'\0')
return C4Void();
632 static long FnAbs(
C4PropList * _this,
long iVal)
637 static long FnSin(
C4PropList * _this,
long iAngle,
long iRadius,
long iPrec)
639 if (!iPrec) iPrec = 1;
641 iAngle %= 360 * iPrec;
646 static long FnCos(
C4PropList * _this,
long iAngle,
long iRadius,
long iPrec)
648 if (!iPrec) iPrec = 1;
649 iAngle %= 360 * iPrec;
653 static long FnSqrt(
C4PropList * _this,
long iValue)
655 if (iValue<0)
return 0;
656 long iSqrt = long(sqrt(
double(iValue)));
657 if (iSqrt * iSqrt < iValue) iSqrt++;
658 if (iSqrt * iSqrt > iValue) iSqrt--;
662 static long FnAngle(
C4PropList * _this,
long iX1,
long iY1,
long iX2,
long iY2,
long iPrec)
665 if (!iPrec) iPrec = 1;
666 return Angle(iX1, iY1, iX2, iY2, iPrec);
669 static long FnArcSin(
C4PropList * _this,
long iVal,
long iRadius)
672 if (!iRadius)
return 0;
673 if (iVal > iRadius)
return 0;
676 f1 = asin(f1/iRadius)*180.0/M_PI;
678 return (
long) floor(f1+0.5);
681 static long FnArcCos(
C4PropList * _this,
long iVal,
long iRadius)
684 if (!iRadius)
return 0;
685 if (iVal > iRadius)
return 0;
688 f1 = acos(f1/iRadius)*180.0/M_PI;
690 return (
long) floor(f1+0.5);
701 return std::make_pair(
a,
b);
706 if (
a->GetSize() == 0)
707 return std::make_pair(
nullptr,
nullptr);
709 if (!
a->GetItem(0).CheckConversion(
C4V_Int))
711 throw C4AulExecError(
FormatString(
"%s: argument 1 must be int or array-of-int, but element %d of array is of type %s", func, 0,
a->GetItem(0).GetTypeName()).
getData());
714 min = max =
a->GetItem(0).getInt();
716 for (int32_t i = 1; i <
a->GetSize(); ++i)
718 if (!
a->GetItem(i).CheckConversion(
C4V_Int))
720 throw C4AulExecError(
FormatString(
"%s: argument 1 must be int or array-of-int, but element %d of array is of type %s", func, i,
a->GetItem(i).GetTypeName()).
getData());
722 int32_t value =
a->GetItem(i).getInt();
723 min = std::min(min, value);
724 max = std::max(max, value);
727 return std::make_pair(min, max);
737 return minmax(
"Min",
a,
b).first;
742 return minmax(
"Max",
a,
b).second;
745 static long FnDistance(
C4PropList * _this,
long iX1,
long iY1,
long iX2,
long iY2)
750 static long FnBoundBy(
C4PropList * _this,
long iVal,
long iRange1,
long iRange2)
752 return Clamp(iVal,iRange1,iRange2);
755 static bool FnInside(
C4PropList * _this,
long iVal,
long iRange1,
long iRange2)
757 return Inside(iVal,iRange1,iRange2);
760 static long FnRandom(
C4PropList * _this,
long iRange)
789 throw C4AulExecError(
"GetLength: parameter 0 cannot be converted to string or array");
796 if (!pArray)
return -1;
798 for (int32_t i = 0; i <
iSize; ++i)
824 throw C4AulExecError(
strprintf(R
"(call to "SetLength": parameter 2: invalid array size (expected value between 0 and %d, but got %d)",
836 const char *szText = FnStringPar(pString);
837 if (!szText)
return C4Void();
840 for (
int i = 0; i < iIndex; ++i)
851 const char *
text = FnStringPar(pString);
852 if (!
text)
return nullptr;
854 bool had_valid =
false, had_invalid =
false;
855 const char *ptext =
text, *t0 =
text;
859 if (isalnum(c) || c ==
'_')
862 if (isdigit(c) && !had_valid)
868 if (had_invalid) result.
Append(ptext,
text - ptext);
876 result.
Copy(t0, ptext - t0);
897 if (!funcname || !funcname->
GetCStr())
911 const char *szPrefix =
"";
921 LogF(
"%s%s (no owner)", szPrefix, pSFunc->
GetName());
930 szPrefix =
"overloads ";
936 static long FnModulateColor(
C4PropList * _this,
long iClr1,
long iClr2)
938 DWORD dwClr1 = iClr1;
939 DWORD dwClr2 = iClr2;
941 if (!dwClr1) dwClr1 = 0xffffff;
943 long iA1=dwClr1>>24, iA2=dwClr2>>24;
945 DWORD r = (((dwClr1 & 0xff) * (dwClr2 & 0xff)) >> 8) |
946 (((dwClr1>> 8 & 0xff) * (dwClr2>>8 & 0xff)) & 0xff00) |
947 (((dwClr1>>16 & 0xff) * (dwClr2>>8 & 0xff00)) & 0xff0000) |
948 (std::min<long>(iA1+iA2 - ((iA1*iA2)>>8), 255) << 24);
962 static bool FnStartCallTrace(
C4PropList * _this)
981 static bool FnStopScriptProfiler(
C4PropList * _this)
989 C4String *name_prefix_s = name_prefix;
996 if (!name_prefix_s ||
SEqual2(const_name, name_prefix_s->
GetCStr()))
1008 if (!from)
return source;
1009 if (!source)
return C4Void();
1010 const char *szto = to ? to->
GetCStr() :
"";
1011 const char *szfrom = from->
GetCStr();
1013 if (
s.Replace(szfrom, szto))
1028 pArray->
Sort(descending);
1034 if (!pArray)
throw C4AulExecError(
"SortArrayByProperty: no array given");
1035 if (!prop_name)
throw C4AulExecError(
"SortArrayByProperty: no property name given");
1042 static bool FnSortArrayByArrayElement(
C4PropList * _this,
C4ValueArray *pArray, int32_t element_index,
bool descending)
1044 if (!pArray)
throw C4AulExecError(
"SortArrayByArrayElement: no array given");
1045 if (element_index<0)
throw C4AulExecError(
"SortArrayByArrayElement: element index must be >=0");
1048 if (!pArray->
SortByArrayElement(element_index, descending))
throw C4AulExecError(
"SortArrayByArrayElement: not all array elements are arrays of sufficient length");
1056 if (!file)
throw C4AulExecError(
"FileWrite: invalid file handle");
1058 if (!data)
return false;
1085 {
"FX_Call_Energy" ,
C4V_Int, 32 },
1095 {
"Regex_CaseInsensitive" ,
C4V_Int, Regex_CaseInsensitive },
1096 {
"Regex_FirstOnly" ,
C4V_Int, Regex_FirstOnly },
1109 {
"C4X_Ver1",
C4V_Int, C4XVER1},
1110 {
"C4X_Ver2",
C4V_Int, C4XVER2},
1117 {
"Call",
true,
C4V_Any, {
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnCall },
1118 {
"EffectCall",
true,
C4V_Any, {
C4V_Object ,
C4V_PropList,
C4V_String ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnEffectCall },
1119 {
"Log",
true,
C4V_Bool, {
C4V_String ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnLog },
1120 {
"DebugLog",
true,
C4V_Bool, {
C4V_String ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnDebugLog },
1121 {
"FatalError",
true,
C4V_Nil, {
C4V_String ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnFatalError },
1122 {
"Format",
true,
C4V_String, {
C4V_String ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnFormat },
1123 {
"Trans_Mul",
true,
C4V_Array, {
C4V_Array ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any ,
C4V_Any}, FnTrans_Mul},
1125 {
nullptr,
false,
C4V_Nil, {
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil ,
C4V_Nil},
nullptr }
1134 assert(pCDef->ValType ==
C4V_Int);
1142 #define F(f) ::AddFunc(p, #f, Fn##f)
1186 F(StartScriptProfiler);
1187 F(StopScriptProfiler);
1189 F(SortArrayByProperty);
1190 F(SortArrayByArrayElement);
1198 F(StringToIdentifier);
1199 F(GetConstantNameByValue);
C4String * String(const char *str)
void AddFunc(C4PropListStatic *Parent, const char *Name, RType(*pFunc)(ThisType *, ParTypes...), bool Public=true)
#define C4Fx_Execute_Kill
#define C4FxCall_EngGetPunched
#define C4Fx_Effect_Annul
#define C4FxCall_EngScript
#define C4FxCall_EngBaseRefresh
#define C4FxCall_EngAsphyxiation
#define C4FxCall_EngBlast
#define C4Fx_Effect_AnnulCalls
#define C4FxCall_TempAddForRemoval
#define C4FxCall_RemoveDeath
#define C4FxCall_EngCorrosion
#define C4FxCall_RemoveClear
#define C4FxCall_DmgScript
#define C4FxCall_EngObjHit
#define C4FxCall_DmgBlast
C4Effect ** FnGetEffectsFor(C4PropList *target)
C4AulScriptEngine ScriptEngine
bool Log(const char *szMessage)
bool DebugLog(const char *strMessage)
bool LogF(const char *strMessage,...)
C4Fixed itofix(int32_t x)
C4Real Cos(const C4Real &fAngle)
int fixtoi(const C4Fixed &x)
C4Real Sin(const C4Real &fAngle)
StdStrBuf FnStringFormat(C4PropList *_this, C4String *szFormatPar, C4Value *Pars, int ParCount)
#define MAKE_AND_RETURN_ARRAY(values)
void InitCoreFunctionMap(C4AulScriptEngine *pEngine)
C4ScriptConstDef C4ScriptConstMap[]
C4ScriptFnDef C4ScriptFnMap[]
const char * GetC4VName(const C4V_Type Type)
C4Value C4VFunction(C4AulFunc *pFn)
C4Value C4VArray(C4ValueArray *pArray)
C4Value C4VInt(int32_t i)
C4Value C4VPropList(C4PropList *p)
C4Value C4VString(C4String *pStr)
bool SWildcardMatchEx(const char *szString, const char *szWildcard)
bool SEqual2(const char *szStr1, const char *szStr2)
int32_t Angle(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2, int32_t iPrec)
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
int SGetLine(const char *szText, const char *cpPosition)
int32_t StrToI32(const char *str, int base, const char **scan_end)
int32_t Distance(int32_t iX1, int32_t iY1, int32_t iX2, int32_t iY2)
int GetCharacterCount(const char *s)
std::string strprintf(const char *format,...)
uint32_t GetNextCharacter(const char **pszString)
T Clamp(T bval, T lbound, T rbound)
bool Inside(T ival, U lbound, V rbound)
size_t SLen(const char *sptr)
StdStrBuf FormatString(const char *szFmt,...)
bool WildcardMatch(const char *szWildcard, const char *szString)
C4Value Exec(C4PropList *p, C4Value pPars[], bool fPassErrors=false) override
C4AulDefFunc(C4PropListStatic *Parent, C4ScriptFnDef *pDef)
static bool FnLogCallStack(C4PropList *_this)
C4Value DirectExec(C4PropList *p, const char *szScript, const char *szContext, bool fPassErrors=false, C4AulScriptContext *context=nullptr, bool parse_function=false)
static C4String * FnTranslate(C4PropList *_this, C4String *text)
C4RefCntPointer< C4String > Name
const char * GetName() const
virtual C4AulScriptFunc * SFunc()
C4Value Exec(C4PropList *p=nullptr, C4AulParSet *pPars=nullptr, bool fPassErrors=false)
C4PropListStatic * Parent
static void StopProfiling()
static void StartProfiling(C4ScriptHost *pScript)
C4ValueMapNames GlobalConstNames
C4PropListStatic * GetPropList()
C4ValueMapData GlobalConsts
C4AulUserFile * GetUserFile(int32_t handle)
void RegisterGlobalConstant(const char *szName, const C4Value &rValue)
C4AulFunc * OwnerOverloaded
C4ScriptHost * pOrgScript
void Write(const char *data, size_t data_length)
C4Value DoCall(C4PropList *pObj, const char *szFn, const C4Value &rVal1, const C4Value &rVal2, const C4Value &rVal3, const C4Value &rVal4, const C4Value &rVal5, const C4Value &rVal6, const C4Value &rVal7)
static C4Effect * New(C4PropList *pForObj, C4Effect **ppEffectList, C4String *szName, int32_t iPrio, int32_t iTimerInterval, C4PropList *pCmdTarget, const C4Value &rVal1, const C4Value &rVal2, const C4Value &rVal3, const C4Value &rVal4)
C4Effect * Check(const char *szCheckEffect, int32_t iPrio, int32_t iTimer, const C4Value &rVal1, const C4Value &rVal2, const C4Value &rVal3, const C4Value &rVal4)
C4Effect * Get(const char *szName, int32_t iIndex=0, int32_t iMaxPriority=0)
int32_t GetCount(const char *szMask, int32_t iMaxPriority=0)
C4AulFunc * GetFunc(C4PropertyName k) const
virtual const char * GetName() const
virtual C4ValueArray * GetProperties() const
virtual class C4PropListStatic * IsStatic()
virtual bool GetPropertyByS(const C4String *k, C4Value *pResult) const
virtual C4Effect * GetEffect()
bool HasProperty(C4String *k) const
virtual void ResetProperty(C4String *k)
C4PropList * GetPrototype() const
virtual void SetPropertyByS(C4String *k, const C4Value &to)
static C4PropList * New(C4PropList *prototype=nullptr)
void SetProperty(C4PropertyName k, const C4Value &to)
C4String * GetParentKeyName()
const char * GetScript() const
static void InstantiateAllLibraries(C4AulScriptEngine *engine)
StdStrBuf GetData() const
const char * GetCStr() const
C4String * RegString(StdStrBuf String)
const C4Value & GetItem(int32_t iElem) const
bool SortByProperty(C4String *prop_name, bool descending=false)
void Sort(class C4SortObject &rSort)
void SetSize(int32_t inSize)
bool SortByArrayElement(int32_t array_idx, bool descending=false)
C4ValueArray * getArray() const
ALWAYS_INLINE bool CheckConversion(C4V_Type vtToType) const
C4String * getStr() const
bool IsIdenticalTo(const C4Value &cmp) const
C4AulFunc * getFunction() const
C4PropList * getPropList() const
const char * GetTypeName() const
const char * GetItemUnsafe(int32_t idx) const
void AppendCharacter(uint32_t unicodechar)
void AppendFormat(const char *szFmt,...) GNUC_FORMAT_ATTRIBUTE_O
const char * getData() const
void AppendChar(char cChar)
void Append(const char *pnData, size_t iChars)
void Copy(const C4Value *Pars, int ParCount)
C4Value(* FunctionC4V)(C4PropList *_this, C4Value *)