More command line arguments

This commit is contained in:
Andrea Cavalli 2018-03-14 19:41:10 +01:00
parent b303527226
commit f410a9181b
5 changed files with 9 additions and 3 deletions

View File

@ -77,6 +77,9 @@ public class Main {
if (arg.contains("fb")) {
Utils.forceEngine = "fb";
}
if (arg.contains("verbose") || arg.contains("debug")) {
StaticVars.outputLevel = Utils.OUTPUTLEVEL_DEBUG_VERBOSE;
}
if (arg.contains("ms-dos")) {
Utils.headlessOverride = true;
Utils.msDosMode = true;

View File

@ -10,7 +10,7 @@ public class StaticVars {
public static int[] screenPos = new int[] { 0, 0 };
public static final int[] screenSize = new int[] { 480, 320 };
public static boolean debugOn;
public static int outputLevel = 5;
public static int outputLevel = 0;
public static boolean debugWindow2x = false;
public static final Class<?> classLoader = Main.instance.getClass();

View File

@ -225,7 +225,7 @@ public class MathInputScreen extends Screen {
resultSteps.add(0, Utils.newArrayList(expr));
ObjectArrayList<Function> resultExpressions = resultSteps.get(resultSteps.size() - 1);
for (Function rr : resultExpressions) {
Utils.out.println(1, "RESULT: " + rr.toString());
Utils.out.println(0, "RESULT: " + rr.toString());
}
ObjectArrayList<ObjectArrayList<Block>> resultBlocks = MathParser.parseOutput(calc, resultExpressions);
result.setContentAsMultipleGroups(resultBlocks);

View File

@ -48,6 +48,9 @@ public class Variable implements Function {
@Override
public String toString() {
if (getChar() > 0x2000) {
return "0x" + String.format("%04x", (int) getChar());
}
return "" + getChar();
}

View File

@ -190,7 +190,7 @@ public class MathSolver {
}
}
if (StaticVars.debugOn & results != null & appliedRule != null) {
Utils.out.println(Utils.OUTPUTLEVEL_NODEBUG, stepStates[stepState].toString().substring(3) + ": " + appliedRule.getRuleName());
Utils.out.println(Utils.OUTPUTLEVEL_DEBUG_VERBOSE, "Math Solver", stepStates[stepState].toString(), "Applied rule " + appliedRule.getRuleName());
}
return results;
}