Decouple the usage of PDT evaluator of chart player.

This commit is contained in:
2023-07-28 14:13:49 +08:00
parent 8b64165fb7
commit 3db8f61e3b
15 changed files with 96 additions and 77 deletions

View File

@@ -66,7 +66,7 @@ namespace Cryville.Crtr {
if (comps[i] == "") comps[i] = "0";
}
_itor.SetSource(string.Format("({0});", string.Join(',', comps)));
ChartPlayer.etor.Evaluate(_vecop, _itor.GetExp());
PdtEvaluator.Instance.Evaluate(_vecop, _itor.GetExp());
return _vecbuf;
}
}
@@ -99,18 +99,18 @@ namespace Cryville.Crtr {
var exp = _itor.GetExp();
switch (c) {
case '@':
ChartPlayer.etor.Evaluate(_vecop, exp);
PdtEvaluator.Instance.Evaluate(_vecop, exp);
node.Time = new Vec1(_vecbuf);
break;
case '~':
ChartPlayer.etor.Evaluate(_vecop, exp);
PdtEvaluator.Instance.Evaluate(_vecop, exp);
node.EndTime = new Vec1(_vecbuf);
break;
case '^':
node.Transition = exp;
break;
case ':':
ChartPlayer.etor.Evaluate(_vecop, exp);
PdtEvaluator.Instance.Evaluate(_vecop, exp);
node.Value = Vector.Construct(ChartPlayer.motionRegistry[name].Type, _vecbuf);
break;
default: