static void MakeStateList(const FStateLabels *list, TArray<FStateDefine> &dest)
{
	dest.Clear();
	if (list != NULL) for(int i=0;i<list->NumLabels;i++)
	{
		FStateDefine def;

		def.Label = list->Labels[i].Label;
		def.State = list->Labels[i].State;
		dest.Push(def);
		if (list->Labels[i].Children != NULL)
		{
			MakeStateList(list->Labels[i].Children, dest[dest.Size()-1].Children);
		}
	}
}
Beispiel #2
0
void FStateDefinitions::MakeStateDefines(const PClassActor *cls)
{
	StateArray.Clear();
	laststate = NULL;
	laststatebeforelabel = NULL;
	lastlabel = -1;

	if (cls != NULL && cls->StateList != NULL)
	{
		MakeStateList(cls->StateList, StateLabels);
	}
	else
	{
		StateLabels.Clear();
	}
}
void MakeStateDefines(const FStateLabels *list)
{
	MakeStateList(list, StateLabels);
}