Code cleanup.
This commit is contained in:
@@ -180,9 +180,6 @@ namespace Cryville.Crtr {
|
||||
float _jnumbuf; Vector4 _jvecbuf;
|
||||
readonly PropSrc _jnumsrc, _jvecsrc;
|
||||
|
||||
unsafe void LoadNum(byte[] buffer, float value) {
|
||||
fixed (byte* ptr = buffer) *(float*)ptr = value;
|
||||
}
|
||||
// Adopted from System.Collections.Generic.ArraySortHelper<T>.InternalBinarySearch(T[] array, int index, int length, T value, IComparer<T> comparer)
|
||||
int BinarySearch(List<JudgeEvent> list, float time, int stack) {
|
||||
int num = 0;
|
||||
|
@@ -677,7 +677,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
#endregion
|
||||
#region Judge Functions
|
||||
#region Timing
|
||||
#region Primary
|
||||
static readonly int _var_fn = IdentifierManager.Shared.Request("note_time_from");
|
||||
static readonly int _var_tn = IdentifierManager.Shared.Request("note_time_to");
|
||||
static readonly int _var_ft = IdentifierManager.Shared.Request("input_time_from");
|
||||
@@ -739,6 +739,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
}
|
||||
}
|
||||
#region Timing
|
||||
class func_attack_timing : JudgeFunction {
|
||||
public func_attack_timing(Func<int, PropSrc> ctxcb) : base(2, ctxcb) { }
|
||||
protected override JudgeFunctionResult ExecuteImpl(float fn, float tn, float ft, float tt, Vector4? fv, Vector4? tv) {
|
||||
@@ -774,7 +775,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Timed Area
|
||||
#region Timed Area / Timing Area
|
||||
abstract class AreaJudgeFunction : JudgeFunction {
|
||||
readonly Func<int, PdtExpression> _jacb;
|
||||
readonly PdtEvaluator _etor;
|
||||
@@ -895,6 +896,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
#region Secondary
|
||||
static readonly int _var_jt = IdentifierManager.Shared.Request("judge_time");
|
||||
static readonly int _var_jv = IdentifierManager.Shared.Request("judge_vec");
|
||||
class func_in_timing : PdtOperator {
|
||||
@@ -943,6 +945,8 @@ namespace Cryville.Crtr {
|
||||
ret.SetNumber(_area);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
static unsafe class oputil {
|
||||
public static float AsNumber(PropSrc src) {
|
||||
if (src == null) throw new ArgumentNullException("src");
|
||||
|
Reference in New Issue
Block a user