Remove function contact_timing
and contact_timed_area
.
This commit is contained in:
@@ -198,14 +198,12 @@ namespace Cryville.Crtr {
|
||||
Func<int, PropSrc> cccb = k => ContextCascadeLookup(k);
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("attack_timing"), new func_attack_timing(cccb));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("release_timing"), new func_release_timing(cccb));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("contact_timing"), new func_contact_timing(cccb));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("enter_timing"), new func_enter_timing(cccb));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("leave_timing"), new func_leave_timing(cccb));
|
||||
|
||||
Func<int, PdtExpression> jacb = k => ContextJudge._areaFuncs[new Identifier(k)];
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("attack_timed_area"), new func_attack_timed_area(cccb, jacb, this));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("release_timed_area"), new func_release_timed_area(cccb, jacb, this));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("contact_timed_area"), new func_contact_timed_area(cccb, jacb, this));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("enter_timed_area"), new func_enter_or_leave_timed_area(cccb, jacb, this, true));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("leave_timed_area"), new func_enter_or_leave_timed_area(cccb, jacb, this, false));
|
||||
_ctxops.Add(IdentifierManager.Shared.Request("enter_timing_area"), new func_enter_or_leave_timing_area(cccb, jacb, this, true));
|
||||
@@ -734,14 +732,6 @@ namespace Cryville.Crtr {
|
||||
return (ft < t1 && tt >= t1) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
class func_contact_timing : JudgeFunction {
|
||||
public func_contact_timing(Func<int, PropSrc> ctxcb) : base(2, ctxcb) { }
|
||||
protected override float ExecuteImpl(float fn, float tn, float ft, float tt, Vector4? fv, Vector4? tv) {
|
||||
var t0 = GetOperand(0).AsNumber() + fn;
|
||||
var t1 = GetOperand(1).AsNumber() + tn;
|
||||
return ((fv == null || ft < t1) && (tv == null || tt >= t0)) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Timed Area
|
||||
abstract class AreaJudgeFunction : JudgeFunction {
|
||||
@@ -820,18 +810,6 @@ namespace Cryville.Crtr {
|
||||
return EvaluateArea(fv);
|
||||
}
|
||||
}
|
||||
class func_contact_timed_area : AreaJudgeFunction {
|
||||
public func_contact_timed_area(Func<int, PropSrc> ctxcb, Func<int, PdtExpression> jacb, PdtEvaluator etor) : base(3, ctxcb, jacb, etor) { }
|
||||
protected override float ExecuteImpl(float fn, float tn, float ft, float tt, Vector4? fv, Vector4? tv) {
|
||||
if (fv == null || tv == null) return 0;
|
||||
var t0 = GetOperand(0).AsNumber() + fn;
|
||||
var t1 = GetOperand(1).AsNumber() + tn;
|
||||
Vector4 fiv, tiv;
|
||||
if (!GetInternalVectors(t0, t1, ft, tt, fv.Value, tv.Value, out fiv, out tiv)) return 0;
|
||||
if (EvaluateArea(fiv) > 0) return 1;
|
||||
return IntersectsWithAreaBounds(fiv, tiv, true) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
class func_enter_or_leave_timed_area : AreaJudgeFunction {
|
||||
readonly bool _enter;
|
||||
public func_enter_or_leave_timed_area(Func<int, PropSrc> ctxcb, Func<int, PdtExpression> jacb, PdtEvaluator etor, bool enter) : base(3, ctxcb, jacb, etor) {
|
||||
|
Reference in New Issue
Block a user