C4AulScriptFunc::AddPar: Accept type in addition to name

This way, we don't have to first add the parameter and then set the type
afterwards via internal members.
directional-lights
Nicolas Hake 2016-05-13 16:22:00 +02:00
parent eca8f2cce8
commit 3217fbf55b
1 changed files with 2 additions and 1 deletions

View File

@ -193,11 +193,12 @@ public:
const char *Script; // script pos
C4ValueMapNames VarNamed; // list of named vars in this function
C4ValueMapNames ParNamed; // list of named pars in this function
void AddPar(const char * Idtf)
void AddPar(const char * Idtf, C4V_Type type = C4V_Any)
{
assert(ParCount < C4AUL_MAX_Par);
assert(ParCount == ParNamed.iSize);
ParNamed.AddName(Idtf);
ParType[ParCount] = type;
++ParCount;
}
C4ScriptHost *pOrgScript; // the orginal script (!= Owner if included or appended)