Logic negative coordinate support
This commit is contained in:
@@ -861,9 +861,13 @@ public class LExecutor{
|
||||
|
||||
//add graphics calls, cap graphics buffer size
|
||||
if(exec.graphicsBuffer.size < maxGraphicsBuffer){
|
||||
exec.graphicsBuffer.add(DisplayCmd.get(type, exec.numi(x), exec.numi(y), num1, exec.numi(p2), exec.numi(p3), exec.numi(p4)));
|
||||
exec.graphicsBuffer.add(DisplayCmd.get(type, packSign(exec.numi(x)), packSign(exec.numi(y)), packSign(num1), packSign(exec.numi(p2)), packSign(exec.numi(p3)), packSign(exec.numi(p4))));
|
||||
}
|
||||
}
|
||||
|
||||
static int packSign(int value){
|
||||
return (Math.abs(value) & 0b011111111) | (value < 0 ? 0b1000000000 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
public static class DrawFlushI implements LInstruction{
|
||||
|
||||
Reference in New Issue
Block a user