Rename function in_area to is_in.
This commit is contained in:
@@ -175,8 +175,8 @@ namespace Cryville.Crtr {
|
|||||||
_shortops.Add(new PdtOperatorSignature("!", 1), new op_not_1());
|
_shortops.Add(new PdtOperatorSignature("!", 1), new op_not_1());
|
||||||
|
|
||||||
_shortops.Add(new PdtOperatorSignature("frame_seq", 3), new func_frame_seq());
|
_shortops.Add(new PdtOperatorSignature("frame_seq", 3), new func_frame_seq());
|
||||||
_shortops.Add(new PdtOperatorSignature("in_area", 1), new func_in_area());
|
|
||||||
_shortops.Add(new PdtOperatorSignature("is", 2), new func_is());
|
_shortops.Add(new PdtOperatorSignature("is", 2), new func_is());
|
||||||
|
_shortops.Add(new PdtOperatorSignature("is_in", 1), new func_is_in());
|
||||||
|
|
||||||
_ctxops.Add(IdentifierManager.Shared.Request("screen_edge"), new func_screen_edge(() => ContextTransform));
|
_ctxops.Add(IdentifierManager.Shared.Request("screen_edge"), new func_screen_edge(() => ContextTransform));
|
||||||
_ctxops.Add(IdentifierManager.Shared.Request("int"), new func_int(() => ContextSelfValue));
|
_ctxops.Add(IdentifierManager.Shared.Request("int"), new func_int(() => ContextSelfValue));
|
||||||
@@ -359,19 +359,6 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
class func_in_area : PdtOperator {
|
|
||||||
public func_in_area() : base(1) { }
|
|
||||||
protected override unsafe void Execute() {
|
|
||||||
var arg = GetOperand(0);
|
|
||||||
if (arg.Type == PdtInternalType.Number && arg.AsNumber() <= 0) {
|
|
||||||
GetReturnFrame(PdtInternalType.Null, 0);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var ret = GetReturnFrame(arg.Type, arg.Length);
|
|
||||||
arg.CopyTo(ret);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class func_int_map : PdtOperator {
|
class func_int_map : PdtOperator {
|
||||||
public func_int_map(int pc) : base(pc) {
|
public func_int_map(int pc) : base(pc) {
|
||||||
if (pc < 4) throw new ArgumentOutOfRangeException("Too few parameters for int_map");
|
if (pc < 4) throw new ArgumentOutOfRangeException("Too few parameters for int_map");
|
||||||
@@ -394,6 +381,19 @@ namespace Cryville.Crtr {
|
|||||||
.SetNumber(GetOperand(0).Equals(GetOperand(1)) ? 1 : 0);
|
.SetNumber(GetOperand(0).Equals(GetOperand(1)) ? 1 : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
class func_is_in : PdtOperator {
|
||||||
|
public func_is_in() : base(1) { }
|
||||||
|
protected override unsafe void Execute() {
|
||||||
|
var arg = GetOperand(0);
|
||||||
|
if (arg.Type == PdtInternalType.Number && arg.AsNumber() <= 0) {
|
||||||
|
GetReturnFrame(PdtInternalType.Null, 0);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var ret = GetReturnFrame(arg.Type, arg.Length);
|
||||||
|
arg.CopyTo(ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
class func_map : PdtOperator {
|
class func_map : PdtOperator {
|
||||||
public func_map(int pc) : base(pc) {
|
public func_map(int pc) : base(pc) {
|
||||||
if (pc < 2) throw new ArgumentOutOfRangeException("Too few parameters for map");
|
if (pc < 2) throw new ArgumentOutOfRangeException("Too few parameters for map");
|
||||||
|
|||||||
Reference in New Issue
Block a user