Logic negative coordinate support

This commit is contained in:
Anuken
2021-03-12 09:35:32 -05:00
parent c5bea40e7d
commit d545dc0d02
2 changed files with 14 additions and 5 deletions

View File

@@ -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{